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

How to use a ready map (floor plan) for the navigation stack without executing the gmapping?

asked 2017-11-03 05:40:51 -0500

updated 2017-11-03 06:12:46 -0500

Hello to all,

I'm going to need your help and experience in the following topic.

So far, in every single navigation stack tutorial/example that I found, everybody assumes that we have to use the gmapping package to prepare the two require files map.pgm and map.yaml

Then pass this map to a map server and support localisation etc.

In my specific application, it happens to have already the static map which is actually the floor plan of the floor. Therefore, I don't want the robot to build the map and at this stage I need to get this autocad file (which could be exported in a png format) and "convert" it to a ROS map file.

I imagine that I need to pre-proccess it in a way and simplify it that white space is the free space, walls are black lines and gray unknown. Then point to those couple of files (pgm and yaml) map server and continue with localisation and so on.

But what about the scaling? or what about the yaml file and how to populate it? Does anybody has done something similar? Should I do something specific to avoid troubles?

Thanks in advance for your support.

Regards, Angelos

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2018-01-05 01:26:25 -0500

Procópio gravatar image

I imagine that I need to pre-proccess it in a way and simplify it that white space is the free space, walls are black lines and gray unknown. Then point to those couple of files (pgm and yaml) map server and continue with localisation and so on.

You got the idea right. Regarding the question about the yaml, it is quite simple: the origin is up to you, and the resolution is the size in meters of a pixel of your image.

However, beware when using the approach you propose. In a real situation, what the robot "sees" with its sensors is quite different from a perfect map taken from the floor plan. So, even though you'll have a nice map, you may have trouble localizing the robot there due to mismatch of what the robot is expected to "see" and what it is actually "seeing".

An example would be glass walls, which would be in your floor plan but are invisible to a LIDAR.

edit flag offensive delete link more
0

answered 2022-09-30 06:57:11 -0500

Just in case someone comes again to this thread, please visit the following youtube tutorial that describes an interesting approach to this issue.

edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2017-11-03 05:40:51 -0500

Seen: 1,024 times

Last updated: Sep 30 '22