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 commandA 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 maneuverWe compared controller settings in MATLAB and recorded the physical vehicle following the avoidance maneuver around a box.
What we built
- STAGE 01
Model the vehicle
Extended a MATLAB CLF-CBF framework with a control-affine bicycle model for the Rosmaster platform.
- STAGE 02
Generate the nominal trajectory
Generated a nominal 20-second trajectory through repeated local optimization and nonlinear rollout.
- 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.
- STAGE 04
Compare and demonstrate
Compared barrier-rate settings and carried the resulting avoidance behavior onto the physical vehicle for a laboratory demonstration.
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.
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.
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.
