0
$\begingroup$

Rosanswers logo

I want to provide a map drawn in CAD software for robot navigation instead of laser scans, is there any package or stack to take the CAD drawn maps for navigation. How to accomplish this task?


Originally posted by Kishore Kumar on ROS Answers with karma: 173 on 2015-08-11

Post score: 0


Original comments

Comment by Airuno2L on 2015-08-11:
Can you be more specific? Are you talking about a 2D CAD drawing? Or a 3D model? How is the map stored? (i.e. what filetype is it saved as?)

Comment by Kishore Kumar on 2015-08-11:
The map is a 2D drawing its like floor plan of an indoor environment, the files will be in typical CAD drawing format Eg: .dae, .stl, .xml.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

For ROS navigation stack, map_server is responsible to read the map. So you need to go through the map_server wiki after reading my answer.

Basically, map_server need two files, i.e a image file and a YAML file. The YAML file describes the map meta-data, and names the image file. The image file encodes the occupancy data.

The image file is the 2D drawing of the map, it is read in via SDL image library. So most popular image formats are widely supported, such as .pgm, .png, .jpg, etc. I don't know if the CAD format is supported, but maybe you can convert the CAD drawing format into regular image format.

In my project, I used the GIMP to draw a map, and output a .pgm image.


EDIT

In the YAML file, there is a param named resolution, which is the resolution of the map, meters / pixel.

For example, the image is 400x300, and resolution=0.1, then your map is 40mx30m.

And my project is not open-source yet.


Originally posted by Shay with karma: 763 on 2016-08-30

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Kishore Kumar on 2016-08-30:
What is the unit of measure should be followed in building our own map how to edit the .yaml file accordingly? can u provide link to your project?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.