ROS 2 Humble + Gazebo Classic + sjtu_drone + OctoMap, packaged as a single Docker environment for the 3D Frontier Explorer project (disaster-response UAV exploration in GPS-denied 3D interiors).
docker compose builddocker compose upLeave this terminal running. Open a browser to:
You will see a Linux desktop. Gazebo and RViz2 will appear here.
Open a container shell:
docker compose exec ros bashInside the container:
cd /root/ros2_ws/src
./frontier_setup.shThis clones dependencies, patches the sjtu_drone URDF to add a VLP-16 LiDAR, and builds all packages. Safe to re-run if the container is recreated.
In a container shell:
cd /root/ros2_ws/src
./collision_avoidance.shIn a container shell:
cd /root/ros2_ws
colcon build --packages-select frontier_explorer_py --symlink-installIn a container shell:
cd /root/ros2_ws
colcon build --packages-select frontier_explorer_py --symlink-installIn a container shell:
source /root/ros2_ws/install/setup.bash
ros2 launch sjtu_drone_bringup sjtu_drone_bringup.launch.pyGazebo and RViz2 should appear in the browser tab.
In a container shell:
source /root/ros2_ws/install/setup.bash
# Takeoff (You can directly enter the command to takeoff)
# ros2 topic pub /simple_drone/takeoff std_msgs/msg/Empty "{}" --once
# Publish the velodyne_link → base_footprint static transform
ros2 run tf2_ros static_transform_publisher \
0 0 0.10 0 0 0 simple_drone/base_footprint velodyne_linkIn a container shell:
source /root/ros2_ws/install/setup.bash
ros2 run octomap_server octomap_server_node --ros-args \
-r cloud_in:=/simple_drone/velodyne_points \
-p frame_id:=simple_drone/odom \
-p resolution:=0.1 \
-p sensor_model.max_range:=25.0 \
-p use_sim_time:=true \
-p publish_free_space:=true
publish_free_space:=trueis required for the frontier extractor.
In a container shell:
source /root/ros2_ws/install/setup.bash
ros2 launch frontier_explorer_py frontier_extractor.launch.pyIn a container shell:
source /root/ros2_ws/install/setup.bash
pkill -9 -f teleop 2>/dev/null
ros2 launch frontier_explorer_3d explore.launch.py
teleopmight intercept the navigator command.
In RViz2 (visible in the VNC browser tab):
- Set Global Options → Fixed Frame to
simple_drone/odom - Add displays:
| Display type | Topic | Notes |
|---|---|---|
| OctoMap | /octomap_full |
requires octomap_rviz_plugins; shows 3D occupancy |
| PointCloud2 | /frontier_extractor/frontier_cloud |
colour by cluster_id field |
| MarkerArray | /frontier_extractor/cluster_markers |
coloured spheres at cluster centroids |
| PoseArray | /frontier_extractor/cluster_centroids |
viewpoint candidates for NBV |
Monitor frontier counts:
ros2 topic echo /frontier_extractor/status
# {"num_frontiers": N, "num_clusters": K}- ✅ Environment up
- ✅ Velodyne VLP-16 LiDAR added to sjtu_drone URDF
- ✅ LiDAR →
octomap_server→ 3D occupancy in RViz2 - ✅
frontier_explorer_py: incremental frontier extraction + clustering - ✅
frontier_nbv: information-gain next-best-view selector - ✅
frontier_rrt: RRT* collision-free path planner - ⬜ Collapsed-building Gazebo world for evaluation