Robot safety filter demo · B601
From geometry to a safe joint-velocity constraint: learn one step at a time on the same six-joint arm.
Build the safety rule in 3D
Follow the five steps beside the field. Change a pose or command to see the numbers change.
Arm appearance and field shells
Active arm margin: . The latest checked shell selects the margin.
Arrows show gradient/normal direction or instantaneous TCP velocity, as labeled.
Preparing cached 3D comparison…
Six-joint command values
Loading the precomputed command projections…
| Joint velocity (rad/s) | Nominal | Environment Poisson CBF | Arm distance CBF |
|---|
Independent command queries at frozen recorded poses; selecting a command does not execute a trajectory.
Explore joint loads and the full environment field
Drag to rotate · Scroll to zoom · Click the legend to toggle shells, slices and arrows. The pose slider replays recorded arm states.
Each shell has constant barrier value h (m²); h=0 at buffered boundaries. This is not a force or clearance scale. Arm appearance uses the official visual meshes; collision checks continue to use the padded body boxes. Arrows: direction of increasing h.
Body geometry and payload support
Collision diagnostics and static holding estimates at the displayed pose. The payload controls do not alter the recorded motion or add an object to the simulator.
What each joint must provide
Signed torques below hold the arm and point-mass payload still. The budget is the selected fraction of URDF model caps; it is not a certified continuous motor rating. J1 can have zero gravity torque while still carrying support forces and requiring dynamic torque.
| Joint | Angle deg | Arm gravity N·m | Payload N·m |
Total hold N·m | Budget N·m | Budget used |
|---|
How joint motion changes the most exposed body point
| Local sensitivity | J1 | J2 | J3 | J4 | J5 | J6 |
|---|---|---|---|---|---|---|
These are ∂H/∂q values in m²/rad, not torques. A positive entry means a small positive rotation in that joint increases this point's barrier value with the other joints fixed. The critical sample can change between poses. Focusing the display does not remove any of the 798 CBF constraints.
Human arms follow the same leverage and virtual-work principles, but muscle forces require muscle moment arms, co-contraction, posture and fatigue data. Torque-budget usage here is a deterministic model ratio; it cannot give a probability of physical failure or a person's lifting capacity.
Detailed model reference (optional)
Mathematics: the field attached to the arm
Robot field: exterior Euclidean distance to the articulated box union.
The safety envelope surrounds every body; all body–obstacle pair barriers must remain nonnegative.
At positive separation and a differentiable closest pair, the normal points from obstacle to robot.
The filter projects the nominal joint velocity; a drawn envelope alone does not change a command.
For disjoint sets, the minimum robot-to-environment Euclidean distance is symmetric. The Poisson field solves a different boundary-value problem and is not a distance transform; its gradient directions and filtered commands can differ. Inside overlapping arm boxes, the minimum signed-box function is only an inside indicator, not the exact signed distance to the exterior boundary of their union. Positive offset shells remain exterior envelopes.
At box edges or changes in the closest pair, derivatives can be non-unique. Display grids and meshes are approximations; the distance QP queries the analytic MuJoCo box pairs. Continuous-time invariance also requires a feasible initial state, valid dynamics, sufficiently regular constraints, feasible QPs and exact tracking. These offline demonstrations do not establish those conditions.
How the 3D field changes the arm's motion—and what load means
The colored volume is a scalar function of position in the room. The controller evaluates it on the moving surfaces of the arm, converts each spatial gradient into a joint-velocity constraint, and changes the requested motion only as much as needed. The load calculation is a separate static torque analysis; a bright field color is not a force or a motor-capacity measurement.
Current scope: fixed-base arm, synthetic static boxes, open fixed gripper, and a first-order velocity CBF. The load panel estimates a fixed-pose holding requirement; it does not attach a simulated payload to the dynamic experiment or regulate contact force.
1. Where the surrounding regions come from
The field spans (-0.8, -0.8, -0.15) to (0.8, 0.8, 1.25) m in the base frame, on a 65 × 65 × 57 grid with 0.025 m spacing. In the default run this is [-0.8, 0.8] × [-0.8, 0.8] × [-0.15, 1.25] m. It contains five physical boxes:
| Obstacle | Center XYZ (m) | Half-size XYZ (m) | Lower → upper XYZ (m) |
|---|---|---|---|
| central post | (0.25, 0, 0.48) | (0.04, 0.04, 0.19) | (0.21, -0.04, 0.29) → (0.29, 0.04, 0.67) |
| table | (0.5, 0, 0.06) | (0.3, 0.4, 0.035) | (0.2, -0.4, 0.025) → (0.8, 0.4, 0.095) |
| far post | (0.48, 0.35, 0.4) | (0.035, 0.035, 0.28) | (0.445, 0.315, 0.12) → (0.515, 0.385, 0.68) |
| side crate | (0.35, -0.43, 0.25) | (0.12, 0.04, 0.12) | (0.23, -0.47, 0.13) → (0.47, -0.39, 0.37) |
| rear crate | (-0.4, 0.35, 0.28) | (0.09, 0.06, 0.15) | (-0.49, 0.29, 0.13) → (-0.31, 0.41, 0.43) |
A grid voxel is marked occupied when its spacing-wide, world-aligned cube intersects a physical box. The occupied grid-site mask is then expanded by 0.03500 m plus a half-voxel diagonal (0.02165 m here). The requested 0.035 m includes the default 0.025 m surface-cover reserve and 0.010 m extra model/tracking allowance. This allowance is a chosen margin, not a proven bound on all physical tracking errors.
A further 3 × 3 × 3 grid-neighborhood collar is used by the PDE solver. Its largest additional corner displacement is 0.04330 m. The voxel intersection, discrete expansion, collar and rejected interpolation cells are different geometric operations: their sum is not an exact uniform spherical clearance radius. The collar makes the interpolated field approach zero before the validity check rejects a cell.
Negative constant forcing produces positive interior values. With this choice, h has units m². A seven-point finite-difference solve computes the grid; trilinear interpolation provides h at arbitrary points and its exact within-cell derivative. Its gradient can jump at voxel faces, so this discretization does not inherit a smooth continuous-time safety theorem.
An isosurface is simply the set h(p) = c. The orange and blue shells are different values of the same function, not individual obstacles or force fields. The display crop opens some shells for visibility; it changes neither the PDE domain nor the controller. Low h can also occur near the outer box. Whole-box clearance is measured separately, in metres.
2. Shoulder, elbow and wrist: evaluate the surfaces, not just the joint centers
The visual meshes are enclosed by 10 body-local proxy boxes. They are sampled at 798 surface points; the default proven face-grid covering radius is at most 0.0229316 m. This means every point on a proxy face lies within that radius of a retained sample. The boxes can be larger than the real links and therefore block narrow gaps.
Here b names a rigid body, k names its local sample, and q contains the six joint angles. Forward kinematics supplies its rotation R and translation t. An elbow sample moves when several upstream joints move; its Jacobian therefore usually has several nonzero columns. The same reasoning applies to shoulder, wrist and finger samples.
A body's minimum is useful for coloring and inspection. Within the valid interpolated domain it is continuous, but it can have a kink when the critical sample changes; voxel-face gradients can also jump. The practical controller keeps one constraint per retained surface point instead of differentiating a single minimum or checking only joint centers.
“Shoulder” and “elbow” are engineering labels here. J1/J2 are the proximal group, J3 the elbow group, and J4–J6 the wrist group; these are not human anatomical models. A graph labeled for one joint can show that coordinate's contribution to many surface constraints, rather than an independent barrier attached only to that joint.
The region selector is a visual focus only: base + shoulder contains base_link/link1/link2; elbow/forearm contains link3; wrist contains link4/link5/link6; gripper contains end_link and both fingers. All 798 surface constraints remain active regardless of the displayed selection.
3. The exact velocity-CBF constraint and feedback loop
The paper uses direct joint-velocity control, q̇ = v. Our default field is static, so its time derivative is zero. The code adds a small positive reserve h₀ = 2 × 10⁻⁵ m². With gain α = 2 s⁻¹, each point imposes:
If h is large, approach is allowed. Near the reserve, motion that decreases h is restricted, while motion along a safe direction can remain possible. The optional dᵥ term would require a justified Cartesian tracking-error bound; the default does not establish one merely by logging an observed error.
For a revolute coordinate, ∂h/∂q has units m²/rad, and multiplying it by rad/s gives m²/s. This joint sensitivity is separate from motor torque in N·m.
Defaults are vₘₐₓ = 0.45 rad/s and δq = 0.015 rad. Rows are normalized numerically; only rows proven redundant over the entire allowed velocity box are omitted from the solve. OSQP is the primary solver; a logged SLSQP fallback solves the identical convex QP if needed. Every original constraint and bound is checked afterward. There is no added safety slack or clipping of accepted v.
The hierarchy supplies a nominal route: sampled reachability → collision-aware RRT planner → pointwise CBF filter → saturated PD+bias joint servo. The filter uses actual simulated q and q̇. Torque saturation can prevent accurate tracking even if this velocity QP is feasible. Invalid field queries or an unsuccessful check trigger an abort; zero requested velocity does not prove safe braking for an inertial physical arm.
4. Can these colors be interpreted as repulsive forces?
The field and its gradient are geometric quantities: h is in m² and ∇h in metres. They are not measured newtons. The CBF changes joint velocity; the physical model's servo then generates the applied torques.
For intuition only, one could choose an artificial energy scale κ in joules and a reference h꜀, and define the following virtual potential:
Its arrows would point toward increasing h where the potential is active. Changing the arbitrary κ changes their magnitude without changing the scene. Even if units are chosen to make the arrows read in newtons, they remain a designed virtual effect, not contact-force feedback, a prediction of collision impact or the actual CBF correction. The Jacobian-transpose relation follows from matching endpoint and joint mechanical power, as derived in Modern Robotics, §5.2.
5. How a held object changes motor torque and headroom
The static panel places a hypothetical point-mass payload at the tool COM position, with an optional offset fixed in the tool frame. At a fixed pose and zero velocity, the arm's own model supplies its gravity-compensation torque G(q). Use the world-down vector g⃗ = (0, 0, −9.81) m/s²:
The minus sign means the motors oppose the external downward load. For an offset COM, use the Jacobian at that COM, or use a TCP wrench with moment r × F once; applying both would double-count the lever arm. A 1 kg object with a 0.30 m perpendicular lever arm contributes 2.94 N·m about that axis, before the arm's own weight. Other axes can have very different demands, including zero torque when the force line passes through an axis.
The model uses URDF limits (27, 27, 27, 7, 7, 7) N·m and a default headroom fraction ρ = 0.7 for this screening calculation. These are not validated continuous motor ratings. The currently most loaded axis has the largest utilization; the axis that limits a later increase in payload mass can be different. Capacity is not obtained by adding six motor torques.
The signed intersection matters: an added load can counterbalance gravity on one axis. If the unloaded pose already exceeds the chosen caps but a positive mass interval remains, the panel labels it a counterweight-only interval, not a safe payload recommendation. COM offset and pose can change the interval.
The interactive 0–4 kg slider intentionally explores model stress cases. It is not a hardware payload range. Seeed lists 1.5 kg, without gripper, with 70% reach recommended on its B601-DM product page. A larger torque-only model interval does not supersede that qualified specification.
Different elbow arrangements can reach the same tool position with different torque demand and collision clearance. A position-only reach map hides these configurations; orientation, grasp and connecting-path requirements further restrict reachability.
This intersection is a static screening idea. The load-panel controls do not add torque constraints to the running velocity CBF or change the simulation's motor limits.
6. What “failure” and a human comparison can—and cannot—mean
| Observation | Meaning in this model |
|---|---|
| Utilization above 1 | Static demand exceeds a selected deterministic torque cap; it is not a measured probability of damage. |
| Utilization below 1 | The screened pose satisfies those model inequalities; thermal limits, gearing, grasp/friction, payload inertia, contact impacts and structural strength still need validation. |
| CBF QP feasible | A commanded joint velocity satisfies the modeled geometric constraints; overloaded motors may still fail to track it. |
| Solver iteration limit | A numerical convergence failure, distinct from a proof of infeasibility or a geometric deadlock. |
| Progress stall | An operational trigger to replan, using a logged progress rule; it does not prove every alternative route is blocked. |
A failure probability needs calibrated distributions for loads, model errors, strength and operating conditions, plus repeated data. This panel supplies none of those distributions and therefore reports utilization/headroom only.
A human arm also balances loads through joint moments and lever arms, but robot motor torque does not translate directly into muscle force. Muscle moment arms, multiple agonists and antagonists, co-contraction, posture, fatigue and individual physiology are unknown here. Shoulder/elbow labels support a mechanical analogy; they do not make this a human strength or injury model.
7. What changes for a torque-level CBF or a mobile manipulator?
The geometric constraint then becomes linear in commanded torque when the current state and dynamics are known. A moving payload must be included consistently in M, C and G (and its collision geometry); do not also count its gravity as a second external load.
For b(q,t) = h(p(q),t), a torque-level filter must include inertia, the field Hessian, Jacobian derivatives and any time derivatives, enforce torque limits and start inside the appropriate position-and-velocity safe set. The current first-order filter and static load panel do not implement this.
A wheeled base adds position and heading, base/torso geometry, localization uncertainty, wheel constraints, braking and tipping limits. Its world-point Jacobians must include base motion; a differential-drive base cannot command independent sideways velocity. The same hierarchy remains useful, with a new whole-body model and validation rather than only more field samples.
The starting method is described in Wilkinson et al., §§II–III. The finite grid, constant forcing, proxy boxes, solver fallback, static load screen and hierarchy above are explicit choices of this preliminary reproduction.