Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
肥鼠路易
基于MyG2O的例子实现
提交
c30c3b00
基
基于MyG2O的例子实现
项目概览
肥鼠路易
/
基于MyG2O的例子实现
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
29
列表
看板
标记
里程碑
合并请求
29
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
代码片段
项目成员
Pages
基
基于MyG2O的例子实现
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
29
Issue
29
列表
看板
标记
里程碑
合并请求
29
合并请求
29
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
c30c3b00
编写于
6月 08, 2021
作者:
肥鼠路易
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
上传新文件
上级
abdca323
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
160 addition
and
0 deletion
+160
-0
include/so3.h
include/so3.h
+160
-0
未找到文件。
include/so3.h
0 → 100644
浏览文件 @
c30c3b00
// This file is part of Sophus.
//
// Copyright 2011 Hauke Strasdat (Imperial College London)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
#ifndef SOPHUS_SO3_H
#define SOPHUS_SO3_H
#include <Eigen/Core>
#include <Eigen/StdVector>
#include <Eigen/Geometry>
namespace
g2o
{
using
namespace
Eigen
;
const
double
SMALL_EPS
=
1e-5
;
class
SO3
{
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
;
public:
// Jr, right jacobian of SO(3)
static
Matrix3d
JacobianR
(
const
Vector3d
&
w
);
// Jr^(-1)
static
Matrix3d
JacobianRInv
(
const
Vector3d
&
w
);
// Jl, left jacobian of SO(3), Jl(x) = Jr(-x)
static
Matrix3d
JacobianL
(
const
Vector3d
&
w
);
// Jl^(-1)
static
Matrix3d
JacobianLInv
(
const
Vector3d
&
w
);
// ----------------------------------------
SO3
();
SO3
(
const
SO3
&
other
);
explicit
SO3
(
const
Matrix3d
&
_R
);
explicit
SO3
(
const
Quaterniond
&
unit_quaternion
);
SO3
(
double
rot_x
,
double
rot_y
,
double
rot_z
);
/*SO3 (double homo1,
double homo2,
double homo3,
double homo4);*/
void
operator
=
(
const
SO3
&
so3
);
SO3
operator
*
(
const
SO3
&
so3
)
const
;
void
operator
*=
(
const
SO3
&
so3
);
Vector3d
operator
*
(
const
Vector3d
&
xyz
)
const
;
SO3
inverse
()
const
;
Matrix3d
matrix
()
const
;
Matrix3d
Adj
()
const
;
Matrix3d
generator
(
int
i
);
Vector3d
log
()
const
;
static
SO3
exp
(
const
Vector3d
&
omega
);
static
SO3
expAndTheta
(
const
Vector3d
&
omega
,
double
*
theta
);
static
Vector3d
log
(
const
SO3
&
so3
);
static
Vector3d
logAndTheta
(
const
SO3
&
so3
,
double
*
theta
);
static
Matrix3d
hat
(
const
Vector3d
&
omega
);
static
Vector3d
vee
(
const
Matrix3d
&
Omega
);
static
Vector3d
lieBracket
(
const
Vector3d
&
omega1
,
const
Vector3d
&
omega2
);
static
Matrix3d
d_lieBracketab_by_d_a
(
const
Vector3d
&
b
);
void
setQuaternion
(
const
Quaterniond
&
quaternion
);
static
Quaterniond
HomoToQuad
(
double
homo1
,
double
homo2
,
double
homo3
,
double
homo4
);
const
Quaterniond
&
unit_quaternion
()
const
{
return
unit_quaternion_
;
}
static
const
int
DoF
=
3
;
public:
static
Eigen
::
Matrix4d
rightR
(
const
Eigen
::
Quaterniond
q
);
static
Eigen
::
Matrix4d
leftR
(
const
Eigen
::
Quaterniond
q
);
protected:
Quaterniond
unit_quaternion_
;
};
inline
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out_str
,
const
SO3
&
so3
)
{
out_str
<<
so3
.
log
().
transpose
()
<<
std
::
endl
;
return
out_str
;
}
}
// end namespace
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录