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

problem with hector slam

asked 2015-04-25 02:47:53 -0500

MarkyMark2012 gravatar image

updated 2015-04-26 03:51:49 -0500

HI All,

I'm hoping someone might be able to help. I've been trying to get gmapping working ut the update rates was incredibly slow (~5 seconds from moving the robot to the map moving) so I'm giving the hector slam ago.

This problem must be due to the tf I'm publishing, I'm just not sure what hector slam actually needs me to publish vs what is will publish for itself.

I'm starting it with the standard (i.e. I've changed nothing):

roslaunch hector_slam_launch tutorial.launch

I'm have made the tf as simple as possible image description

UPDATE (With updated static tf): image description

And my system graph looks like:

image description

Hector slam doesn't seem to be doing anything. All I get printed out is:

process[rviz-1]: started with pid [8374]
process[hector_mapping-2]: started with pid [8375]
process[hector_trajectory_server-3]: started with pid [8379]
process[hector_geotiff_node-4]: started with pid [8383]
[ INFO] [1429946593.528284272]: Waiting for tf transform data between frames /map and scanmatcher_frame to become available
[ INFO] [1429946594.644483794]: Successfully initialized hector_geotiff MapWriter plugin TrajectoryMapWriter.
[ INFO] [1429946594.644839942]: Geotiff node started
HectorSM map lvl 0: cellLength: 0.05 res x:2048 res y: 2048
HectorSM map lvl 1: cellLength: 0.1 res x:1024 res y: 1024
[ INFO] [1429946598.082143817]: HectorSM p_base_frame_: base_footprint
[ INFO] [1429946598.082288732]: HectorSM p_map_frame_: map
[ INFO] [1429946598.082325095]: HectorSM p_odom_frame_: nav
[ INFO] [1429946598.082375357]: HectorSM p_scan_topic_: scan
[ INFO] [1429946598.082410037]: HectorSM p_use_tf_scan_transformation_: true
[ INFO] [1429946598.082460158]: HectorSM p_pub_map_odom_transform_: true
[ INFO] [1429946598.082495348]: HectorSM p_scan_subscriber_queue_size_: 5
[ INFO] [1429946598.082536563]: HectorSM p_map_pub_period_: 2.000000
[ INFO] [1429946598.082575411]: HectorSM p_update_factor_free_: 0.400000
[ INFO] [1429946598.082610219]: HectorSM p_update_factor_occupied_: 0.900000
[ INFO] [1429946598.082670763]: HectorSM p_map_update_distance_threshold_: 0.400000 
[ INFO] [1429946598.082713224]: HectorSM p_map_update_angle_threshold_: 0.060000
[ INFO] [1429946598.082752979]: HectorSM p_laser_z_min_value_: -1.000000
[ INFO] [1429946598.082792572]: HectorSM p_laser_z_max_value_: 1.000000
[ WARN] [1429946613.537432314]: No transform between frames /map and scanmatcher_frame available after 20.009908 seconds of waiting. This warning only prints once.

If anyone could advise on what I need to correct I'd be most grateful

Kind Regards

Mark

edit retag flag offensive close merge delete

Comments

Which frame is your scanner publishing in? (look at the frame_id in the header) It probably can't find the transform between your laser scanner and the rest of the robot.

ahendrix gravatar image ahendrix  ( 2015-04-25 04:07:11 -0500 )edit

It's been derived from depthimage_to_laserscan which is defaulting to frame_id: camera_depth_frame

MarkyMark2012 gravatar image MarkyMark2012  ( 2015-04-25 06:14:26 -0500 )edit
1

You static transform broadcaster should probably be broadcasting the transform between base_link and camera_depth_frame, if your data is in the camera_depth_frame.

ahendrix gravatar image ahendrix  ( 2015-04-25 16:21:31 -0500 )edit

I've updated the static broadcast - I'm still not seeing anything :(. Looking at other posts I've ensured that rviz has the map topic added. At the moment I've not getting "No transform from [map] to [base_link]" I assumed that hector_slam provides this once it's working?

MarkyMark2012 gravatar image MarkyMark2012  ( 2015-04-26 03:54:20 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2015-04-26 04:38:32 -0500

ahendrix gravatar image

From looking at the hector_slam tutorials, it looks like you need to set some parameters to tell hector_slam which tf frames it should be using: http://wiki.ros.org/hector_slam/Tutor...

edit flag offensive delete link more

Comments

Any fix for this? I am having the same problem and tried adding the following line to my tutorial.launch file but it still produced the same error:

<param name="pub_map_odom_transform" value="true"/>
<param name="map_frame" value="map" />
<param name="base_frame" value="base_link" />
Gabee gravatar image Gabee  ( 2016-08-03 07:16:22 -0500 )edit

When I run roslaunch hector_slam_launch tutorial.launch and then view frames, there is no map tf frame being displayed.

Gabee gravatar image Gabee  ( 2016-08-03 07:44:09 -0500 )edit

@Gabee: please ask a new question.

ahendrix gravatar image ahendrix  ( 2016-08-03 11:25:32 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-04-25 02:47:53 -0500

Seen: 2,071 times

Last updated: Apr 26 '15