Bounding radius for rigid-body clearance (source code)

= Bounding radius for rigid-body clearance
{title2=$R$}

A <bounding radius for rigid-body clearance> bounds the distance of every point of a <rigid body> from the reference point used to describe its motion. It converts angular motion into a bound on point displacement, so <collision detection> can account for the whole body between sampled poses rather than only its reference point.

Let $B$ be a nonempty <compact set> in body coordinates and let $c$ be the chosen pivot in those coordinates. A valid radius satisfies
$$
R\ge R_*:=\max_{p\in B}\lVert p-c\rVert.
$$
The maximum exists by <compactness> and continuity of the <Euclidean norm>. A bound larger than $R_*$ is conservative; a smaller one does not cover the specified geometry. For a <convex polytope> with vertices $v_i$, it is sufficient and exact to use $R_*=\max_i\lVert v_i-c\rVert$: expressing a point as a <convex combination> and applying the <triangle inequality> proves that no interior point is farther away than the farthest vertex.

For an original rectangular-body example, take side lengths $0.6\,\mathrm m$ and $0.8\,\mathrm m$. A pivot at the centre gives $R_*=\sqrt{0.3^2+0.4^2}=0.5\,\mathrm m$. A pivot at a corner instead gives $R_*=\sqrt{0.6^2+0.8^2}=1.0\,\mathrm m$. For a $5\,{}^{\circ}$ rotation about the respective fixed pivot, the <angular clearance bound for a rotating body> is
$$
2R\sin(2.5\,{}^{\circ})\approx
\begin{cases}43.62\,\mathrm{mm}&R=0.5\,\mathrm m,\\87.24\,\mathrm{mm}&R=1.0\,\mathrm m.\end{cases}
$$
The smaller radius cannot be used for the corner-pivot motion unless the changed motion of the reference point is also included. A convenient geometric centre does not automatically remain stationary.

For a moving reference point with speed at most $v_{\max}$ and angular speed at most $\omega_{\max}$, a point-speed bound is $v_{\max}+R\omega_{\max}$. This supplies a <Lipschitz continuity> constant for clearance against fixed obstacles. The role of body geometry and orientation in <configuration space> is developed in the primary planning text.<Robotic Systems by Kris Hauser>[Chapter 9, Translating robots, C-obstacles for rotational motion and Motion planning in SE(2)]{ref}

The modeled body must include attached tools and protrusions relevant to the query. <Uncertainty in a rigid-body bounding radius> can be accommodated with a conservative geometric enlargement. This radius controls motion around the declared reference point; it does not replace the separate <required clearance margin> for uncertain obstacle locations or tracking errors.