ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

These things are quite difficult to debug but here are some tips how to get started on that.

  1. Have a good read of https://www.ros.org/reps/rep-0105.html, especially focus on building an intuition on map and odom frames (it took me quite a while to figure out how they are supposed to work)
  2. Afterwards read this: http://docs.ros.org/en/melodic/api/robot_localization/html/integrating_gps.html that should give you an idea how to use robot localization with GPS (spoiler alert: you will need to run 2 instances of ekf, one will provide odom->base_link transform and will contain continuous measurements (IMU and odom) and the second one will provide map->odom frame and it will fuse gps odometry (this change will be non-continuous, you can expect odom to jump in map frame a lot)
  3. Move your config to .yaml file so that it's more convenient to debug. In your yaml file set the parameter print_diagnostics to true - sometimes it will provide you insights into what's wrong in your setup
  4. Start tuning with the continuous frame just with the odometry and imu fused. Then in rviz make sure that you set the fixed frame to odom and double check that the localization works. Once you complete this step move over to implementing the second ekf that will additionally fuse the GPS.
  5. For fusing gps you will most likely need to run navsat_transform node. Ideally you should have a heading from your GPS unit.