How to fine tune hector mapping
I'm trying to use RGB-D camera + hector_mapping to build occupancy map.
I found that no matter in real world or gazebo world, hector_mapping will sometimes suddenly jump to another position and build map there. Especially when my robot rotates.
Below two image are my gazebo world and the occupancy map build by hector_mapping.
My car started from upper left room to lower left room.
The upper left room looks good, but when my robot went through the door to lower left room, it suddenly jumped far away.
In the real world testing, this situation will happen more often.
Is there any parameter can fine tune this situation?
Or how can I debug this problem?
Here is the hector_mapping parameters I used currently.
<launch>
<node pkg="hector_mapping" type="hector_mapping" name="hector_mapping" output="screen">
<param name="pub_map_odom_transform" value="true"/>
<param name="map_frame" value="map" />
<param name="base_frame" value="base_link" />
<param name="odom_frame" value="odom" />
<param name="map_size" type="double" value="2048"/>
<param name="laser_min_dist" type="double" value="0.5"/>
<param name="laser_max_dist" type="double" value="6.0"/>
<param name="map_update_distance_thresh" type="double" value="0.2"/>
<param name="map_update_angle_thresh" type="double" value="0.06"/>
</node>
</launch>
I also have several parameters which I do not know its usage, hope someone can explain them in more detail.
~map_multi_res_levels (int, default: 3)
The number of map multi-resolution grid levels.
~pub_map_scanmatch_transform (bool, default: true)
Determines if the scanmatcher to map transform should be published to tf. The frame name is determined by the 'tf_map_scanmatch_transform_frame_name' parameter.
~tf_map_scanmatch_transform_frame_name (string, default: scanmatcher_frame)
The frame name when publishing the scanmatcher to map transform as described in the preceding parameter.
What is the scanmatcher frame and what's the usage of map multi-resolution grid?