ENGINEER · PILOT · BUILDER

Controls & Autonomy · 2024

CLF-CBF Safety Filter for an Autonomous UGV

Generated a nominal trajectory for an Ackermann-style UGV, then filtered its commands with a CLF-CBF quadratic program to avoid a modeled obstacle while reaching the target.

Project type
Two-person nonlinear-controls project · simulation and physical demonstration
Role
Two-person team; shared controller extensions, simulation, and hardware demonstration
Maturity
Simulation + physical maneuver
Collaboration
Seif Elkhashab and Mark Charnot
Progress and safety
CLF / CBF
Target trajectory
Nominal
Vehicle model
Bicycle
Command filter
QP
Read the final technical report
01

The system

We built a motion-control pipeline for a Rosmaster R2 that drove toward a target while avoiding a modeled obstacle. A nominal planner proposed the motion; a CLF-CBF quadratic program modified that command whenever progress and safety conflicted.

SYSTEM ARCHITECTURE

Plan the motion

Bicycle model → iterative trajectory generator → nominal command

A four-state Ackermann-style model and iterative optimizer produced a target-directed reference trajectory.

Filter for safety

x + u_ref + goal + obstacle → constrained QP → u*

The controller stayed near the nominal command while enforcing input bounds and keeping the modeled trajectory outside the unsafe region.

Demonstrate the behavior

Simulation evidence → Rosmaster maneuver

We compared controller settings in MATLAB and recorded the physical vehicle following the avoidance maneuver around a box.

02

What we built

  1. STAGE 01

    Model the vehicle

    Extended a MATLAB CLF-CBF framework with a control-affine bicycle model for the Rosmaster platform.

  2. STAGE 02

    Generate the nominal trajectory

    Generated a nominal 20-second trajectory through repeated local optimization and nonlinear rollout.

  3. STAGE 03

    Add the safety filter

    Encoded target convergence with a soft CLF constraint and obstacle avoidance with a hard CBF constraint, then solved the QP every 20 ms in simulation.

  4. STAGE 04

    Compare and demonstrate

    Compared barrier-rate settings and carried the resulting avoidance behavior onto the physical vehicle for a laboratory demonstration.

03

Decisions and scope

Progress could yield; safety could not

Near the obstacle, the shortest route conflicted with the barrier constraint. We allowed slack on goal convergence while keeping obstacle avoidance hard, so the optimizer could delay progress without deliberately entering the modeled unsafe set.

The hardware run is a demonstration

The archive documents the controller in simulation and the maneuver on hardware, but not a complete live onboard chain from perception through QP solution to wheel commands. I present those as two distinct levels of evidence.

04

What worked

  • The nominal simulated path crossed the circular obstacle region; the filtered trajectory passed around it and reached the target threshold.
  • Barrier-rate comparisons showed the expected tuning tradeoff between earlier, wider avoidance and a more direct path near the boundary.
  • The Rosmaster photographs and videos show the physical platform executing the curved avoidance maneuver around a box.
05

Takeaway

A safety filter works best as one explicit layer: preserve the nominal command when possible, and intervene only when a modeled constraint is threatened.

Simulation and hardware footage answer different questions. Keeping those evidence levels separate made the result more credible.

NEXT PROJECT / 03

Rocket Avionics & Recovery Electronics