Skip to content

Latest commit

 

History

History
33 lines (20 loc) · 1.67 KB

File metadata and controls

33 lines (20 loc) · 1.67 KB

synthetic_laser_measurement_MATLAB

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

  1. Reads map from a file with ".pgm" extension and its properties from a file with ".yaml" extension
  2. Asks to select a suitable free point on the map
  3. Generates synthetic laser measurements according to laser scanner range and resolution settings
  4. 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.

Footnotes

  1. https://github.com/llerussell/ReadYAML

  2. https://github.com/ashiagarwal73/Bresenham-s-line-algorithm-for-all-quadrants