gmapping calculate only first laser scan

asked 2015-01-13 02:59:23 -0500

Oded gravatar image

I've been trying to operate the gmapping package using a hokuyo laser scanner.

I run:

rosrun gmapping slam_gmapping scan:=base_scan

Of course I ran first the laser and a static_tf_publisher between the laser and a base link

rosrun tf static_transform_publisher 0 0 0 0 0 0 base_link laser 100

However, I see, in RVIZ, that the mapping catches only the first laser scan, and the map is never updated. In the terminal I get the following output:

update frame 0
update ld=0 ad=0
Laser Pose= 0 0 0
m_count 0
Registering First Scan

Any Ideas why this might happen?


edit retag flag offensive close merge delete


Do you have odometry?

dornhege gravatar image dornhege  ( 2015-01-13 06:27:32 -0500 )edit

No, the laser is static. Do I need to publish my pose even if I'm not moving?

Oded gravatar image Oded  ( 2015-01-13 06:57:58 -0500 )edit

Yes and no. Gmapping needs to pose to initially match consecutive scans. However, even if you would publish odometry, gmapping limits the updates between moves, i.e. unless odometry says the robot moved a certain amount (linear_update, angular_update params), it won't take the next scan.

dornhege gravatar image dornhege  ( 2015-01-13 08:35:16 -0500 )edit

Could anyone specify a step by step of how to build this map, cause I now tried doing the same at home with a ROS bag of the data and I get TF errors! What should be the hierarchy of this map?

Oded gravatar image Oded  ( 2015-01-17 12:15:45 -0500 )edit