0
$\begingroup$

Rosanswers logo

Hello,

I am working with a USB GPS unit which i have gotten working with the gpsd_client in order to read in the GPS data from the unit. I am trying to implement VERY simple navigation in a 2D work from one way point to another. I would have to imagine that there would be packages all ready out there to take in current GPS information and to provide even a straight line path to the next waypoint.

For some background this is for a UGV project which will eventually use more complex navigation but for now we just want to get the thing up and running quickly and I we were hoping to keep the project within the ROS world any help the community could provide would be super helpful.

Thanks is advance!


Originally posted by BadRobot on ROS Answers with karma: 91 on 2012-01-17

Post score: 3

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

The ROS navigation stack provides point-to-point navigation by default. In order to use the navigation stack, you must provide sensor streams (LaserScans and/or PointClouds), odometry information, and proper transforms. In the case of GPS, the GPS unit will provide part of the odometry required for navigation. See this tutorial for setting up odometry.

The main problem here is that A) you need a nav_msgs/Odometry message. This can be obtained using the gps_common node which will convert the Lat/Long fixes into UTM (meters) and publish an odometry message for the nav_stack. The problem here, however, is that that information is insufficient for full navigation. The nav_msgs/Odometry message also requires a geometry_msgs/Twist (i.e. the velocity of the robot in 3D space). The only way to calculate velocity using a GPS is to do a time-difference of the fixes, and even then, this information does not necessarily provide you with a heading (orientation and angular velocity). GPS is good for 2D position in x-y, but not for heading or velocities of any kind.

To solve this problem, ROS provides the robot_pose_ekf node to fuse different forms of sensor data together to use the best of each sensor.

For the time being, you could use the GPS and just take a fix-by-fix difference of position to acquire your velocity and heading. I must warn you though, GPS fixes tend to be pretty jumpy. Depending on the GPS, drift can be multiple meters between readings. Typically, GPS fixes require heavy filtering to be useful.


Originally posted by DimitriProsser with karma: 11163 on 2012-01-17

This answer was ACCEPTED on the original site

Post score: 4


Original comments

Comment by DimitriProsser on 2012-01-18:
I meant UTM. Thanks for noticing.

Comment by joq on 2012-01-18:
What is UMD? I can't find a definition

Comment by BadRobot on 2012-01-17:
We are setting our project up to use ROS for navigation in that it should simply provide a direction to a kinematic model which will then determine how to get the robot from its current pose to the desired pose. For now we are using pretty basic sensors which are at the arduino lvl not the ROS Comp

$\endgroup$
0
$\begingroup$

Rosanswers logo

This is within the scope of the geographic_info project.

While there has been some preliminary work, no code has been released yet. Some basic messages and data conversions are planned for Fuerte. Please feel free to experiment with the git sources on kforge.

You are welcome to join that project. You can help us define the requirements and desired interfaces.

For what you plan, I suggest converting latitude and longitude to UTM using the geodesy package. Then, navigation can be done with straightforward Euclidian geometry.


Originally posted by joq with karma: 25443 on 2012-01-17

This answer was NOT ACCEPTED on the original site

Post score: 2


Original comments

Comment by joq on 2012-01-18:
What UTM (Universal Transverse Mercator) does is allow you to draw straight lines (within a grid zone hundreds of kilometers across). If you try to do that with latitude and longitude, things get messy.

Comment by BadRobot on 2012-01-17:
I think that this might be a little bit to complex for what we are looking to do at the moment. I was hoping more for something where I could pass in waypoints (either through command line or gui) and simply draw a straight line between where i am and where I want to go.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.