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

Revision history [back]

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.