pykinematics.imu.orientation.SSRO

class pykinematics.imu.orientation.SSRO(c=0.04, N=16, error_factor=1e-15, sigma_g=0.01, sigma_a=0.1, grav=9.81, init_window=8)

Sensor-to-Sensor Relative Orientation estimation algorithm.

Parameters:
c : float, optional

Value between 0 and 1 for the cutoff of the estimation of the gravity vector. Default is 0.04.

N : int, optional

Number of samples in the moving average measurement error estimation. Default is 16.

error_factor : float, optional

Error factor for the computation of the measurement error for the estimation of the rotation quaternion. Default is 1e-15, recommended is to be slightly less than the values in Q, which can be accomplished with values around dt**2 * sigma_g**2 * 0.1

sigma_g : float, optional

Gyroscope noise value. Default is 0.01

sigma_a : float, optional

Accelerometer noise value. Default is 0.1

grav : float, optional

Gravitational acceleration. Default is 9.81 m/s^2

init_window : int, optional

Number of samples to use for initialization of state and covariance. Default is 8.

Methods

run(self, s1_a, s2_a, s1_w, s2_w, s1_m, s2_m, dt) Run the SSRO algorithm on the data from two body-segment adjacent sensors.
run(self, s1_a, s2_a, s1_w, s2_w, s1_m, s2_m, dt)

Run the SSRO algorithm on the data from two body-segment adjacent sensors. Rotation quaternion is from the second sensor to the first sensor.

Parameters:
s1_w : numpy.ndarray

Sensor 1 angular velocity in rad/s.

s2_w : numpy.ndarray

Sensor 2 angular velocity in rad/s.

s1_a : numpy.ndarray

Sensor 1 acceleration in m/s^2.

s2_a : numpy.ndarray

Sensor 2 acceleration in m/s^2.

s1_m : numpy.ndarray

Sensor 1 magnetometer readings.

s2_m : numpy.ndarray

Sensor 2 magnetometer readings.

dt : float, optional

Sample rate in seconds.

Returns:
q : numpy.ndarray

Rotation quaternion containing the rotation from sensor 2’s frame to that of sensor 1’s