SQ-CBF: Signed Distance Functions for
Reliable Superquadric-Based Safety Filtering

IEEE Robotics and Automation Letters (RA-L), 2026

Haocheng Zhao*1, Lukas Brunke*†1,2,3, Oliver Lagerquist1,2, Siqi Zhou1,4, Angela P. Schoellig1,2,3

1Learning Systems and Robotics Lab, Technical University of Munich 2University of Toronto Institute for Aerospace Studies· 3Vector Institute· 4Simon Fraser University

*Equal contribution  ·  †Corresponding author

Teleoperation through a cluttered tabletop. The safety filter intervenes only when a collision is imminent.

Contributions

  1. 1

    The implicit function is the wrong barrier for superquadrics. Prior work uses the implicit function of the superquadric directly as the barrier in a CBF-based safety filter. We identify that both the implicit function value and its gradient can be ill-conditioned, which can make the underlying optimization infeasible.

  2. 2

    Signed distance as a remedy. Alternatively, we propose to use the signed distance between superquadrics as the barrier, which maintains a graient norm of 1 almost everywhere. We further verify the proposed formulation on a representative case and show that it remains well-conditioned despite sharp corners and large separations.

  3. 3

    An efficient approach for signed distance and gradient computation. We evaluate the distance and its gradient between superquadrics in real time using dense polytopic approximations and the GJK/EPA algorithm, with a robustness analysis that accounts for the approximation error in the safety margin.

Abstract

Ensuring safe robot operation in cluttered and dynamic environments remains a fundamental challenge. While control barrier functions (CBFs) provide an effective framework for real-time safety filtering, their performance critically depends on the underlying geometric representation, which is often simplified, leading to either overly conservative behavior or insufficient collision coverage. Superquadrics (SQs) offer an expressive way to model complex shapes using a few primitives and are increasingly used for robot safety. To integrate this representation into CBF, most existing approaches directly use their implicit functions as barrier candidates. However, we identify a critical but overlooked issue in this practice: the gradients of the implicit SQ function can become severely ill-conditioned, potentially rendering the optimization infeasible and undermining reliable safety filtering. To address this issue, we formulate an SQ-based safety filter that uses signed distance functions (SDFs) as barrier candidates. Since analytical SDFs are unavailable for general SQs, we compute the distance using the efficient Gilbert–Johnson–Keerthi algorithm and derive its gradient in closed form. Extensive simulation and real-world experiments demonstrate consistent collision-free manipulation in cluttered scenes, showing robustness to challenging geometries, sensing noise, and dynamic disturbances, while improving task efficiency in teleoperation tasks. These results highlight a pathway toward safety filters that remain precise and reliable under the geometric complexity of real-world environments.

KeywordsRobot safety·Collision avoidance·Computational geometry·Control barrier functions·Superquadrics

Superquadrics are expressive, but their implicit function is a poor barrier candidate.

The superquadric allow us to represent a wide family of shapes, from spheres to rounded boxes, with a minimal set of parameters. Prior works often use its implicit function directly as a control barrier function, which is not a distance metirc and could be severely ill-conditioned: for box-like shapes and large separations, its value and its gradient grow by several orders of magnitude, and the CBF-QP becomes ill-conditioned or infeasible. In the same setup, the signed distance always remains bounded and well-conditioned.

Superquadrics: one primitive, various shapes

A four-by-four grid of superquadrics varying the shape exponents e1 and e2 from 0.1 to 1.5: boxes, rounded boxes, cylinders, a sphere and octahedron-like shapes. Click a cell to load its parameters into the viewer below.
f_sq = [ |x/a1|^(2/e2) + |y/a2|^(2/e2) ]^(e2/e1) + |z/a3|^(2/e1) − 1

Strictly convex for 0 < e1, e2 < 2. Click a cell above or move the sliders.

Varying the shape exponents e1 and e2 of a single superquadric spans boxes, cylinders, spheres and octahedra. The viewer on the left renders the shape for exponents in the strictly convex range 0 < e1, e2 < 2.

Implicit function vs. signed distance

click to switch the witness shown below
Log-scale value (top) and gradient magnitude (bottom) of the implicit superquadric function and the signed distance as one superquadric slides past another along x. The implicit function reaches 1e7; the signed distance stays near 1. 101 103 105 107 Function value 10-2 101 104 107 Gradient magnitude −3 −2 −1 0 1 2 3 x (m)
Red superquadric fixed at the origin Blue superquadric, draggable along x Drag the blue shape

Value (top) and gradient magnitude (bottom) as the blue superquadric moves past the red one along x. The implicit function and its gradient exceed 1e4, whereas the signed distance remains of order one.

The SQ-CBF safety filter

Robot and obstacles are both represented by compact sets of superquadrics. The signed distance between every robot–obstacle pair is chosen as the barrier function, densely discretized as polytopics and computed with GJK/EPA, and its gradient is derived in closed form in terms of the superquadric poses and witness points.

