In the navigation framework of ROS, how to convert CAD map information collected by GPS into a map in PGM format?

asked 2021-04-13 08:20:28 -0500

alex_zt gravatar image

updated 2021-04-22 11:09:33 -0500

When we use the navigation package of ROS to do the navigation of the car, we need to use the PGM format map information collected by lidar and generate YAML file at the same time. But we want to import CAD maps made with GPS data into ROS for navigation. How can we convert CAD drawings to the accuracy required by YAML files?

I have a map of school's square generated by a GPS measuring instrument. The full size of the square is 71.27m * 59.98m, cad drawing size is 71.27mm * 59.98mm.Then we converted the CAD picture into a JPG format picture, and found that the resolution was not up to the required resolution in the yaml file in ROS. The resolution unit of pgm map in ROS is usually 0.05m/pixel or 0.1m/pixel.

If converted into a picture in PGM format, in order to actually express the actual size we measured (71.27m * 59.98m), according to the requirements of the YAML file (resolution=0.05m/pixel), then the length and height of the picture The quantity should be 1425pixel*1199pixel.Is this method of operation correct? What software should I use to operate in order to achieve the effect I want?

JPG format map collected by gps yaml file in navagation Looking forward to the reply from the experts, thank you!

How can I convert JPG format pictures into PGM pictures required by YAML files?

edit retag flag offensive close merge delete