Hector_slam and hector_navigation implemented together
Hey,
We are trying to make autonomous vehicle using UTM-30LX range scanner and arduino controlled rover without odometry. We are using hectorslam for creating a map and were thinking of using hectornavigation instead of movebase 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 hectornavigation 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 cmdvel topic, thats fine. I will try to be more specific what i have trouble with. I have now launched Hector SLAM (hectormapping, hectorgeotiff) and navigation (i found few launch files to start from on the internet. So i use hectorcostmap, hectorexplorationnode and hectorexplorationcontroller). 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 cmdvel changes. I changed topic of 2D Nav Goal that it would match with the one that is published by hectorexplorationnode. 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 cmdvel 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.
Asked by EdCherie on 2016-10-26 08:00:56 UTC
Answers
Hi @Edcherie, you can take a look at this post https://answers.ros.org/question/173780/give-manual-goal-to-hector-exploration-planner/ 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.
Asked by jjbecomespheh on 2020-07-20 03:37:06 UTC
Comments
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.
Asked by Tider on 2017-12-25 23:34:00 UTC
Did you figure out what theproblem was ? because I am having the same issue and I ran out of ideas
Asked by eladdad on 2018-05-17 04:28:45 UTC