simul-beacons
Generates a synthetic dataset of a robot moving along a predefined path (a circle or a square) in a 2D world with randomly placed beacons, measuring the range to each beacon (range-only sensing, e.g. radio or UWB beacons). Use it to test range-only SLAM and localization methods, such as those in rbpf-slam and ro-localization, with known ground truth.
Usage
simul-beacons <config_file.ini>
config_file.ini: the simulation parameters (see below).--help,--version.
Each run uses a different random seed, so the beacon positions and noise change between runs.
Example
Using the sample config file in mrpt_data :
simul-beacons config_files/simul-beacons/example_simul-beacons.ini
This creates the directory OUT with:
simBeaconPath.rawlog: the simulated dataset.outSimMap.txt: the ground truth beacon map: one row per beacon, with its ID,X Y Zcoordinates and (all zero) covariance terms.
Configuration file
All parameters are read from the [Params] section:
Key |
Default |
Description |
|---|---|---|
|
|
Output directory (created if it does not exist). |
|
|
Output rawlog file name, inside |
|
3 |
Number of beacons. |
|
-5, 5, -5, 5 |
Area (m) where beacons are placed, uniformly at random. |
|
0, 0 |
The z coordinate (m) of the beacons is drawn uniformly in [ |
|
100 |
Number of time steps to simulate. |
|
true |
Path type: true for a circle (0.2 m and 5 deg per step), false for a square. |
|
40 |
Steps per side of the square path (0.2 m per step); the last 4 steps of each side make a 90 deg turn in place. |
|
0.001 |
Odometry noise (m, 1 sigma) in x and y per step. |
|
0 |
Constant bias (m) added to the y odometry increment per step. |
|
0, 10 |
Range (m) within which beacons are detected. |
|
0.04 |
Range noise (m, 1 sigma). |
|
0 |
Probability of a range being an outlier. |
|
0 |
Same, for the first time step only. |
|
0, 5 |
Outliers are generated by adding a uniform random error (m) in this interval. |
The robot stays still during the first 4 steps.
Output format
The rawlog is in the “actions-sensory frames” format (see the rawlog format). Each step has:
An mrpt::obs::CActionCollection with one mrpt::obs::CActionRobotMovement2D (the noisy odometry increment).
An mrpt::obs::CSensoryFrame with one mrpt::obs::CObservationBeaconRanges (the noisy ranges to all beacons within the sensor range, with their IDs).
See also
app_simul-landmarks: similar simulator, for range-bearing landmarks.