No map in RViz (Tutorial 6)

Hello

I tried the SLAM Tutorial, and I can see laser data but no map is shown.
Because I have no lidar I tried it with some “fake” data from the ultrasonic. Originally I used Sonar to Laser but also with some static laser data.
In both cases I see the laser data but no map is shown.
Any ideas?

Michael

Hello Michael,

I never tried working with Sonar to Laser or static laser data. I am not sure if each of them will be correct.
Do you get any warnings, errors or any other output from gmapping?

Regards,
Łukasz

I don’t see any warning (or maybe I did not find them yet).
Because the laser data itself is shown in both cases, I assume it has something to do with map generation or displaying in rviz.
Could it be a TF thing because of wrong frame_ids (related to my other question)?
Or is there a missing parameter in gmapping or rviz?

Thanks

Michael

Could be problem with tf, gmapping requires the base_link, odom and laser frames to be published. Frame names could be changed to any values you need. You need to make sure, that gmapping is configured with tf names that are already published. In other case gmapping will wait until they are published.

Regards,
Łukasz

Works now. I had probably some wrong frame_ids.

How can I clear a map and produce a new one?

Michael

The gmapping node does not offer possibility to clear map.
Easiest solution to produce new map will be to restart gmapping node.
When you start new node with the same name as currently running, older node will be shut down automatically.

Regards,
Łukasz