You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Spline module (BSplineSE3, InterpSplineSE3, SplineFit): documentation and test gaps #288
The spline classes are exported from spatialmath but are poorly documented and thinly tested.
Documentation
Add the classes to the Sphinx API docs (docs/source does not mention them)
Docstrings for SplineSE3, SplineFit and its error methods, and derivative
stochastic_downsample_interpolation: units of the epsilons, check_type, bc_type, normalize_time, that results are random and unseeded, and that local checks are not a global error bound
visualize: document all parameters
BSplineSE3: it is a non-rational B-spline (not NURBS), and it approximates the control poses rather than interpolating them
Convert the module's Google-style Args: docstrings to reST
Tests
TestSplineFit uses timestamps in [0, 1], so normalize_time is a no-op and mismatches between raw and normalized time cannot show up
Assert the Euclidean error as well as the angular error
The visualize tests are skipped in CI
To check
SplineFit error methods crash if called before a fit (self.spline is None)
InterpSplineSE3.derivative builds a Twist3 from the translation rate and the angular rate; is that the intended twist convention, and in which frame?
Hi @petercorke, I'd like to work on #288, starting with the InterpSplineSE3.derivative question.
I compared derivative(t) against central finite differences of the spline's own pose (Ṫ T⁻¹ and T⁻¹ Ṫ) on a trajectory whose rotation axis changes over time. .v equals ṗ in the world frame, but .w equals the body-frame angular velocity, because RotationSpline(t, 1) returns body rates. So the result is neither a spatial twist, a body twist, nor (ṗ, ω₀). Example at t = 1.73: ω_world = [-0.491, 0.093, 0.800], returned w = [-0.609, 0.500, 0.519].
Separately, with normalize_time=True the rates are per unit normalised time (10× for a 10 s span), which isn't documented.
Which output would you prefer?
(a) a SpatialVelocity with (ṗ, ω) both in the world frame,
(b) a body-frame velocity, or
(c) keep Twist3 with an explicit frame= argument.
And should the rates be per second when normalize_time=True?or anything else you had in mind while posting this question do tell me?
Once that's settled, I'll open a PR with finite-difference regression tests, the SplineFit before-fit guard and the missing Euclidean-error assert, and then send the docs work as a separate PR.
Activity
guptuv commentedon Dec 2, 2026
Hi @petercorke, I'd like to work on #288, starting with the
InterpSplineSE3.derivativequestion.I compared
derivative(t)against central finite differences of the spline's own pose (Ṫ T⁻¹andT⁻¹ Ṫ) on a trajectory whose rotation axis changes over time..vequals ṗ in the world frame, but.wequals the body-frame angular velocity, becauseRotationSpline(t, 1)returns body rates. So the result is neither a spatial twist, a body twist, nor (ṗ, ω₀). Example at t = 1.73: ω_world = [-0.491, 0.093, 0.800], returned w = [-0.609, 0.500, 0.519].Separately, with
normalize_time=Truethe rates are per unit normalised time (10× for a 10 s span), which isn't documented.Which output would you prefer?
SpatialVelocitywith (ṗ, ω) both in the world frame,Twist3with an explicitframe=argument.And should the rates be per second when
normalize_time=True?or anything else you had in mind while posting this question do tell me?Once that's settled, I'll open a PR with finite-difference regression tests, the
SplineFitbefore-fit guard and the missing Euclidean-error assert, and then send the docs work as a separate PR.