A Simulator for Autonomous Ground Vehicles
This code can be used to generate LIDAR output for scans of user-defined rough surfaces. Many instances of rough surfaces will be created and scanned, allowing the user to compile statistics of multiple scans.
The example can be run by typing
> ./path_to_mavs_install/build/bin/examples/lidar_roughness_analyzer input_file.json
The input file is a json file that contains values for the parameters of the simulation. Examples are in path_to_mavs_install/data/sims/misc_sims/lidar_roughness.
Note that there are slight differences in the meaning of the Frequency and Magnitude parameters when perlin and gaussian noise are used. For gaussian noise, Magnitude is taken to be the RMS magnitude of the noise. This means that there may be elevations higher than the value of Magnitude, whereas for Perlin noise, the highest elevations will be equal to Magnitude. Similarly, for Gaussian noise, Frequency is set equal to 1/(ACL) where ACL is the autocorrelation length of the terrain.
For each scan, three output files are saved. The first is a rendering of the scene from the position of the lidar sensor and the second is a top down view of the point cloud (see images below). The last output is a text file (with .pts extension). There are 4 columns in the file corresponding to x-y-z-intensity. The points are registered in world coordinates.