ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

hector_slam with odometry?

asked 2013-06-03 05:28:24 -0600

madmax gravatar image

updated 2013-06-05 02:49:19 -0600

Hi,

My data is from a big tunnel, about 700m long, and I want to do some mapping.
The problem is, that each scan looks nearly the same, with no big changes and the scanmatcher without odometry has some problems...
The robot thinks he is always standing at the same position instead of driving forwards.

Soon as I am in the tunnel, scanmatcher seems to overrule the odometry data and the robot is not moving any farther.
Is it possible to change that or somehow deactivate scanmatching?

 <launch>

 <node pkg="tf" type="static_transform_publisher" name="scanmatcher_odom_broadcaster" args="0 0 0 0 0 0 odom map
100"/> 
 <node pkg="tf" type="static_transform_publisher" name="scanmatcher_baselink_broadcaster" args="0 0 0 0 0 0 scanmatcher_frame base_link 100"/>

 <include file="$(find velodyne_mapping)/launch/assembler_to_2d_laser.launch"/>  

 <node pkg="hector_mapping" type="hector_mapping" name="hector_mapping" output="screen">


<param name="pub_map_odom_transform" value="false"/>
<param name="base_frame" value="base_link" />
<param name="odom_frame" value="odom"/>
<param name="output_timing" value="false"/>

<param name="scan_topic" value="scan"/>

# Map size / start point 
<param name="map_resolution" value="0.1"/>
<param name="map_size" value="4096"/>
<param name="map_start_x" value="0.5"/>
<param name="map_start_y" value="0.5" />

# Map update parameters 
<param name="update_factor_free" value="0.4"/>
<param name="update_factor_occupied" value="0.9" />    
<param name="map_update_distance_thresh" value="0.4"/>
<param name="map_update_angle_thresh" value="0.06" />


 </node>

 </launch>

image description

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
5

answered 2013-06-05 03:11:36 -0600

updated 2013-06-05 03:14:46 -0600

Ok, I should probably update the documentation to state this more clearly: The odom frame is used in hector_mapping mainly to provide the same interface as gmapping does. Internally, odometry is completely ignored for mapping currently and just used to be able to publish the map->odom transform correctly. This is advantageous if you can't rely on odometry, but obviously a disadvantage in this tunnel scenario. Support for odometry could be added, but that will require some effort (if someone wants to look at it :) ).

That being said, I'm pretty sure I know which robot was used for this dataset and with the ton of sensors you strapped onto it there are a lot of other approaches you could try. The Velodyne data plus some registration approach (for example ethzasl_icp_mapping) would be my first try.

edit flag offensive delete link more

Comments

Thank you! That clears all up. Will have a look at it.

madmax gravatar image madmax  ( 2013-06-05 04:22:34 -0600 )edit
0

answered 2013-06-03 05:42:07 -0600

allenh1 gravatar image

Yes, you certainly can use odometry.

In your launch file, you will need to set up the following parameters to the correct tf frames for your platform. If you don't have a launch file, I'd make one. Also, take a look at the pr2 launch file that comes with hector_slam. It uses the robot's odometry.

<param name="pub_map_odom_transform" value="true"/>
<param name="map_frame" value="map" />
<param name="base_frame" value="base_frame" />
<param name="odom_frame" value="odom" />

PS: that's a HUGE tunnel.

edit flag offensive delete link more

Comments

I tried that, but I somehow have a scanmatcher frame parallel to my base_link. Should I just rename this frame to base_link? Yeah, the tunnel is about 1.6km or so, but we went "only" till the middle...

madmax gravatar image madmax  ( 2013-06-03 06:20:47 -0600 )edit

Yes, that should work.

allenh1 gravatar image allenh1  ( 2013-06-03 06:23:33 -0600 )edit

Na, it didn't work...

madmax gravatar image madmax  ( 2013-06-05 02:44:21 -0600 )edit

pub_map_odom_transform is for publishing odom tf, not to use odometry for hector slam

bvbdort gravatar image bvbdort  ( 2014-09-18 04:29:18 -0600 )edit

@madmax So, instead of using hector SLAM, did you try fusing odometry and IMU and then using Gmapping?

tsdk00 gravatar image tsdk00  ( 2019-03-26 11:11:15 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2013-06-03 05:28:24 -0600

Seen: 5,896 times

Last updated: Jun 05 '13