Ask Your Question

Hector_slam and hector_navigation implemented together

asked 2016-10-26 08:00:56 -0500

EdCherie gravatar image

updated 2016-10-27 10:20:51 -0500


We are trying to make autonomous vehicle using UTM-30LX range scanner and arduino controlled rover without odometry. We are using hector_slam for creating a map and were thinking of using hector_navigation instead of move_base for pathfinding. We are able to publish /map topic as well create a static map. However, we want to navigate in unknown environment, meaning no static map at the beginning and creating it throughout the movement. The problem we have we don't know how to launch hector_navigation in order to do this action and required topics for it, as well output. We know that it should give /cmd_vel and that's what we are looking for.

EDIT We can see the cmd_vel topic, thats fine. I will try to be more specific what i have trouble with. I have now launched Hector SLAM (hector_mapping, hector_geotiff) and navigation (i found few launch files to start from on the internet. So i use hector_costmap, hector_exploration_node and hector_exploration_controller). What i tried to do is to see visually how the map is being created, so i launched Hector Slam on the rviz and i wanted to give a point where robot should go to see if i get cmd_vel changes. I changed topic of 2D Nav Goal that it would match with the one that is published by hector_exploration_node. However, nothing changes. I wanted to know what I am missing or maybe I am doing something wrong. I have a code that decodes the cmd_vel msg to the way motor controller would get that wheels would spin, but i dont get any changes in the cmd_vel if i set a 2D Nav Goal.

edit retag flag offensive close merge delete


I wander whether the hector_exploration_controller would accept the 2D Nav Goal command because in hector navigation stack, I use the node " simple_exploration_controller". it doesn't accept 2D Nav Goal message. It calls for path planning service periodly.

Tider gravatar image Tider  ( 2017-12-25 22:34:00 -0500 )edit

Did you figure out what theproblem was ? because I am having the same issue and I ran out of ideas

eladdad gravatar image eladdad  ( 2018-05-17 04:28:45 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2020-07-20 03:37:06 -0500

jjbecomespheh gravatar image

Hi @EdCherie, you can take a look at this post the author mentioned using the makePlan() function in the hector_exploration_planner.cpp you can give a goal point for navigation.

You will need to write a simple subscriber to subscribe to the 2D Nav Goal topic and use that to invoke the makePlan() function. I wrote my subscriber in exploration_node.cpp and it works for me.

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-10-26 08:00:56 -0500

Seen: 402 times

Last updated: Jul 20 '20