rigid_body_motion.lookup_angular_velocity¶
- rigid_body_motion.lookup_angular_velocity(frame, reference=None, represent_in=None, outlier_thresh=None, cutoff=None, mode='quaternion', as_dataarray=False, return_timestamps=False)[source]¶
Estimate angular velocity of a frame wrt a reference.
- Parameters
- frame: str or ReferenceFrame
The reference frame whose velocity is estimated.
- reference: str or ReferenceFrame, optional
The reference frame wrt which the velocity is estimated. Defaults to the parent frame of the moving frame.
- represent_in: str or ReferenceFrame, optional
The reference frame in which the twist is represented. Defaults to the reference frame.
- outlier_thresh: float, optional
Suppress samples where the norm of the second-order differences of the rotation is above outlier_thresh and interpolate the missing values.
- cutoff: float, optional
Frequency of a low-pass filter applied to angular and angular velocity after the estimation as a fraction of the Nyquist frequency.
- mode: str, default “quaternion”
If “quaternion”, compute the angular velocity from the quaternion derivative. If “rotation_vector”, compute the angular velocity from the gradient of the axis-angle representation of the rotations.
- as_dataarray: bool, default False
If True, return an xarray.DataArray.
- return_timestamps: bool, default False
If True and as_dataarray is False, also return the timestamps of the lookup.
- Returns
- angular: numpy.ndarray or xarray.DataArray
Angular velocity of moving frame wrt reference frame, represented in representation frame.
- timestamps: numpy.ndarray
Corresponding timestamps of the lookup if return_timestamps is True.