Reactive bump
A neighbor is a circular bump obstacle. This is simple and fast, but it cannot tell whether the neighbor is actually moving toward a future collision.
Multi-agent unicycle navigation with density feedback and density filters. The examples compare position-only bump density, collision-cone density, and velocity-obstacle density.
Run a minimal multi-agent crossing scenario with the three density constructions.
python examples/multi_agent/density_feedback/reactive.py --scenario crossing6
python examples/multi_agent/density_feedback/collision_cone.py --scenario crossing6
python examples/multi_agent/density_feedback/velocity_obstacle.py --scenario crossing6
Each agent is a unicycle with state \(x_i=[p_{x,i},p_{y,i},\theta_i]\) and controls \(u_i=[v_i,\omega_i]\). The density construction is pairwise: every other agent contributes a smooth obstacle term.
The baseline only sees distance. Collision-cone and velocity-obstacle density also use relative velocity, so agents react differently when another agent is crossing, approaching, or moving away.
A neighbor is a circular bump obstacle. This is simple and fast, but it cannot tell whether the neighbor is actually moving toward a future collision.
The cone is built from relative position and relative velocity. If the relative velocity points into the cone, the density term activates before the disks touch. We keep the usual spatial bump and multiply it by a second smooth bump on the collision-cone margin.
Velocity obstacles work directly in velocity space. Candidate velocities inside the cone would produce a future collision, so the density pushes the command toward a cone boundary. As with collision cones, the final obstacle term is a spatial bump times a smooth bump on the velocity-obstacle margin.
Select a controller, density construction, and scenario. The feedback controller is fast and smooth because it maps a planar density command to unicycle inputs. The filter solves a one-step constrained unicycle problem at every timestep.
The dashboards replay methods one after another. Completed tracks stay visible, while the active method shows moving triangles. The live plots show each agent's forward speed, yaw rate, and minimum pairwise clearance over time.
The same density constructions can be used in two different control loops. Feedback is fast and direct; the filter is more faithful to the unicycle dynamics because it solves over the actual controls.
Density feedback first computes a planar single-integrator command for each agent. That command is then mapped to forward speed and yaw rate through a desired heading. This makes the method very fast and visually smooth, but the safety reasoning happens in planar velocity space before the unicycle mapping.
For collision cone and velocity obstacle density, the feedback controller uses relative velocity information from nearby agents. We keep only the most relevant neighbors so the command reacts to agents that can actually create a near-term collision.
Density filter starts from a nominal unicycle command and solves a one-step constrained problem over \([v,\omega]\). It changes the nominal only when the predicted next state would violate the density condition. This is slower than feedback, but it uses the exact unicycle step in the safety correction.
The multi-agent filter uses synchronous velocity snapshots: every agent sees the same frozen neighbor velocities for that timestep, solves its local filter, and then all agents advance together. This keeps pairwise velocity-aware terms more symmetric in crossing scenarios.
Each section fixes the scenario. Within each density construction, the feedback result and filter result are shown side by side.
Two agents swap positions through a single interaction point. This is the cleanest case for seeing how relative velocity changes the avoidance direction.
Four agents share the same central interaction region. This increases the number of simultaneous pairwise constraints while keeping the geometry easy to read.
Six agents create dense pairwise interactions near the center. This case shows why nearest or most-dangerous neighbor selection matters for keeping velocity-aware filters tractable.
Agents swap with diagonally opposite goals. The interaction is less synchronized than the crossing cases, but every agent still has to negotiate several moving neighbors.