当前位置:网站首页>cartographer_ optimization_ problem_ 2d
cartographer_ optimization_ problem_ 2d
2022-06-26 05:13:00 【Ancient road】
cartographer_optimization_problem_2d
0. introduction

The main business logic goes back to mapping/internal/2d/pose_graph_2d.cc/PoseGraph2D::HandleWorkQueue-->RunOptimization() in . The specific optimization part is in optimization Implementation in .
The previous calculation constraint result is :

1. Set variables to be optimized

- Of subgraphs global_pose
- Node global_pose_2d
2. Residuals
2.1. The first residual -scan_match
take The node and the origin of the subgraph are global Relative position and orientation in coordinate system And constraint As the residual term
- The first coordinate transformation : The node and the origin of the subgraph are global Coordinate transformation in coordinate system ( Predict pose )
- The second coordinate transformation : Constraints within and between subgraphs ( Measuring posture )

Residual calculation code :
/** * @brief 2d according to SPA The formula in the paper calculates the residual error * * Calculated residual error : * T12 = T1.inverse() * T2 * [R1.inverse * R2, R1.inverse * (t2 -t1)] * [0 , 1 ] * * @param[in] relative_pose * @param[in] start * @param[in] end * @return std::array<T, 3> */
template <typename T>
static std::array<T, 3> ComputeUnscaledError(
const transform::Rigid2d& relative_pose, const T* const start,
const T* const end) {
// Rotation matrix R
const T cos_theta_i = cos(start[2]);
const T sin_theta_i = sin(start[2]);
const T delta_x = end[0] - start[0]; // t2 -t1
const T delta_y = end[1] - start[1];
const T h[3] = {
cos_theta_i * delta_x + sin_theta_i * delta_y, // R.inverse * (t2 -t1)
-sin_theta_i * delta_x + cos_theta_i * delta_y,
end[2] - start[2]};
return {
{
T(relative_pose.translation().x()) - h[0],
T(relative_pose.translation().y()) - h[1],
common::NormalizeAngleDifference(
T(relative_pose.rotation().angle()) - h[2])}};
}
2.2. The second residual -Landmark
landmark data And adopt 2 The relative pose interpolated by the pose of nodes As the residual term
- The first coordinate transformation : landmark The time of data is 2 The pose interpolated from the pose of nodes ( Predict pose )
- The second coordinate transformation : landmark In the data landmark_to_tracking_transform_( Measuring posture )
struct LandmarkNode {
// landmark Data is relative to tracking_frame Relative coordinate transformation of
struct LandmarkObservation {
int trajectory_id;
common::Time time;
transform::Rigid3d landmark_to_tracking_transform;
double translation_weight;
double rotation_weight;
};
// Multiple... May be observed at the same time landmark data
std::vector<LandmarkObservation> landmark_observations;
// This frame of data corresponds to tracking_frame stay global The pose in the coordinate system
absl::optional<transform::Rigid3d> global_landmark_pose;
bool frozen = false;
};
Mainly node <--> landmark Constraints between :
// Step: landmark data And adopt 2 The relative pose interpolated by the pose of nodes As the residual term
AddLandmarkCostFunctions(landmark_nodes, node_data_, &C_nodes, &C_landmarks,
&problem, options_.huber_scale());
A little .
2.3. The third residual -Odometer
Nodes are located between nodes global Relative coordinate transformation in coordinate system And Relative coordinate transformation interpolated from odometer data As the residual term
- The first coordinate transformation : adjacent 2 Nodes are located between global Coordinate transformation in coordinate system
- The second coordinate transformation : Then calculate these separately 2 The time of nodes is interpolated in the odometer data queue 2 Odometer position and attitude , Calculate this 2 Coordinate transformation between position and attitude of odometer
2.4. Fourth residual -local_global
Nodes are located between nodes global Relative coordinate transformation in coordinate system And adjacent 2 A node in the local Relative coordinate transformation in coordinate system As the residual term
- The first coordinate transformation : adjacent 2 There are three internodes in global Coordinate transformation in coordinate system
- The second coordinate transformation : adjacent 2 A node in the local Coordinate transformation in coordinate system
2.5. The fifth residual -gps
Node and gps The origin of the coordinate system is global Relative coordinate transformation in coordinate system And adopt gps The relative coordinate transformation obtained by data interpolation As the residual term
- The first coordinate transformation : The corresponding time of the node is gps Interpolated data gps be relative to gps The position and pose of the origin of the coordinate system
- The second coordinate transformation : Nodes in the global In coordinate system And gps Origin of coordinate system Relative coordinate transformation of
3. Theoretical reference
边栏推荐
- LeetCode 19. Delete the penultimate node of the linked list
- 广和通联合安提国际为基于英伟达 Jetson Xavier NX的AI边缘计算平台带来5G R16强大性能
- Computer Vision Tools Chain
- Lstms in tensorflow_ Cell actual combat
- tensorlow:cifar100_ train
- [greedy college] Figure neural network advanced training camp
- Codeforces Round #800 (Div. 2)
- 【Unity3D】刚体组件Rigidbody
- -Discrete Mathematics - Analysis of final exercises
- Difference between return and yield
猜你喜欢

Codeforces Round #800 (Div. 2)

Zuul 实现动态路由

Official image acceleration

cartographer_pose_graph_2d
![C# 39. Conversion between string type and byte[] type (actual measurement)](/img/33/046aef4e0c1d7c0c0d60c28e707546.png)
C# 39. Conversion between string type and byte[] type (actual measurement)

【Unity3D】人机交互Input

Dbeaver installation and configuration of offline driver

cartographer_optimization_problem_2d

86.(cesium篇)cesium叠加面接收阴影效果(gltf模型)
![C# 39. string类型和byte[]类型相互转换(实测)](/img/33/046aef4e0c1d7c0c0d60c28e707546.png)
C# 39. string类型和byte[]类型相互转换(实测)
随机推荐
递归遍历目录结构和树状展现
LSTM in tensorflow_ Layers actual combat
ThreadPoolExecutor实现文件上传批量插入数据
瀚高数据库自定义操作符‘!~~‘
Status of processes and communication between processes
cartographer_optimization_problem_2d
Create SSH key pair configuration steps
RESNET in tensorflow_ Train actual combat
出色的学习能力,才是你唯一可持续的竞争优势
cartographer_fast_correlative_scan_matcher_2d分支定界粗匹配
[IDE(ImageBed)]Picgo+Typora+aliyunOSS部署博客图床(2022.6)
Muke.com actual combat course
Codeforces Round #800 (Div. 2)
skimage.morphology.medial_axis
Pycharm package import error without warning
-Discrete Mathematics - Analysis of final exercises
Learn from small samples and run to the sea of stars
UWB ultra high precision positioning system architecture
Ai+ remote sensing: releasing the value of each pixel
Day4 branch and loop jobs