Safe Navigation and Obstacle Avoidance Using Differentiable Optimization Based Control Barrier Functions

Bolun Dai, Rooholla Khorrambakht, Prashanth Krishnamurthy, Vinícius Gonçalves, Anthony Tzes, Farshad Khorrami · DOI · OpenReview

Introduction

In the field of robotics, ensuring collision-free operation is a fundamental requirement. Control Barrier Functions (CBFs) have emerged as a powerful tool for safety-critical control, defining a "safe set" of states that the robot must remain within. However, implementing CBFs for robots with complex, non-spherical geometries remains a significant challenge.

Traditional approaches often rely on approximating robots and obstacles as simple spheres or ellipsoids. While computationally simple, this leads to "over-conservative" behavior where the robot perceives its mathematical footprint as much larger than its physical one, preventing it from navigating through narrow but traversable spaces. Alternatively, Signed Distance Functions (SDFs) can represent complex shapes, but they are often non-smooth or non-differentiable at the point of contact. To compensate, engineers frequently use "loose" derivative approximations, which again results in timid robot behavior and an inability to fully utilize the available safe workspace.

Methodology: Differentiable Scaling Factors

This paper proposes a novel framework that replaces the traditional distance-based metric with a differentiable scaling factor $\alpha$. Instead of asking "how far apart are these objects?", the system asks "by what minimum uniform factor $\alpha$ must these shapes be scaled to intersect?"

The Scaling Factor ($\alpha$)

For two convex shapes, if the minimum scaling factor $\alpha^* > 1$, the objects are disjoint and safe. If $\alpha^* \leq 1$, a collision occurs. This value forms the basis of the CBF: $h(x) = \alpha^*(x) - \beta$, where $\beta$ represents a safety margin.

Differentiable Optimization Loop

The scaling factor is determined by solving a conic optimization program. To integrate this into a real-time control loop, the authors utilize the Implicit Function Theorem to calculate the exact Jacobian (gradient) of the scaling factor with respect to the robot's state (position and orientation). This allows the optimization problem to function as a smooth, differentiable layer within the controller.

System architecture showing the integration of the differentiable CBF into the safe QP control loop.

CBF-QP Controller

The resulting differentiable CBF is incorporated into a Quadratic Program (QP) safety filter. This filter receives a nominal control command (e.g., "move toward goal") and minimally modifies it to ensure the safety constraint is satisfied, allowing the robot to operate at the very edge of the safe set without violating it.

Experimental Evaluation

The framework was evaluated across several challenging scenarios to test its efficiency and lack of conservatism:

  1. 2D Mobile Robot Simulation: A capsule-shaped robot navigating through a field of polygonal obstacles.
  2. 7-DOF Manipulator (Franka-Emika Research 3): Tested in both PyBullet simulations and on physical hardware. The robot was tasked with navigating "Two-walls" (narrow gaps) and "Three-blocks" (cluttered workspace) scenarios.

Key Results and Discussion

Overcoming Conservatism

A critical finding was the proposed method's ability to recover the entire safe set. In 2D simulations, standard SDF-based CBF controllers often "got stuck" because their conservative derivative approximations suggested that any movement toward a narrow gap was unsafe. In contrast, the differentiable scaling factor provided accurate gradients that allowed the robot to successfully navigate the passage.

Comparison of trajectories: The proposed SDF-CBFQP (green) successfully navigates the gap, while the standard CBFQP (purple) fails to find a feasible path.

Computational Efficiency

Real-time performance is vital for robotics. On the 7-DOF FR3 arm, the average computation time for the CBF was approximately 0.20ms to 0.24ms. This efficiency allows the safety filter to run at high frequencies (up to 1kHz), making it suitable for high-speed industrial and research applications.

Real-World Validation

Physical experiments on the FR3 robot confirmed the simulation results. The robot demonstrated smooth trajectories when navigating near synthetic obstacles, maintaining safety while utilizing the full extent of the available workspace. The use of convex decomposition allowed the complex geometry of the 7-link arm to be handled seamlessly by the optimization-based CBF.

Conclusion

By shifting from distance metrics to differentiable scaling factors, this research provides a mathematically robust and computationally efficient method for safe robot navigation. The approach eliminates the over-conservatism of traditional methods and the non-smoothness of SDFs, enabling robots to perform complex tasks in cluttered environments with high confidence. Future work will focus on extending this framework to dynamic obstacles and multi-robot coordination.

Summary updated

BibTeX
@article{dai2023safe,
  author = {Bolun Dai and Rooholla Khorrambakht and Prashanth Krishnamurthy and Vinícius Gonçalves and Anthony Tzes and Farshad Khorrami},
  title = {{Safe Navigation and Obstacle Avoidance Using Differentiable Optimization Based Control Barrier Functions}},
  journal = {IEEE Robotics Autom. Lett.},
  year = {2023},
  doi = {10.1109/lra.2023.3295654},
}
Figure