Continuous-time Estimation

B-spline for SE(3)

Unlike Bezier curve , B-spline has local controllability. In other words, a segment of a B-spline curve is only controlled by $k$ control points, where $k$ is the degree of the B-spline curve. A B-spline is defined as below: $$ \begin{align} p(t) = \sum_{i=0}^{i=n}B_{i,k}(t)p_i \end{align} $$ Where $p_i$ is the $i^{th}$ control points, $B_{i,k}$ is the coefficient of $p_i$. The local controllability comes from that $B(t)$ is equal to 0 for certain segments.

In order to define $B_{i,k}(t)$, we need first define a knot vector $\tau = [\tau_0, \cdots, \tau_m]$, where $\tau_i \leq \tau_{i+1}$. $$ \begin{align} B_{i, 0}(t) &= \begin{cases} 1, & \tau_i \leq t < \tau_{i+1} \\ 0, & otherwise \end{cases} \end{align} $$

$$ \begin{align} B_{i, k}(t) &= \frac{t-\tau_i}{\tau_{i+k}-\tau_i}B_{i,k-1} + \frac{\tau_{i+1+k}-t}{\tau_{i+1+k}-\tau_{i+1}}B_{i+1,k-1} \end{align} $$

There are a couple of interesting things about $B_{i,k}(t)$:

  • $m = n + 1 + k$, where we have $m+1$ knots, $n+1$ control points, degree as $k$. This requirement comes from we need to calculate value $\tau_{i+1+k}$.
  • $B_{i,0}(t)$ is a step function which is 0 outside the span $[\tau_i, \tau_{i+1})$.
  • $B_{i,k}(t)$ is always 0 outside the span $[\tau_i, \tau_{i+k+1})$.
  • The curve is only defined within the span $[\tau_k, \tau_{n+1})$, and the summation of coefficients is equal to 1.
  • The curve inside a valid unit span $[\tau_i, \tau_{i+1})$ is controlled by $k+1$ control points.
In [3]:
In [30]:

Matrix Representation for Uniform Basis

In [ ]:
 

Matrix Form for Uniform Cumulative Basis

Strangeness of Using B-spline Interpolation based on Timestamp

Though there are papers using B-spline for interpolation based on time, I don't quite get it because it seems odd to me that the defined span is controlled by control points that have timestamps smaller than its start time. Interpreting values in knot vector as timestamps seems incorrect to me. For example, the controls points in the figure above are at $\tau_0, \tau_1, \tau_2, \tau_3$. They control the curve shape defined at $[\tau_3, \tau_4)$ for degree $k=3$. Nevertheless, if knots are uniform, then it does seem that the curve can be used for interpolation between $\tau_1$ and $\tau_2$. This is because that the weight for control point $c_1$ (green curve) reaches the largest value at the $\tau_3$ and the weight for control point $c_2$ (blue curve) reaches the largest value at the $\tau_4$.

If we use non-uniform knots, the how could we describe a proper time-based interpolation between $\tau_1, \tau_2$ given the B-spline curve defined in $[\tau_3, \tau_4)$. So then how would a non-uniform knot vector work for the interpolation based on time? I don't know.

In [31]:
In [20]:

B-spline with uniform knots for SE(3)

As mentioned in the last section, though it doesn't seem correct to me mathematically, B-spline with uniform knots can be considered to use for time-based interpolation. When using uniform knots, we actually don't need to calculate coefficients $B$ recursively. We have a well-defined matrix form for B-spline.

In [ ]:
 

Reference:

Gaussian Processes for SE(3)

Reference:

  • Barfoot State Estimation for Robotics
This blog is converted from continuous-time-estimation.ipynb
Written on January 20, 2022