RoboJackets / igvc-software

The code base for the RoboNav team's IGVC robot.
https://robojackets.org/teams/robonav/
MIT License
91 stars 120 forks source link

Integrate magnetometer into localization node #873

Open VAM7686 opened 2 years ago

VAM7686 commented 2 years ago

For some reason, the magnetometer is not integrated in our localization node, the ekf_localization_node. It is important to integrate the magnetometer measurements in order to ensure more accurate state estimation.

A simple way to visualize the inaccuracies caused by the lack of magnetometer integration is by:

  1. roslaunch igvc_gazebo ramp_lane.launch
  2. In gazebo rotate the robot about 45 degrees counter clockwise so it is facing in a different starting direction.
  3. roslaunch igvc_navigation localization.launch
  4. Open rviz and display the /ground_truth and /odometry/filtered topics. The difference between the ground truth and the state estimation should be evident and look something like this:

(green arrow is ground truth and red arrow is state estimation) localization_mag_integration_error

AC: Integrated magnetometer measurements in the ekf_localization_node.