rigid_body_motion.estimate_linear_velocity

rigid_body_motion.estimate_linear_velocity(arr, dim=None, axis=None, timestamps=None, time_axis=None, outlier_thresh=None, cutoff=None)[source]

Estimate linear velocity from a time series of translation.

Parameters
arr: array_like

Array of translations.

dim: str, optional

If the array is a DataArray, the name of the dimension representing the spatial coordinates of the points.

axis: int, optional

The axis of the array representing the spatial coordinates of the points. Defaults to the last axis of the array.

timestamps: array_like or str, optional

The timestamps of the points, corresponding to the time_axis of the array. If str and the array is a DataArray, the name of the coordinate with the timestamps. The axis defined by time_axis will be re-sampled to the timestamps for which the transformation is defined.

time_axis: int, optional

The axis of the array representing the timestamps of the points. Defaults to the first axis of the array.

cutoff: float, optional

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

outlier_thresh: float, optional

Some SLAM-based trackers introduce position corrections when a new camera frame becomes available. This introduces outliers in the linear velocity estimate. The estimation algorithm used here can suppress these 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. For measurements from the Intel RealSense T265 tracker, set this value to 1e-3.

Returns
linear: array_like

Array of linear velocities.