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

GPS Waypoint navigation with robot_localization and navsat_transform_node

asked 2017-01-05 12:13:20 -0500

Marcus Barnet gravatar image

updated 2017-01-05 12:15:50 -0500

I'm using Clearpath Husky A200 which outputs encoders information, a XSENS IMU (without a good compass) and a Novatel RTK GPS with sub-inch accuracy and I would like to implement a GPS waypoints navigation where the robot must follow a set of given waypoints.

I've read the robot_localization documentation, but I didn't understand how to insert the waypoints as goals for the robot. I know that I need to use navsat_transform_node to obtain the UTM coordinates and then to set a new goal by converting the GPS waypoint coordinates to UTM. But I don't know how to implement this.

Moreover, I've found this package gps_common which subscribes to /fix topic and outputs a /odom topic. Should I use it as input for the ekf_localization node?

Thank you for your help and support!

edit retag flag offensive close merge delete

Comments

1

It is strange to me how something like GPS waypoint following is no clearly documented. I have been trying to make this work on Jackal for some time now and still am having problems. I have gotten about to where you are.

sonyccd gravatar image sonyccd  ( 2017-01-10 09:09:32 -0500 )edit

It is very strange to me, too! This is very strange since there is lots of documentation about all the other ROS topics, but almost nothing about GPS and waypoint. I'm very sad about this since this topic is very important to me.

Marcus Barnet gravatar image Marcus Barnet  ( 2017-01-10 09:28:28 -0500 )edit

All I want, it's to find a short tutorial on how set the waypoints and how to use move_base to make the robot follow them to reach the goal.

Marcus Barnet gravatar image Marcus Barnet  ( 2017-01-10 09:30:11 -0500 )edit

Have you tried this? http://answers.ros.org/question/17013... It does not say much, for that matter none of the answers say much.

sonyccd gravatar image sonyccd  ( 2017-01-14 12:52:57 -0500 )edit

I already read it but it provides no additional information.. it only links to the robot_localization package which I have already read several times :(

Marcus Barnet gravatar image Marcus Barnet  ( 2017-01-14 14:18:10 -0500 )edit

1 Answer

Sort by » oldest newest most voted
3

answered 2017-01-26 03:28:46 -0500

Tom Moore gravatar image

Moreover, I've found this package gps_common which subscribes to /fix topic and outputs a /odom topic. Should I use it as input for the ekf_localization node?

navsat_transform_node's job is to convert the GPS data into a nav_msgs/Odometry message so it can be fused into an EKF instance, so you don't need any external packages for that. But that's unrelated to GPS waypoint following. robot_localization and navsat_transform_node are just giving you a state estimate.

move_base requires goals to be in the robot's world frame, or a frame that can be transformed to the world frame. When you run navsat_transform_node, it generates a world_frame->utm transform. Therefore, if you can create a geometry_msgs/PoseStamped or move_base_msgs/MoveBaseGoal message with the UTM coordinates of the goal (and a frame_id of utm), I believe move_base will use that transform to convert it.

So the problem boils down to retrieving UTM coordinates from your GPS coordinates, and then packing those UTM coordinates into a goal message and firing it off to move_base. It occurs to me that this might make a handy service for navsat_transform_node, but free time being what it is(n't), you'll have to do this conversion yourself for now. Fortunately, there are a couple libraries that do this. navsat_transform_node itself uses a header file called navsat_conversions.h (credit to Chuck Gantz for the functionality contained in this header). You can include that header file and call the function I've linked, and it will give you what you want.

You'll obviously have to write a node that subscribes to a NavSatFix and then publishes a goal to move_base, but that should be fairly straightforward.

edit flag offensive delete link more

Comments

So, do I need to output a /odometry/filtered by fusing encoders and IMU in ekf_localization_node and then make the navsat_transform_node subscribe to this? Then, how can I use /odometry/gps and /gps/filtered? Do I have to use them to create a new ekf_localization_node istance with only GPS data?

Marcus Barnet gravatar image Marcus Barnet  ( 2017-01-26 04:07:50 -0500 )edit
1

/odometry/gps gets fed right back into the same EKF to which it is subscribing. You can run a two-tier setup with just odom and IMU in the first tier and odom, IMU, and GPS in the second, but you don't have to. /gps/filtered just gives you the fused state estimate as GPS coords.

Tom Moore gravatar image Tom Moore  ( 2017-01-26 04:36:05 -0500 )edit
2

Cont'd: You don't need them, which is why the publication is optional. It's just handy if you have some other node that needs your GPS position.

Tom Moore gravatar image Tom Moore  ( 2017-01-26 04:36:42 -0500 )edit

Thank you a lot! I'm going to try to implement this. Just a question: my GPS system has a sub-inch accuracy while encoders and IMU include always errors (wheel slipping, IMU accumulated errors). Will they affect the GPS readings since they are fused together in ekf_localization_node?

Marcus Barnet gravatar image Marcus Barnet  ( 2017-01-26 18:22:05 -0500 )edit

Continued: I'm asking this since I would like to make the robot consider the goal as reached only when the current GPS coordinates read by the robot will be equal to the given goal GPS coordinates.what happen if the robot moves on a wet surface with a high slipping effect? Will this affect the GPS?

Marcus Barnet gravatar image Marcus Barnet  ( 2017-01-26 18:32:31 -0500 )edit
1

If the robot slips, you may see movement in your state estimate in between GPS readings, but then it will snap/jump back to the correct location when the GPS reading arrives.

Tom Moore gravatar image Tom Moore  ( 2017-02-01 07:07:24 -0500 )edit

@Tom Moore, I'm having problems with my XSENS MTi-10 IMU. It should use ENU standard as the manual reports, so the YAW should outputs 0° when facing EAST, but may be my IMU model do not have orientation output.

Marcus Barnet gravatar image Marcus Barnet  ( 2017-02-22 04:00:08 -0500 )edit

@Tom Moore, I think i'm having problems with my XSENS MTi-10 IMU. It should use ENU standard so the YAW should outputs 0° when facing EAST as reported in the manual, but may be my IMU model do not have orientation output.

Marcus Barnet gravatar image Marcus Barnet  ( 2017-02-22 04:00:20 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2017-01-05 12:13:20 -0500

Seen: 4,310 times

Last updated: Jan 26 '17