2D laser scan based dataset generator for ROS
Currently, there are a few public datasets are available for 2D laser scan based SLAM algorithms evaluation. Most common datasets are MIT Stata Center and Willow Garage. Another example is the repository that provides a set of sequences which are popular in SLAM research. However, the sequences are provided in the CARMEN format that is not convenient to use in ROS. Moreover, the mentioned datasets do not contain sequences with special cases such as long featureless corridors, environments with patterns or with a lot of dynamic objects, omni-wheeled robots, etc. Such cases may be difficult to process for a SLAM algorithm, yet are common for the real world. So evaluation of SLAM algorithms in such environments is essential for the algorithm quality and robustness estimation.
This tool is designed to create 2D laser-based sequences that can be used to evaluate SLAM algorithms. It provides GUI that allows to draw a robot trajectory on a map, add obstacles (static or dynamic), set simulation parameters (such as robot speed, odometry or laser noise) and generate the sensor data as the robot moves through the environment. The output sequences are stored in the BAG format along with ground truth data in the TUM format.
The tool uses Stage as the underlying simulator.
Warning: the tool currently supports only raster maps and raster-based simulation (limitations of the underlying simulator).
Warning: the tool is in active development so bugs or glitches are possible.
Note: current Stage version contains critical bugs that prevent the direct use of Stage distribution. This tool is provided with the patch that should be applied to Stage sources in order to build it (see Building).
Note: the tool uses cmake build system.
Note: a compiler must support C++14 in order to build the tool (e.g. gcc >= 5)
- install dependencies except Stage (refer to provided links)
- the script downloads Stage 4.3, applies the provided patch
./3rdparty/stage.patch, builds and installs Stage (
make && make install) to
- note: you can manually download and install Stage, but in this case you should pass additional variable to
cmakewhen building the tool:
- the script downloads Stage 4.3, applies the provided patch
Launch program (see the image below):
Optionally you can specify the path to a map image file to load right after the program launch.
Load base map
In the menu select
File -> Load map (
Ctrl + O) to choose and load a map. The map should be a raster image (
Set the simulation settings
Set the simulation settings on the
Output- uncheck to disable bag file generation;
Bag- specify the path to the output bag file;
Ground truth- check to generate ground truth in TUM format (will be placed in the same directory as the bag file);
Visualization- uncheck to disable visualization of the simulation process for speed up;
World update rate- the world redraw rate (determines fps);
Map resolution- the resolution of the loaded map in meters per pixel;
Simulation interval- the simulation process discretization (see
<interval_sim>in the Stage docs);
Max avoidance tries- maximum robot tries to avoid an obstacle. If a robot cannot avoid an obstacle in the specified number of tries, the simulation process will stop;
Laser scannersensor settings:
Range- minimum and maximum measurable ranges of the sensor (see
range_maxin the ROS LaserScan message);
FOV- the sensor field of view (in degrees);
Samples- the number of measurements in a
LaserScanmessage (together with
angle_incrementvalues of a
Sensor noise- check to simulate sensor noise:
Type- the noise model; currently only the noise model provided by Stage is supported;
A- constant, proportional and angle components of the noise (see the
noiseparameter description for details).
Add a robot
In the toolbar select
Add object -> Add robot (
Alt + R) and then double click on a free space of the map to add a robot. Note: currently only a single robot can be simulated. Click on the robot to edit its parameters (see the picture below):
Color- the robot color;
Size Y- the size of robot's bounding box used by OMPL to plan the movement. Note: currently the robot considered to have a rectangular shape;
Drive- the robot drive type: differential or omnidirectional;
lin- the maximum linear speed of the robot;
ang- the maximum angular speed of the robot;
Odometry noise- check to simulate odometry sensor noise (see
lin- the linear component of the noise model;
ang- the angular component of the noise model.
Set the robot trajectory
Set trajectory (
Alt + T) tool in the toolbar, then click on a robot to to edit robot's trajectory. Double click on a free space of the map to add a waypoint.
OMPL will try to generate the path between the newly added and previous waypoints. You can select the newly added waypoint and then the following actions are available:
- drag the waypoint to another location (the path between affected waypoints will be re-generated) or click the
Updatebutton beside the waypoint to re-generate the path;
- update the robot pose that corresponds to the waypoint by dragging the green handle;
- remove the waypoint by pressing the
Removebutton beside it or by pressing the
Deletekey. If all robot's waypoints are deleted then the robot itself will be deleted from the map.
OMPL cannot generate the path then waypoints will be connected by the red line. In this case, try to reposition one of the waypoints.
Simulate the world
When the robot trajectory has at least 2 waypoints and the path between them is valid, then the world simulation becomes available. Click the
Simulate button to start the simulation. The progress bar beside the button shows the simulation progress. The simulation can be automatically interrupted if the robot cannot avoid some of the obstacles.
Optionally you can add extra obstacles on the map. Select the
Add object -> Add obstacle (
Alt + O) tool and then double click on a free space of the map - a default obstacle will be added to the map. Select the obstacle to configure its parameters:
Shape- the object shape:
custom. You can choose an arbitrary pixmap that represents object's shape. Press
...to choose another shape.
static- the object is static;
rand. speed- the object randomly changes its linear and angular speeds;
rand. pose- the objects randomly chooses a point on the map and moves to that point;
trajectory- the object moves along the specified trajectory;
- other parameters are common with robot parameters.
You also can edit obstacle size and origin by dragging a respective handle when the obstacle is selected. You can set obstacle's trajectory in the same way as robot's.
The output bag file contains the following topics:
sensor_msgs::LaserScan) - provides laser scan measurements;
tf::tfMessage) - provides the following transforms:
base_footprint -> base_link- always identity transform;
odom_combined -> base_footprint- estimated robot pose.
Ground truth files
The output ground truth file contains the ground truth robot trajectory in the following format:
timestamp tx ty tz qx qy qz qw
timestamp- message time stamp (same as in a bag file);
tx ty tz- robot position in robot's coordinate frame;
qx qy qz qw- robot orientation as quaternion.
The following major features are planned for implementation:
- freehand trajectory drawing;
- looped trajectories;
- smart obstacle avoidance;
- multiple robot simulation;
- automatic generation of a sequence according to the specified parameters (e.g. robot trajectory length, number of dynamic objects etc).
- Artur Huletski
- Dmitriy Kartashov
- Kirill Krinkin
Icons made by
Copyright (c) 2018 JetBrains Research, Mobile Robot Algorithms Laboratory