Safe Control Density

Maze Navigation

Maze navigation using a unicycle model with forward speed and yaw-rate controls. The examples compare density feedback, density filters, and density MPC while following A* waypoints through cluttered layouts with rectangular wall-density obstacles.

Run

Run one maze controller; change the scenario or controller script to compare results.

python examples/maze/density_feedback.py --scenario wide
python examples/maze/density_filter.py --scenario rooms
python examples/maze/density_mpc.py --scenario rooms

System Dynamics

The maze examples use the same unicycle state and controls as the non-holonomic page. A sparse A* path supplies waypoint references, while each occupied maze cell is converted into a rectangular wall obstacle inside the density function.

$$ \begin{aligned} x_{k+1} &= x_k+\Delta t\,v_k\cos\theta_k,\\ y_{k+1} &= y_k+\Delta t\,v_k\sin\theta_k,\\ \theta_{k+1} &= \theta_k+\Delta t\,\omega_k. \end{aligned} $$

Pick a maze and density based controller. The orange markers show the waypoint reference, the green curve shows the nominal baseline trajectory, and the blue curve shows the density controller output.

Maze 2 - Density MPC

Status
success
Steps
142
Min clearance
0.022

Density Filter vs Density MPC

Maze 4 is the one default case where the one-step density filter collides while density MPC reaches the goal. The filter is greedy: it enforces a next-step density condition while staying close to the nominal command. In the dense room layout, that local correction is not enough to plan the turn sequence. MPC is predictive: it evaluates a short horizon of future states, so it can trade immediate tracking against future safety and steer through the room.

Maze 4 - Density filter

One-step filter: local correction collides in the dense room layout.

Maze 4 - Density MPC

Predictive MPC: succeeds by reasoning over a short future horizon.

All Maze Configurations

Each row shows density feedback, density filter, and density MPC for a fixed maze. All examples use the same sparse, clearance-aware waypoint profile; Maze 4 highlights the filter failure case.