Skip to content
Darshmenon Rosnav

Darshmenon Rosnav

github.com • November 29, 2026

3. Controllers, SLAM backends & benchmarking (incl. social · decentralized multi-robot )

4. Platforms — drive bases, chassis skins, how to switch

6. Update YAML (tuning)

6b. Convoy & swarm formations

8. Fleet & explore (incl. convoy / leader-follower)

Perception, interaction & AI

10. YOLO object detection

12. LLM voice

15. Gaussian Splatting capture

16. AI training (YOLO · Gaussian Splat keepout · RL)

One launch → Gazebo + SLAM/Nav2 + RViz. Scale to a fleet with one arg. Humble/Jazzy params auto-selected from $ROS_DISTRO .

Deep dive → concepts.md · launch args → ros2 launch rosnav_bot --show-args

Docker (alternative to the install above)

2. Map · save · navigate

A — Drive with teleop (build the map)

Keys: i forward · , back · j / l turn · k stop · q / z speed. Watch the map in RViz ( Map on /map ), or:

Or let the robot explore alone: add explore:=true to the launch above.

Frontier exploration: with explore:=true the robot drives to the edge between mapped and unknown space (a frontier ), maps what it finds, and repeats until none are left. Three worlds mapped, 30 s per frame:

Multi-robot allocation (offline, synthetic): with the coordinator's own utility scorer on random scenarios, allocation:=hungarian cut assigned travel distance by 3.8% to 36.8% against greedy for the same frontier size, with no duplicate goals. Not a robot run ( details ).

ros2 launch rosnav_bot slam_nav.launch.py world_name:=hospital explore:=true controller:=rpp explorer:=frontier

Ready-made maps: src/rosnav_bot/maps/map_{cafe,hospital,house,simple_rooms}.yaml (+ RTAB-Map 3D views ) — skip exploring and navigate on them directly .

Exploration backend defaults to builtin (best result in the 2026-10-11 cafe test — see concepts.md §9 for the earlier comparison). Switch it with explorer:= :

How explorer:=builtin picks a goal, step by step: frontier exploration pipeline (frontier mask → reachability filter → clustering → safe goal placement → utility scoring).

explorer:=builtin extras ( concepts.md §9 for details):

exploration_boundary:="x1,y1,x2,y2,..." — confine frontiers to a map-frame polygon

resume_session:=true — continue from the last visited-frontier checkpoint ( _session.json , written automatically every 10 goals) instead of starting fresh

info_gain_mode:=fov (with frontier_scorer:=weighted ) — sensor-cone info gain instead of the default fixed-radius ring ; tune with info_gain_fov / info_gain_max_depth

Writes map_hospital.yaml + map_hospital.pgm . Then Ctrl+C the SLAM launch. (With explore:=true , maps autosave to ~/.ros/rosnav_maps/map_ .* ; copy into src/rosnav_bot/maps/ to keep one.)

C — Navigate on the saved map

AMCL localizes on the static map — no more SLAM. Send a goal:

2D Pose Estimate — seed AMCL if particles are wide

2D Goal Pose — click+drag the goal

Goal accepted but no motion? Keep safety:=true (Nav2 /cmd_vel → Gazebo /cmd_vel_safe ).

Multi-robot explore runs also autosave to ~/.ros/rosnav_maps/ . Multi-SLAM ( slam_mode:=multi ): save /map_merged with -t /map_merged or fleet_manager.py savemap .

Nav2 patrol on the prebuilt hospital map ( slam:=false controller:=rpp ) · green = global plan

Live in Gazebo + Nav2 ( controller:=decentral decentral_ctrl:=vo , 3x speed) · all goals reached, 0 robot collisions · original corridor video (real speed)

Same 4-robot swap, two controllers: sampled velocity obstacle ( vo , left) vs MPPI with a velocity-obstacle prior + yield rule ( mppi_prior , right)

3. Controllers, SLAM backends & benchmarking

Controllers & sensors (orthogonal)

All SLAM backends in this repo , at a glance (full comparison → concepts.md §3):

In RViz ( slam_explore.rviz ): "Local Plan" shows whichever controller's selected path; enable "MPPI Candidate Trajectories" (off by default) when controller:=mppi to see the sampled velocity rollouts it's scoring; "SLAM Pose Graph" shows slam_toolbox's nodes + loop-closure constraints live; "Fused Odom (EKF/UKF)" vs "Wheel Odom (raw)" (off by default) lets you watch the localization filter correct drift, with its position-covariance ellipse on.

