Skip to content

Commit f7a0472

Browse files
authored
Merge pull request koide3#69 from ktk1501/issue-66/road_flipped_problem
road_flipped_problem fix by adding minus to Z in g2o optimizer
2 parents ae0fceb + a8afdb3 commit f7a0472

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/hdl_graph_slam_nodelet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ class HdlGraphSlamNodelet : public nodelet::Nodelet {
423423

424424
if(enable_imu_acceleration) {
425425
Eigen::MatrixXd info = Eigen::MatrixXd::Identity(3, 3) / imu_acceleration_edge_stddev;
426-
g2o::OptimizableGraph::Edge* edge = graph_slam->add_se3_prior_vec_edge(keyframe->node, Eigen::Vector3d::UnitZ(), *keyframe->acceleration, info);
426+
g2o::OptimizableGraph::Edge* edge = graph_slam->add_se3_prior_vec_edge(keyframe->node, -Eigen::Vector3d::UnitZ(), *keyframe->acceleration, info);
427427
graph_slam->add_robust_kernel(edge, private_nh.param<std::string>("imu_acceleration_edge_robust_kernel", "NONE"), private_nh.param<double>("imu_acceleration_edge_robust_kernel_size", 1.0));
428428
}
429429
updated = true;

0 commit comments

Comments
 (0)