Overview diagram: an uncertified policy sends a command to the safety filter; signed distances from GJK and their gradients enter an SDF-CBF-QP that outputs a safe command to the Franka arm, shown over a cluttered tabletop with obstacles outlined in red.
Robot  Obstacles   GJK/EPA returns the signed distance d for every pair, the closed-form gradient gives ḋ, and the CBF-QP minimally modifies the uncertified command from teleoperation or a planner, intervening only when a collision is imminent.
  1. 1

    Superquadric collision model

    15 strictly convex superquadrics cover 97.1% of the Franka FR3 with substantially less over-approximation than cylinders and boxes.

  2. 2

    Signed distance as barrier function

    We choose h = d − εδ. Between strictly convex bodies the SDF is continuously differentiable wherever they are positively separated, so it's a valid CBF on the safe set. Each superquadric is densely sampled into a convex polytope, and GJK/EPA evaluates the distance in real time.

  3. 3

    Closed-form gradient

    Positive homogeneity of the support function eliminates all Hessian terms, such that the SDF Jacobian expression requires only the 6D pose of superquadrics and the witness points.

  4. 4

    Robust margin

    The polytope discretisation error is bounded and incorporated into the CBF margin. In this way we ensure that satisfying the approximate constraint implies the exact one. At 200×200 samples the additional margin is ~0.84 mm.

Complete, fast and accurate

Three key properties of the proposed superquadric representation with SDF-based formulation, examined on the Franka FR3 and an Intel Core Ultra 9 285K.

Complete without being conservative

Coverage and over-approximation of the robot collision model, measured by voxelisation at 5 mm.

Representation SpheresMorton & Pavone, 2025 Cylinders / boxesGonçalves et al., 2024 Superquadrics (ours) Official FR3 meshOfficial repo
Illustration Franka arm covered by 21 spheres Franka arm covered by cylinders and boxes Franka arm covered by 15 superquadrics Official Franka FR3 collision mesh
Primitives21 spheres11 cylinders + 4 boxes15 superquadrics9 meshes + 8 boxes
Coverage ↑59.1%99.0%97.1%97.3%
Over-approx. ↓2.6%45.2%28.7%1.9%
Convexitystrictly convexnot strictly convexstrictly convexnon-convex

Real time, at scene scale

Line plot of cycle time against number of CBF constraints for 1, 2, 4, 8 and 16 cores; all curves are roughly linear and the 16-core curve stays under 3 ms up to 800 constraints.
Cycle time of SDF and gradient evaluation (mean ± std.) versus the number of CBF constraints. A single core evaluates more than 200 collision pairs within a 10 ms control period; 16 cores evaluate about 800 pairs in 2.7 ms.

High accuracy at little computational cost

Relative cycle time and maximum SDF error against surface sampling resolution from 20 to 200: cycle time rises from 80% to 100% while the error falls from 1 mm to 0.01 mm on a log scale.
Trade-off between efficiency and accuracy with the surface sampling resolution nu = nv. From 20 to 200 samples the relative cycle time increases only from 80% to 100%, while the maximum SDF error decreases by two orders of magnitude.

Real-world experiments

A non-expert operator teleoperates a Franka FR3 at 100 Hz, performing the same task with and without the safety filter. Videos are shown in real time.

Handover in a tight space

Whole-body collision avoidance between three wooden posts.

Without safety filter
With SQ-CBF
0 / 10success without filter
10 / 10success with SQ-CBF
15.1 mmminimum clearance (mean)
17.9 scompletion time vs. 29.1 s for the DCOL-based filter

Transport through narrow passages

End-effector and grasped object collision avoidance in an unstructured tabletop scene.

Without safety filter
With SQ-CBF
2 / 10success without filter
10 / 10success with SQ-CBF
10.6 mmminimum clearance (mean)
0%infeasible QP instances vs. 51.9% for the implicit-function barrier
Why the implicit function-based formulation turns infeasible frequently on this trajectory? Two time series over a 55 second trial: the implicit function value swings between 10^5 and 10^17 and saturates to infinity in two intervals marked as QP infeasible; the SDF varies smoothly between 0.15 and 0.6 m and stays feasible throughout.
The implicit value spans 105 to 1017 and saturates, rendering the QP infeasible for extended intervals. The SDF remains between 0.1 and 0.6 m and the QP is feasible throughout.

Moving obstacles

Obstacle poses from motion capture at 200 Hz, velocities from an EKF. The filter reacts to a swinging stick while the operator moves freely or plays chess.

Free motion
Chess play

Safety that makes teleoperation faster

Ten teleoperated trials per configuration: the operator inserts the gripper into a basket whose clearance shrinks from 5.5 cm to 0.5 cm per side. With the filter, the operator no longer needs to stop and reposition the end-effector manually.

0penetrations with the SQ-based filter across all 40 trials
−47.5%completion time vs. no safety filter
−26.8%completion time vs. a cylinder/box-based filter
Simulated Franka arm above a red basket, with the superquadric collision model overlaid in blue.
Insertion task with the superquadric model overlaid.
Box plots of minimum signed distance for four basket sizes: without a filter values go negative; with the SQ-based filter they stay positive.
Minimum SDF along each trial; negative values indicate penetration.
Box plots of task completion time for four basket sizes; the SQ-based filter is consistently fastest.
Task completion time for the same trials.

Citation

@article{zhao2026sqcbfsigneddistancefunctions,
      title={SQ-CBF: Signed Distance Functions for Reliable Superquadric-Based Safety Filtering},
      author={Haocheng Zhao and Lukas Brunke and Oliver Lagerquist and Siqi Zhou and Angela P. Schoellig},
      year={2026},
      journal={IEEE Robotics and Automation Letters (RA-L)}
}