Synthetic laser measurements from occupancy grid map, this code generates synthetic laser measurement data from an occupancy grid map
When you run the FakeLaserRead.m script
- Reads map from a file with ".pgm" extension and its properties from a file with ".yaml" extension
- Asks to select a suitable free point on the map
- Generates synthetic laser measurements according to laser scanner range and resolution settings
- Draws the selected point (blue color), synthetic laser measurements (red color), and laser range circle (dashed-black color) on the map
Example for mymap in maps folder
1) Asking point selection for maps/mymap
2) Drawn synthetic laser measurements for maps/mymap, laserRange = 5 m, laserResolution = 0.25 degrees
Example for mymap2 in maps folder
1) Asking point selection for maps/mymap2
2) Drawn synthetic laser measurements for maps/mymap2, laserRange = 30 m, laserResolution = 0.25 degrees
Please note that existing codes are used at 1 to read the YAML file and at 2 to plot Bresenham's Line for the four quadrants.