Ask Your Question
0

Hector slam with turtlebot in Gazebo

asked 2013-10-29 00:37:13 -0500

Tirjen gravatar image

updated 2013-10-29 01:30:22 -0500

Hello,

I'm trying to properly use Hector slam in simulation using a turtlebot. I'm using ROS hydro and Gazebo 1.9 on ubuntu 12.04. Once I spawned in Gazebo the turtlebot and the world I created, I use this launch file to start hector slam:

<launch>

  <param name="/use_sim_time" value="true"/>

  <node pkg="rviz" type="rviz" name="rviz" 
    args="-d $(find hector_slam_launch)/rviz_cfg/mapping_demo.rviz"/>

  <include file="$(find hector_mapping)/launch/mapping_default.launch">
    <arg name="odom_frame" value="odom"/>
  </include>

   <arg name="trajectory_source_frame_name" value="scanmatcher_frame"/>
   <arg name="trajectory_update_rate" default="4"/>
   <arg name="trajectory_publish_rate" default="0.25"/>

 <node pkg="hector_trajectory_server" type="hector_trajectory_server" name="hector_trajectory_server" output="screen">
    <param name="target_frame_name" type="string" value="map" />
    <param name="source_frame_name" type="string" value="$(arg trajectory_source_frame_name)" />
    <param name="trajectory_update_rate" type="double" value="$(arg trajectory_update_rate)" />
    <param name="trajectory_publish_rate" type="double" value="$(arg trajectory_publish_rate)" />
  </node>


  <node pkg="hector_geotiff" type="geotiff_node" name="hector_geotiff_node" output="screen" launch-prefix="nice -n 15">
    <remap from="map" to="/dynamic_map" />
    <param name="map_file_path" type="string" value="$(find hector_geotiff)/maps" />
    <param name="map_file_base_name" type="string" value="hector_slam_map" />
    <param name="geotiff_save_period" type="double" value="0" />
    <param name="draw_background_checkerboard" type="bool" value="true" />
    <param name="draw_free_space_grid" type="bool" value="true" />
  </node>

</launch>

The slam seems to work when I navigate the robot around, but I'm very surprised by the bad result compared to gmapping. It get lost very easily and the map is very bad. I would like to know if I set up something in the wrong way, or if it depends from the fact that I'm using a fake laser from kinect or maybe that the world in gazebo I created is challenging for hector slam.

EDIT:

If I move the robot only forward/backward the map is correctly reconstructed, but if I make the robot rotate on itself it prints 'SearchDir angle change too large' and it gets totally lost (sometimes it makes position jumps up to 1 meter and more!!).

This is the world I'm using in gazebo: image description

Many thanks!!

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2013-10-29 01:36:25 -0500

It´s recommended to use gmapping if you´re using a Kinect and have a robot that provides odometry. hector_mapping does not work very well with the narrow FOV of the Kinect. See also this Q/A.

edit flag offensive delete link more

Comments

Thank you for your answer! Actually I was using hector slam as first step in simulation, but the final purpose was to try to use it for localization (in place of amcl) on a corobot (which has bad odometry and xtion sensor). I think I will search for another solution! thank you! :)

Tirjen gravatar imageTirjen ( 2013-10-29 02:55:03 -0500 )edit

Your Answer

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

Add Answer

Question Tools

2 followers

Stats

Asked: 2013-10-29 00:37:13 -0500

Seen: 1,986 times

Last updated: Oct 29 '13