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

# Is using lat/long coordinate space advisable?

Hi,

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 close merge delete

Sort by ยป oldest newest most voted

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.

more

Really appreciated, thank you for your guidance!

( 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?

( 2019-02-07 05:46:52 -0600 )edit
1

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.

( 2019-02-07 07:03:16 -0600 )edit

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

( 2019-02-07 07:05:36 -0600 )edit
1

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.

( 2019-02-07 07:08:17 -0600 )edit
1

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

( 2019-02-07 07:13:22 -0600 )edit
1

No problem

( 2019-02-07 08:07:17 -0600 )edit
2

For reference REP 105 is a standard relating to this: http://www.ros.org/reps/rep-0105.html

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

## Stats

Seen: 510 times

Last updated: Feb 07 '19