New feature: Spatial Transform

We’ve been using internally a Transform class which us used to describe spatial transform (translation and rotation).

Currently, the interface follows the structure of the Rotation-class found in scipy.spatial.transform.Rotation, and can be used for transform between coordinates systems as:

v_A: np.ndarray
B2A: Transform
C2B: Transform

C2A: Transform = C2B * B2A
v_C = C2A.apply(v_A)

I feel this might be useful more generally to the community, and could be added to the scipy.spatial.transform.Transform as a new class.

Do you think this could be useful to the community? In that case, I will try to prepare a pull request.

  • Lukas

I’m certainly happy to have the functionality. Just as a bit of a bikeshed, Transform is over-general. Let’s be clear about what kind of transform is represented by the class; ProperRigidTransform or ScrewTransform (but probably only if the internal representation actually is a screw). If you add reflections, then just RigidTransform would work.

Good point.
I’m not as a familiar with screw-transform.
But if they represent the same rigid body transform, a single class would be sufficient. But the different representation could just be resolved using different access functions, e.g., as_matrix(.) or as_screw(.), as has been done in Rotation.

I have not considered if / how to incorporate reflections, to be done.

Hey @lukas-ramlab, we have an issue open with a proposal to do just this, please check it out and leave feedback!