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

Revision history [back]

click to hide/show revision 1
initial version

Have a look at the robot_localization package, and its documentation here. It sounds like you could be trying to perform the job that it does already. It includes a node called navsat_transform_node which performs accurate GPS -> map conversions, to fuse with imu and odometry data to position your robot more accurately.

If you don't want to use the node itself, have a look at the navsat_conversions.h file in its include directory. This provides a lat/long -> UTM conversion. UTM is measured in meters, so you can easily find the positions in the UTM grid and use this to get your distance travelled in meters.