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

Gmapping and cartographer build massive map

asked 2019-10-16 16:36:31 -0500

Sam.Z gravatar image

Hello, I am trying to scan a map of my lab. I've tried gmapping and google cartographer, and they both have the same problem. The map was spinning when I rotated my robot. And the laser points does match the map. Could any one help with this problem? Thanks!

Screenshot: https://ibb.co/7gwNrCZ

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-10-20 17:57:27 -0500

fergs gravatar image

First off, in RVIZ, change the "fixed frame" in "Global Options" (the left side panel) to "map" rather than "base_link". This will then display the laser and map data in the proper frame. This should then have the laser data line up with the map (when you stop the robot).

Now the next problem is probably related to your odometry. Before even trying to map, I would try this experiment:

  • Set the "fixed frame" to "odom" (or whatever the TF frame of your odometry is)
  • Change the "decay time" for your laser visualization (also in the left side panel, expand the LaserScan to see options) to a high number - say 100.
  • Rotate the robot

This will cause RVIZ to display all of your laserscans, transformed only by the odometry. If your odometry is good, the various laser scans will line up relatively closely (there will always be some drift, but you should still see the outline of the room you are in fairly clearly). Your scans probably won't line up - but you can re-run this experiment as you tune the odometry. Once you have decent odometry, the scan matcher will be more able to actually line up the scans and build a reasonable map.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-10-16 16:36:31 -0500

Seen: 497 times

Last updated: Oct 20 '19