Robotics StackExchange | Archived questions

How to fine tune hector mapping

I'm trying to use RGB-D camera + hectormapping 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 hectormapping.
image description
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.
image description
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?

Asked by Josper on 2017-06-14 05:01:50 UTC

Comments

Answers

This is an old post but for anyone may looking for it:

Tuning Hector is related to the movement of the LiDAR sensor, the resolution of the LiDAR and sometimes the environment.

Typically, I feel that if LiDAR is not fixed on a moving platform or if the platform is moving brutally, you need to watch carefully with the laser_max_dist and laser_min_dist as well as update_factor_free and update_factor_free. You need to think about how many points you need to include in each scan and if they are in a valid sweep at all.

Sometimes map_resolution helps too if you know the feature of your environment. lower it to a reasonable size definitely contribute to the processing speed. you can pair it with map_size to manage the total map size yet still remain reasonable features.

In case you find your mapping twisted or kidnapped when the pose turning, then play with map_update_angle_thresh and map_update_distance_thresh.

after all, map_multi_res_levels is the key if your system poses joggling back and forth. but I feel you should not go more than 3.

Asked by LucasGoei on 2020-02-09 19:25:31 UTC

Comments