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

gps + navigation

asked 2012-01-16 23:59:15 -0600

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!

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
4

answered 2012-01-17 01:13:21 -0600

DimitriProsser gravatar image

updated 2012-01-18 03:41:08 -0600

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.

edit flag offensive delete link more

Comments

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
BadRobot gravatar image BadRobot  ( 2012-01-17 01:33:51 -0600 )edit
What is UMD? I can't find a definition
joq gravatar image joq  ( 2012-01-18 02:33:42 -0600 )edit
I meant UTM. Thanks for noticing.
DimitriProsser gravatar image DimitriProsser  ( 2012-01-18 03:41:54 -0600 )edit
2

answered 2012-01-17 01:00:06 -0600

joq gravatar image

updated 2012-01-17 01:01:53 -0600

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.

edit flag offensive delete link more

Comments

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.
BadRobot gravatar image BadRobot  ( 2012-01-17 01:29:30 -0600 )edit
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.
joq gravatar image joq  ( 2012-01-18 02:31:33 -0600 )edit
0

answered 2012-01-17 14:43:58 -0600

ahendrix gravatar image

It shouldn't be too hard to write a single node that has an action server for goals, receives nav_msgs/Odometry from the umd_odometry_node, and produces the appropriate geometry_msgs/Twist to control your base. Once you add more sensors, you can replace this node with the ROS navigation stack.

The most basic approach is to compute the desired heading to your destination, and use that as a proportional input to your yaw velocity (steering), and to compute the remaining distance to your destination, and use that to set your forward velocity.

I implemented a scheme like this on my robots, and it worked fairly well if there weren't any obstacles in the way.

edit flag offensive delete link more

Question Tools

7 followers

Stats

Asked: 2012-01-16 23:59:15 -0600

Seen: 10,361 times

Last updated: Jan 18 '12