The difference between the virtual map and the real map

Hi,

After I scan a map, I see the scanned map does not look like the real map. It is quite bended

It is not good, right?
How to fix it?
And in reality, how can we scan a map properly?

Thanks

Hi @NguyenDuyDuc ,

All sensors have errors when they work. Therefore, most scanned maps do not perfectly represent the environments where robots operate.
In my experience, if you want a good map for robots to navigate in the future, this solution might help:

  • Find the directory where the map was saved.
  • Depending on the real environment, edit the .pgm file using an image editor app.
  • Save the map and add the file path to your launch file.

Regards,
Tung Ngo

1 Like

It is not good, right?
No, the map should have at least the shape of the real environment. It doesn’t have to be perfect but this wouldn’t be acceptable for good navigation.

How to fix it?
There are various ways depending on the reason why it happened in the first place. This tends to happen when:

  • The environment is too simetrical and the mapping+localization system get lost or give errors. This can be solved making the environment less symetrical, adding some boxes or even increasing the laser range to allow the robot to localize better without moving so much.
  • The robot crashed onto something when mapping or the wheels skidded for some reason. This normally is solved mapping with care and slowly.

And in reality, how can we scan a map properly?
Mapping is an art in itself. But the best practices are:

  • Map slowly and being sure that the robots wheels don’t skid.
  • Add elements to the environment that make localization easier for the system, basically adding distinct features to the environment.
  • Increas the lasers range, at least that can capture most of the environment in one frame or two. That helps a lot.
  • At the end, maps always need some clean up and fixing, so don’t get obsessed with perfect looking maps. The rule of thumb is: if my robot localises correctly with by ugly map, is good enough.
1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.