Route Server lanes (cafe): route_graph:=auto ; make a graph for any map with scripts/map_to_route_graph.py (see concepts.md).

Social among pedestrians

Own RiskPlanner (not Nav2's controller) with learned, conformal-uncertain pedestrian prediction. Offline, 10 seeds, 16 pedestrians (rerun after the sigma_scale fix): 10% collisions vs 100% for a reactive planner, both 70% success. In Nav2 the same predictions only shape the costmap ( dynobs_pipeline:=external ); controller:= still drives. Details: concepts.md §47.

Benchmark and adversarial crowds

Reactive vs predictive vs risk planners, 15 seeds, 4–24 pedestrians: the risk planner collides least, but reaches no goal at 16 or 24 pedestrians within 25 s. Run python3 src/rosnav_bot/scripts/social_nav_adversary.py --bench (tables in images/social_nav_adversary/ , details in concepts.md ).

Decentralized: every robot, its own goal

8 robots swapping places ( mppi_prior ), passing through a 1.5 m corridor ( mppi_prior ), and crossing a pedestrian hall ( vo ); trails = recent path, stars = goals, orange rings = pedestrian personal space. No central planner: sampled velocity obstacle ( vo ) and MPPI with a velocity-obstacle prior + yield rule ( mppi_prior ) beat plain goal-seeking, which collides 19 times per run in the swap. Centralized PP/ECBS stays more reliable on random grids. Run: python3 src/rosnav_bot/scripts/decentral_nav_sim.py bench — tables and details in concepts.md .

Each robot keeps its Nav2 planner and goal ( navigate_to_pose ); decentral_nav_node.py replaces only the local controller: it follows the robot's /plan , reads the neighbours' /odom , and publishes cmd_vel_nav (diff-drive, same slot the MPC controller uses).

Status: experimental. Live in Gazebo + Nav2 with vo : 4-robot swap, 4-robot 1.5 m corridor interchange and a 4-robot pedestrian hall all reached every goal with 0 robot collisions; mppi_prior is not reliable live yet (corridor 1/2) and 8 robots did not boot under load — details in concepts.md .

Collaborative SLAM (2 robots, map merging, cafe)

Per-robot slam_toolbox maps merged into /map_merged (10x speed).

ros2 launch rosnav_bot slam_nav.launch.py world_name:=simple_rooms lidar_type:=3d slam_algo:=3d explore:=true

slam_toolbox + MPC controller (maze)

controller:=mpc world_name:=maze explore:=true

RTAB-Map visual SLAM (RGB-D, cafe)

slam_algo:=vslam world_name:=cafe ( vslam.rviz )

ORB-SLAM3 (sidecar, cafe)

Needs GTK-enabled OpenCV for the viewer windows, see docker/orb_slam3/params/rosnav_rgbd_ros_params.yaml .

Controller / localization-filter / SLAM-mode: benchmark.py mode:=nav|accuracy|slam + mode:=report compares any of the above numerically and writes a self-contained HTML dashboard. Local chart generation is available from the reporting scripts but is intentionally kept out of this README — see concepts.md §3/§6b/§7 for the full run/compare walkthrough (controller: dwb/mppi/rpp via mode:=nav ; EKF/UKF via mode:=accuracy ; slam_toolbox_mode via mode:=slam ).

SLAM backends (headless compare)

Install Cartographer once if you want that row: sudo apt install ros-${ROS_DISTRO}-cartographer-ros

Headless smoke (all AMRs map + move)

Stop other Gazebo/ROS sims first — parallel gz sim instances starve DDS and make later variants fail.

4. Platforms — drive bases, chassis skins, how to switch

Two independent launch args:

mir100 / husky only work with drive_type:=diff . Mixing them with mecanum/ackermann is ignored (with a warning).

Switch (single robot — map + navigate)

Drive examples (mecanum / ackermann)

Ackermann steer-while-driving:

Deep dive → concepts.md §18–20 (mecanum / ackermann / MiR100 / Husky).

Terrain-aware speed costmap (§36-37) — the robot's 2D lidar has no terrain semantics, so this slows it down via a Nav2 SpeedFilter mask instead, either baked from the world's SDF friction values or driven live from the RGB-D camera:

Known finding — explore_lite coverage plateau on a large open room: on coverage_100 (single bounded room, no internal walls), explore_lite reliably plateaus around 55-60% map coverage and stops making progress well before the room is fully mapped, even though a large contiguous unknown region remains inside the walls with a clear free/unknown frontier boundary around it. Screenshots below are from the final stages of exploration, with the robot near one local frontier cluster instead of the large remaining region:

explorer:=builtin ( frontier_coordinator.py / frontier_explorer.py ) does no better on this world — it stops even earlier (~10% coverage), logging every candidate frontier as unreachable / failed . Not yet root-caused; tracked as an open issue rather than tuned around.

6. Update YAML (tuning)

All configs live under src/rosnav_bot/config/ . With --symlink-install , edit then relaunch (no rebuild).

Maps: src/rosnav_bot/maps/map_ .yaml (+ .pgm ) · use map:=... on launch. More → concepts.md .

6b. Convoy & swarm formations

rviz/convoy.rviz · gap held at 1.06 m ±0.07 in column mode · gap speed-adaptive · robot takes over if the leader dies · details → concepts.md §43

MAPF = offline conflict-free plan for all robots (CBS optimal, ECBS bounded, PP fast); CBF = runtime filter that keeps robots ≥ safe_dist apart — details in concepts.md

Spawn a patrolling obstacle to test avoidance and obstacle_tracker.py against a moving object, not just static walls.

Details → concepts.md §26 .

10. YOLO object detection

Needs: pip install ultralytics . Camera is enabled automatically with enable_yolo:=true .

Topics: yolo/detections · yolo/image_annotated

Stock yolov8n.pt (COCO) detects nothing in stylized sim worlds like cafe — fine-tune on collected sim frames:

Details (why map_frame:=odom , not the default map ) → concepts.md §35-A .

Needs: enable_camera:=true and sudo apt install ros-humble-cv-bridge python3-opencv . Hospital world has the dock marker.

Dock poses / marker IDs → config/docks.yaml . Live view: /tmp/aruco_dock_view.jpg or RViz Image on /camera/image_raw .

12. LLM voice

Needs: ollama serve and a pulled model ( ollama pull llama3.1 ). Start the nav stack first. station_server.py exposes dock/undock/status as ROS 2 actions so the planner can chain them.

Named places → config/locations.yaml . Docks → config/docks.yaml . Replies also publish on /llm_nav/ .

Manual station actions (no LLM):

Details → concepts.md §11b .

15. Gaussian Splatting capture

Feasibility spike: capture a photo set + exact Gazebo-ground-truth poses for 3D Gaussian Splatting — no robot, no COLMAP.

cafe.world, fully trained splat — 384 captured frames, 30k splatfacto iterations

B — Train + view (separate nerfstudio venv)

cafe.world capture, viewed live in the nerfstudio browser viewer — depth confirms geometry, not just color, is coherent

C — Or view in RViz instead (Gaussian centers as a colored point cloud)

plan: already wired for a static costmap layer — see §28 ( KeepoutFilter ) and §30 ( SpeedFilter ), both driven by gs_mask_from_splat.py / gs_speed_mask_from_splat.py rasterizing the same Gaussian point cloud into a Nav2 costmap filter mask.

Details → concepts.md §27 .

16. AI training (YOLO · Gaussian Splat keepout · RL)

Three research pipelines that plug into the existing stack. Core SLAM/Nav2 stay classical.

B — Gaussian Splat → Nav2 keepout

C — RL local planner (PPO)

Trains offline on a map PGM (no Gazebo). Deploys as a research /cmd_vel source.

train_ppo.py defaults to a pure-PyTorch PPO ( --backend torch ). --backend sb3 needs a working stable-baselines3 build.

Each works on any Nav2 stack: nav2_doctor (why isn't my robot moving?) · nav_explore_eval (score an exploration run) · nav2_fault_inject (test recovery) · slam_doctor (is my SLAM healthy?) · nav_bench_kit (compare benchmark trials, guard shared-machine runs; local, not published yet). Copies and tests: src/rosnav_bot/tools/ .

Unit tests (no simulator, ~1 min, same as CI): src/rosnav_bot/scripts/run_tests.sh

Made by @darshmenon · Blog · concepts.md