当前位置:网站首页>Ceres optimization based on sophus
Ceres optimization based on sophus
2022-06-29 07:56:00 【Hermit_ Rabbit】
0. Preface
In many optimization problems , Especially the problem of sensor fusion , The quantities that exist in a space called a manifold must be modeled , For example, the rotation of the sensor is represented by the number of quaternions / Direction . The addition in the flow pattern is ⊞ Express . Take the rotation matrix update as an example :

LocalParameterization The interface allows the user to define parameter blocks and associate them with the manifold to which they belong . It is defined by Plus (⊞) Operation and its application in Δ=0 In relation to Δ To achieve .
class LocalParameterization {
public:
virtual ~LocalParameterization() {
}
// Addition in flow pattern space
virtual bool Plus(const double* x,
const double* delta,
double* x_plus_delta) const = 0;
// Calculate the Jacobian matrix
virtual bool ComputeJacobian(const double* x, double* jacobian) const = 0;
// local_matrix = global_matrix * jacobian
virtual bool MultiplyByJacobian(const double* x,
const int num_rows,
const double* global_matrix,
double* local_matrix) const;
virtual int GlobalSize() const = 0; // Parameter block x The dimension of the environment space .
virtual int LocalSize() const = 0; // Δ The dimension of the tangent space
};
We can often find in VINS,ORB This kind of operation is included in the series , The addition of flow patterns can be effectively realized by local parameterization ( It's actually a perturbation calculation ). Here the author provides an example based on Sophus Of Ceres Optimization plan .
1. Sophus
The question is the same as Data storage sequence and update The use of SE3::exp(Eigen::Matrix<double,6,1> &a) Operation related
Eigen Inside Quaterniond The element storage address and the order of parameters in the initialization constructor are inconsistent .
Eigen initialization Quaterniond(w,x,y,z), among w It's the real part ,x,y,z The imaginary part corresponding to the three axes
But this sum Eigen Inside Quaterniond The data is stored in different order , Storage order x,y,z,w.
Sophus Inside SO3 Partly from Eigen::Quaternion Express ,translation use Eigen::Vector3d Express . adopt SE3::data() You can get SE3 Of stored data double* The pointer , The storage address sequence is as follows :
data()[0] Corresponding Quaterniond x
data()[1] Corresponding Quaterniond y
data()[2] Corresponding Quaterniond z
data()[3] Corresponding Quaterniond w
data()[4] Corresponding SE3 Of tx
data()[5] Corresponding SE3 Of ty
data()[6] Corresponding SE3 Of tz
however
Sophus::SE3d::exp(const Eigen::Vector6d &a)Function a Of The first three dimensions correspond to SE3 in translation Part of , and The latter three dimensions correspond to SO3 Part of . and Sophus The order of internal storage is inconsistent . So in SLAM in When optimizing the pose , utilize Sophus and ceres Note this order .
Practice a little Sophus + ceres Yes SE3 To analyze Jacobian When optimizing , Inherit ceres::CostFunction Customize your own CostFunction, Code in Jacobian Analytical form . Then customize a corresponding LocalParameterization.
… Please refer to Ancient Moon House
边栏推荐
- 精选西门子PLC工程实例源码【共300套】
- 【工控老马】西门子PLC s7-300SCL编程详解
- 基础语法 - 位运算
- 路由详解(九阳真经)
- [repair collection function, update login interface] knowledge payment applet, blog applet, full version open source code, resource realization applet, with 299 whole station resource data
- pycharm的虚拟环境如何共享到jupyter-lab
- 101. 对称二叉树(递归与迭代方法)
- cv2.cvtColor
- 道闸控制器通讯协议
- 498. 对角线遍历(模拟)
猜你喜欢

Problem solving -- > online OJ (13)

Roblox sword nine sword two

Behaviortree in ros2

How to share the virtual environment of pycharm to jupyter Lab

【量化投资系统】因子处理安装talib

pycharm的虚拟环境如何共享到jupyter-lab

Concurrent idempotent anti shake

code::blocks代码格式化快捷键

4年工作经验,多线程间的5种通信方式都说不出来,你敢信?

【域渗透提权】CVE-2020-1472 NetLogon 权限提升漏洞
随机推荐
qtcreator设置字符集
基础语法 - 位运算
【kerberos】kerberos 认证浅析
Behaviortree in ros2
SQL Server 开启cdc
SQL SERVER 2008 发布订阅到SQL Server 2017避坑指南
SVM,人脸识别遇到的问题及解决方法
SQL 注入绕过(六)
手撕二叉搜索树(Binary Search Tree)
SQL Server 2008 publish and subscribe to SQL Server 2017 pit avoidance Guide
[industrial control old horse] detailed explanation of the design scheme of the running lamp control system based on Siemens S7-200PLC
JSP learning part
Roblox sword nine sword two
Codeforces Round #799 (Div. 4)
嵌入式产品防盗版
Check whether tensorflow supports GPU and test program
Postman pre request
手把手系列---安装SpotBugs、并快速上手使用
互联网公司的组织结构与产品经理岗位职责是什么?
TF. Repeat and stack operations of slim