This repository contains a ROS 2 Humble port of the RACER multi-drone exploration demo. The main runnable scenario is the pillar-map demo with four simulated drones, local point-cloud sensing, RACER exploration/planning, and RViz2 visualization.
This port is based on the original Robotics-STAR-Lab/RACER codebase, which implements rapid collaborative exploration with a decentralized multi-UAV system.
Latest headless pillar-demo benchmark, generated on 2026-05-26 with:
ROS_LOG_DIR=/tmp/racer_ros_logs tools/benchmark_pillar.sh --runs 10 \
--timeout-sec 180 --output benchmark_results/pillar_runs_10.csv \
--log-dir benchmark_results/logs_10| Runs completed | Completion modes | Avg exploration time | Avg total path length | Avg wall time | Avg coverage |
|---|---|---|---|---|---|
| 10/10 | 9 no_grid, 1 stable_metrics |
45.520 s | 147.016 m | 50.782 s | 94.345% |
| Metric | Mean | Median | Min | Max | Stddev |
|---|---|---|---|---|---|
| Exploration time (s) | 45.520 | 43.112 | 38.735 | 62.537 | 6.875 |
| Total path length (m) | 147.016 | 145.374 | 128.024 | 169.468 | 11.281 |
| Coverage (%) | 94.345 | 94.401 | 93.564 | 95.001 | 0.511 |
All commands below are meant to be run from the repository root. The commands use relative paths only.
Use a terminal where ROS 2 Humble is already available.
Check the shell first:
ros2 --help
colcon --helpInstall common build tools if needed:
sudo apt update
sudo apt install python3-colcon-common-extensions python3-rosdepInstall package dependencies:
rosdep update
rosdep install --from-paths src --ignore-src -r -yYou also need a desktop session or X server for RViz2.
Build only the ROS 2 packages under src:
colcon build --symlink-install --base-paths src
source install/setup.bashUse a smaller rebuild while editing the demo:
colcon build --symlink-install --base-paths src \
--packages-select plan_env exploration_manager
source install/setup.bashStart the pillar demo with RViz2:
source install/setup.bash
ros2 launch exploration_manager racer_pillar.launch.pyRun without RViz2:
source install/setup.bash
ros2 launch exploration_manager racer_pillar.launch.py rviz:=falseIf RViz2 has rendering problems, force software rendering:
source install/setup.bash
LIBGL_ALWAYS_SOFTWARE=1 ros2 launch exploration_manager racer_pillar.launch.py \
rviz_gl_vendor:=mesaThe launch waits for a goal on move_base_simple/goal.
In RViz2:
- Wait for the map and display tree to load.
- Select
2D Goal Pose. - Click near the center of the map and drag to set the heading.
From another terminal:
source install/setup.bash
timeout 10 ros2 topic pub -r 10 move_base_simple/goal \
geometry_msgs/msg/PoseStamped \
"{header: {frame_id: world}, pose: {position: {x: 0.0, y: 0.0, z: 1.0}, orientation: {w: 1.0}}}"The repeated publish gives all four exploration nodes time to receive the same start goal.
The demo starts:
map_generatorfor the pillar map.- Four
exploration_nodeprocesses. - Four
traj_serverprocesses. - Four
poscmd_2_odomlightweight simulator processes. - Four
pcl_render_nodelocal sensing processes. - Four odometry visualization nodes.
When exploration finishes, each exploration node prints No grid. The
trajectory servers also print one summary line per drone:
Drone <id>, [<time>,<length>,<velocity>,<energy>], [time, length, vel, energy]
A typical pillar run finishes in about 40-60 s, but timing and path length
vary because planning and map updates are not deterministic.
Run repeated clean headless trials and write CSV/log output under
benchmark_results:
source install/setup.bash
python3 tools/benchmark_pillar.py --runs 5 --timeout-sec 120 \
--output benchmark_results/pillar_runs.csv \
--log-dir benchmark_results/logsFor a longer run:
source install/setup.bash
python3 tools/benchmark_pillar.py --runs 10 --timeout-sec 180 \
--output benchmark_results/pillar_runs_10.csv \
--log-dir benchmark_results/logs_10The CSV includes exploration time, total path length, wall time, completion mode, and per-drone coverage percentages.
rviz:=true
rviz:=false
rviz_gl_vendor:=mesa
coverage_metrics:=true
coverage_report_interval_sec:=1.0
show_grid_text:=trueHGrid debug text labels are hidden by default. Set show_grid_text:=true
when you want the numbered grid IDs in RViz2.
Example with coverage logs enabled:
source install/setup.bash
ros2 launch exploration_manager racer_pillar.launch.py \
coverage_metrics:=true coverage_report_interval_sec:=1.0If ros2 cannot find exploration_manager, source the workspace again:
source install/setup.bashIf colcon reports duplicate package names, make sure the build command uses
--base-paths src.
If exploration does not start, publish the goal again:
source install/setup.bash
timeout 10 ros2 topic pub -r 10 move_base_simple/goal \
geometry_msgs/msg/PoseStamped \
"{header: {frame_id: world}, pose: {position: {x: 0.0, y: 0.0, z: 1.0}, orientation: {w: 1.0}}}"If RViz2 opens but the scene is blank, check that demo topics are present:
source install/setup.bash
ros2 topic list | grep -E "map_generator|sdf_map|planning_vis|odom_visualization"Stop a run with Ctrl-C in the launch terminal. Start a fresh terminal, source
install/setup.bash, and launch again for a clean interactive run.
