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

Revision history [back]

Wow, great question.

Can you tell me what your base_link->auxgps_link transform is? Up until 2.2.3, I wasn't accounting for the base_link->gps transform, so the pose estimate you'd get from the GPS would be w.r.t. the GPS itself, not the robot center. This was clearly an issue for large bots with GPS sensors mounted far from the origin. The way I am correcting this now is as follows:

  1. Get the robot's current rotation
  2. Use that to rotate the base_link->gps transform
  3. Apply rotated transform

This is because the offset that needs to be applied will obviously change with heading. Unlike a LIDAR, the data being measured by the GPS is not e.g., a range measurement originating at the GPS, such that applying the transform via tf will work.

However, I haven't had any good bag files to test the change, so it's certainly possible that I did something stupid. Still, can you tell me where the sensor is mounted on your robot, and the transform you used?

Wow, great question.

Can you tell me what your base_link->auxgps_link transform is? Up until 2.2.3, I wasn't accounting for the base_link->gps transform, so the pose estimate you'd get from the GPS would be w.r.t. the GPS itself, not the robot center. This was clearly an issue for large bots with GPS sensors mounted far from the origin. The way I am correcting this now is as follows:

  1. Get the robot's current rotation
  2. Use that to rotate the base_link->gps transform
  3. Apply rotated transform

This is because the offset that needs to be applied will obviously change with heading. Unlike a LIDAR, the data being measured by the GPS is not e.g., a range measurement originating at the GPS, such that applying the transform via tf will work.

However, I haven't had any good bag files to test the change, so it's certainly possible that I did something stupid. Still, can you tell me where the sensor is mounted on your robot, and the transform you used?

EDIT: I was able to verify the phenomenon. The problem was indeed with the treatment of the base_link->auxgps_link transform. In step (1) above, I was getting the inverse rotation that I needed. Given that the X linear offset for the sensor was -0.12 meters, this meant that the offset was effectively being doubled at headings of pi/2 and -pi/2. So rotating in place would cause the error to go from 0 to approximately -0.24 to 0 to 0.24. I have a PR for the change and will merge shortly.