0
$\begingroup$

Rosanswers logo

Hello,

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,

Chris


Originally posted by patrchri on ROS Answers with karma: 354 on 2016-08-18

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by patrchri with karma: 354 on 2016-08-27

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.