rigid_body_motion.ReferenceFrame.transform_linear_velocity

ReferenceFrame.transform_linear_velocity(arr, to_frame, what='reference_frame', moving_frame=None, reference_frame=None, axis=- 1, time_axis=0, timestamps=None, return_timestamps=False, outlier_thresh=None, cutoff=None)[source]

Transform array of linear velocities from this frame to another.

Parameters
arr: array_like

The array to transform.

to_frame: str or ReferenceFrame

The target reference frame. If str, the frame will be looked up in the registry under that name.

what: str, default “reference_frame”

What frame of the velocity to transform. Can be “reference_frame”, “moving_frame” or “representation_frame”.

moving_frame: str or ReferenceFrame, optional

The moving frame when transforming the reference frame of the velocity.

reference_frame: str or ReferenceFrame, optional

The reference frame when transforming the moving frame of the velocity.

axis: int, default -1

The axis of the array representing the spatial coordinates of the velocities.

time_axis: int, default 0

The axis of the array representing the timestamps of the velocities.

timestamps: array_like, optional

The timestamps of the velocities, corresponding to the time_axis of the array. If not None, the axis defined by time_axis will be re-sampled to the timestamps for which the transformation is defined.

return_timestamps: bool, default False

If True, also return the timestamps after the transformation.

cutoff: float, optional

Frequency of a low-pass filter applied to linear and angular velocity after the twist estimation as a fraction of the Nyquist frequency.

outlier_thresh: float, optional

Suppress outliers by throwing out samples where the norm of the second-order differences of the position is above outlier_thresh and interpolating the missing values.

Returns
arr_transformed: array_like

The transformed array.

ts: array_like, shape (n_timestamps,) or None

The timestamps after the transformation.