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

Revision history [back]

Hi, it would help immensely to if you post the launch file for hector_mapping as well.

Anyway, the short answer to resolve the WARN message is to set map as the global_frame in local_costmap.yaml. This is because hector_mapping doesn't always publish the map -> odom transform unless you configured it that way. In your case I'm guessing it only publishes map -> base_link since your robot doesn't have any odometry source. (Setting pub_map_odom_tranform would only configure hector_mapping to publish a transform to the tf tree. I'm assuming you used the option 2 in setting up Hector slam )

The first question, which topic contains the odometry that move_base will use to work? I,ve read that is tf but i've doubts.

move_base always reads the odometry from /tf. But for that to work, another source must broadcast the odometry related transforms to the TF tree. In your setting there's no odometry source and hector_mapping doesn't publish the required transform.

I have also read that you dont need to use AMCL if you are using hector_mapping to run Navigation stack, am i wrong?

You are right. To clarify, Navigation stack requires a localization source and a correct TF tree that has map -> odom -> base_link chain correctly setup. ( Or map -> base_link with global_frame set to map for both costmaps ). hector_mapping is doing SLAM and AMCL is doing localization. So either one of them could be used. The difference is for AMCL you have to provide a map through the map_server to localize against and to use for global_costmap. hector_mapping generates the map that you can use in global_costmap in addition to doing the localization.

I have noticed that the map which hector_mapping is published is not the map i have recorded with map_saver, how can i use that map?

You can't use the pre recorded map when you're using hector_mapping. hector_mapping always generates a new map everytime it is launched. It can't use existing maps. As I said earlier, you can use AMCL instead of hector_slam using the recorded map.

Hope this helps.

Hi, it would help immensely to if you post the launch file for hector_mapping as well.

Anyway, the short answer to resolve the WARN message is to set map as the global_frame in local_costmap.yaml. This is because hector_mapping doesn't always publish the map -> odom transform unless you configured it that way. In your case I'm guessing it only publishes map -> base_link since your robot doesn't have any odometry source. (Setting pub_map_odom_tranform would only configure hector_mapping to publish a transform to the tf tree. I'm assuming you used the option 2 in setting up Hector slam )

The first question, which topic contains the odometry that move_base will use to work? I,ve read that is tf but i've doubts.

move_base always reads the odometry from /tf. But for that to work, another source must broadcast the odometry related transforms to the TF tree. In your setting there's no odometry source and hector_mapping doesn't publish the required transform.

I have also read that you dont need to use AMCL if you are using hector_mapping to run Navigation stack, am i wrong?

You are right. To clarify, Navigation stack requires a localization source and a correct TF tree that has map -> odom -> base_link chain correctly setup. ( Or map -> base_link with global_frame set to map for both costmaps ). hector_mapping is doing SLAM and AMCL is doing localization. So either one of them could be used. The difference is for AMCL you have to provide a map through the map_server to localize against and to use for global_costmap. hector_mapping generates the map that you can use in global_costmap in addition to doing the localization.

I have noticed that the map which hector_mapping is published is not the map i have recorded with map_saver, how can i use that map?

You can't use the pre recorded map when you're using hector_mapping. hector_mapping always generates a new map everytime it is launched. It can't use existing maps. As I said earlier, you can use AMCL instead of hector_slam using the recorded map.

The footprint arg i dont really know what means, may someone explain it please? I have just copied some values i have seen in other post.

It is used to specify what it means, the footprint of the robot. Robots can be of any shape, so during configuration of move_base you have to specify what shape the robot's 2D projection is going to look like. You specify the footprint as a series of points in a polygon (with the 0,0 point being the center of the robot, using the ROS coordinate frame standard https://www.ros.org/reps/rep-0103.html#axis-orientation ) either in clockwise or counter-clockwise direction.

Hope this helps.