Skip to content

Commit

Permalink
fixed bad rotation of vins position by initial heading
Browse files Browse the repository at this point in the history
  • Loading branch information
vasek committed Apr 12, 2024
1 parent 8e216c6 commit 65c019d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/VinsRepublisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ void VinsRepublisher::odometryCallback(const nav_msgs::OdometryConstPtr &odom) {
// compensate initial heading ambiguity
const double hdg = mrs_lib::AttitudeConverter(vins_pose_mrs_world.pose.orientation).getHeading();
vins_pose_mrs_world.pose.orientation = mrs_lib::AttitudeConverter(vins_pose_mrs_world.pose.orientation).setHeading(hdg - init_hdg_);
vins_pose_mrs_world.pose.position = rotatePointByHdg(vins_pose_mrs_world.pose.position, init_hdg_);
vins_pose_mrs_world.pose.position = rotatePointByHdg(vins_pose_mrs_world.pose.position, -init_hdg_);
}


Expand Down

0 comments on commit 65c019d

Please sign in to comment.