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

Is using lat/long coordinate space advisable?

asked 2019-02-07 03:58:26 -0600

Hypomania gravatar image


I am planning on using latitude / longitude coordinate space for my 2D navigation package. From your perspective, how easy would that be to implement or is there a different way of doing it?

I have seen quite a few projects use GPS for localisation but I am not sure what coordinate space they all operate in when in comes to TF, any advises?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-02-07 04:50:29 -0600

updated 2019-02-07 04:51:38 -0600

The problem with lat/long space is that it's non-Euclidean, especially when you get far from the equator. For example if you develop your system in Texas and then take it to northern Europe this could completely break the system.

The recommended approach is to convert the raw lat-long from the GPS into a local North, East aligned coordinate system. Unless your project will be covering a distance of many kilometres then this flat approximation should work. The navsat_transform_node in the robot_localization package can be used to do this.

The advantage of this approach is that it uses a Cartesian frame measured in metres so it compatible with the rest of the ROS ecosystem.

edit flag offensive delete link more


Really appreciated, thank you for your guidance!

Hypomania gravatar image Hypomania  ( 2019-02-07 05:38:34 -0600 )edit

Sorry, one question: do I need odometry when I have accurate GPS signal? I am not using the navigation stack, I am trying to recreate something more basic. I looked at the navsat_transform_node and it converts the data into odometry, is that needed?

Hypomania gravatar image Hypomania  ( 2019-02-07 05:46:52 -0600 )edit

The odometry message includes an absolute pose and relative twist message. In your case you can simply use the pose element and take your absolute position from that.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-02-07 07:03:16 -0600 )edit

Thank you! And the twist I could get from the compass heading, correct?

Hypomania gravatar image Hypomania  ( 2019-02-07 07:05:36 -0600 )edit

No, the twist is the relative movement (the first derivative). The pose message includes both the absolute position and the orientation information. However this data may not be filled in because GPS doesn't provide orientation directly only the course over ground which may well be different.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-02-07 07:08:17 -0600 )edit

Gotcha, thank you for your help, really appreciated as always!

Hypomania gravatar image Hypomania  ( 2019-02-07 07:13:22 -0600 )edit

No problem

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-02-07 08:07:17 -0600 )edit

For reference REP 105 is a standard relating to this:

tfoote gravatar image tfoote  ( 2019-02-07 10:48:20 -0600 )edit

Question Tools



Asked: 2019-02-07 03:58:26 -0600

Seen: 510 times

Last updated: Feb 07 '19