Ask Your Question

Problem with hector autonomous navigation - The robot does not follow the path (Video)

asked 2016-08-18 16:21:35 -0500

patrchri gravatar image

updated 2016-08-26 08:03:46 -0500


I am new to hector_navigation and I am trying to implement autonomous exploration with my 3 wheel robot with a lidar on, using the hector's metapackages.

I ran the following:

  1. Spawn my robot in a custom maze in gazebo

  2. Roslaunch the robot_state_publisher

  3. Rosrun the tf_broadacaster_from_base_link_to_map --> I wrote this node.

  4. Roslaunch hector_mapping mapping_default.launch

  5. Roslaunch hector_exploration_node exploration_planner.launch

  6. Rosrun hector_exploraon_controller simple_exploration_controller

  7. Rviz -->

                            1. display the exploration_path generated.
                            2. display the /hector_exploration_node/global_costmap/costmap map
                            3. display the /hector_exploration_node/global_costmap/footprint polygon
                            4. display /slam_out_pose pose
                            5. display the RobotModel

The robot's orientation and position in gazebo was in perfect coordination with the /slam_out_pose and not with the RobotModel and the /hector_exploration_node/global_costmap/footprint polygon.

The result I got can be seen in this video and now I am confused on what is wrong. I got no errors or warnings from the nodes I ran. Only info about the paths generated and some goals that the robot reached.

Do you have any idea what is the cause of this wrong behavior ?

In case you would like more info about what I did, please comment so I will reedit my question.

Thank you for your time and your answers in advance,


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-08-27 22:11:08 -0500

patrchri gravatar image

updated 2016-08-27 22:12:13 -0500

The wrong behavior is caused because the tf_broadacaster_from_base_link_to_map is a wrong implementation of the connection between the map and the base_link and a really bad idea that I had. As this page indicates, you have to have a map -> base_footprint (map -> odom in case you want to use odometry) transform. This transform can be easily implemented using the hector_mapping launch file.

I tried to create the base_link to map transform because I had some problems (more info in this question) but this goes against the logic that the stack was created. Moving the map in relation to robot just to avoid the odom frame is wrong and it's the reason why I was getting these results.

Anyway, I decided to use odometry just to see what results I can get (before actually solving my issue with the gazebo broadcaster from the differential drive plugin in my urdf model) and after testing the parameters, I managed to made the robot to move along the path and get good autonomous exploration results.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-08-18 16:21:35 -0500

Seen: 672 times

Last updated: Aug 27 '16