rigid_body_motion.lookup_transform

rigid_body_motion.lookup_transform(outof, into, as_dataset=False, return_timestamps=False)[source]

Look up transformation from one frame to another.

The transformation is a rotation r followed by a translation t which, when applied to a point expressed wrt the base frame B, yields that point wrt the target frame T:

\[p_T = rot(r, p_B) + t\]
Parameters
outof: str or ReferenceFrame

Base frame of the transformation.

into: str or ReferenceFrame

Target frame of the transformation.

as_dataset: bool, default False

If True, return an xarray.Dataset. Otherwise, return a tuple of translation and rotation.

return_timestamps: bool, default False

If True, and as_dataset is False, also return the timestamps of the lookup.

Returns
translation, rotation: each numpy.ndarray

Translation and rotation of transformation between the frames, if as_dataset is False.

timestamps: numpy.ndarray

Corresponding timestamps of the lookup if return_timestamps is True.

ds: xarray.Dataset

The above arrays as an xarray.Dataset, if as_dataset is True.