Safe Control Density

Dynamic Obstacles

Single-robot unicycle navigation through moving circular obstacles. The examples compare reactive, collision-cone, and velocity-obstacle density constructions under feedback and filter controllers.

Run

Run the velocity-obstacle density controller and filter on the dynamic-obstacle setup.

python examples/dynamic_obstacles/density_feedback/velocity_obstacle.py --scenario closing_in
python examples/dynamic_obstacles/density_filter/velocity_obstacle.py --scenario closing_in

System Dynamics

The robot uses the same unicycle dynamics as the non-holonomic examples. Obstacles are moving disks with measured center \(p_j\), radius \(r_j\), and velocity \(v_j\).

$$ \dot p_x=v\cos\theta,\qquad \dot p_y=v\sin\theta,\qquad \dot\theta=\omega $$ $$ p_j(t+\Delta t)=p_j(t)+\Delta t\,v_j(t),\qquad R_j=r_{\mathrm{robot}}+r_j+r_{\mathrm{margin}} $$

Velocity-Aware Density

Dynamic obstacles need more than position. The reactive density sees the obstacle disk, while collision-cone and velocity-obstacle density also look at relative velocity.

Reactive moving bump

Each obstacle is treated as a moving circular density hole. This works well when position is enough, but it can react late to fast closing obstacles.

$$\Phi_j=\beta(\|p-p_j\|;R_j,R_j+r_{\mathrm{sense}})$$

Collision cone

robot obstacle collision cone

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. The density obstacle term is still a bump function: we multiply the spatial bump by a smooth bump on the collision-cone margin.

$$ \Phi_j^{\mathrm{cc}} =\beta_{\mathrm{space}}(\|p-p_j\|) \,\beta_{\mathrm{vel}}(h_{\mathrm{cc}}) $$ $$ h_{\mathrm{cc}}=p_{\mathrm{rel}}^\top v_{\mathrm{rel}}+\|p_{\mathrm{rel}}\|\|v_{\mathrm{rel}}\|\cos\phi $$

Velocity obstacle

candidate velocity unsafe VO v_x v_y

The unsafe set is drawn in velocity space. The controller avoids commands inside the cone even before the obstacle is close. We wrap this velocity-space test in the same way: spatial bump times smooth bump on the VO margin.

$$ \Phi_j^{\mathrm{vo}} =\beta_{\mathrm{space}}(\|p-p_j\|) \,\beta_{\mathrm{vel}}(h_{\mathrm{vo}}) $$ $$ h_{\mathrm{vo}}=\max(\mathrm{cross}(\ell,v-v_j),\mathrm{cross}(v-v_j,r)) $$

Interactive Result Viewer

Choose a scenario, density construction, and controller. Dense flow also has a local-frame view that follows the robot so obstacle interactions are easier to inspect.

Controller Gallery

Each section fixes the controller and shows the reactive bump, collision-cone, and velocity-obstacle density constructions for the closing-in and dense-flow scenarios.