Robotics StackExchange | Archived questions

gmapping calculate only first laser scan

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 statictfpublisher 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?

Thanks

Asked by Oded on 2015-01-13 03:59:23 UTC

Comments

Do you have odometry?

Asked by dornhege on 2015-01-13 07:27:32 UTC

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

Asked by Oded on 2015-01-13 07:57:58 UTC

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.

Asked by dornhege on 2015-01-13 09:35:16 UTC

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?

Asked by Oded on 2015-01-17 13:15:45 UTC

Answers