pykinematics.imu.joints.Center

class pykinematics.imu.joints.Center(g=9.81, method='SAC', mask_input=True, min_samples=1000, mask_data='acc', opt_kwargs=None)

Estimation of joint centers using kinematic constraints.

Parameters:
g : float, optional

Local value of gravitational acceleration. Default is 9.81 m/s^2.

method : {‘SAC’, ‘SSFC’}, optional

Method to use for the computation of the joint center. Default is SAC. See Crabolu et al. for more details. SSFCv is SSFC but using vectors instead of magnitude, which requires rotations between sensors.

mask_input : bool, optional

Mask the input to only use the highest acceleration samples. Default is True

min_samples : int, optional

Minimum number of samples to use. Default is 1000.

mask_data : {‘acc’, ‘gyr’}

Data to use for masking. Default is acceleration.

opt_kwargs : dict, optional

Optimization key-word arguments. SAC uses numpy.linalg.lstsq. SSFC and SSFCv use scipy.optimize.least_squares.

References

Crabolu et al. “In vivo estimation of the shoulder joint center of rotation using magneto-inertial sensors: MRI-based accuracy and repeatability assessment.” BioMedical Engineering Online. 2017.

Methods

compute(self, prox_a, dist_a, prox_w, …) Perform the computation of the joint center to sensor vectors.
compute(self, prox_a, dist_a, prox_w, dist_w, prox_wd, dist_wd, R_dist_prox)

Perform the computation of the joint center to sensor vectors.

Parameters:
prox_a : numpy.ndarray

Nx3 array of accelerations measured by the joint proximal sensor.

dist_a : numpy.ndarray

Nx3 array of accelerations measured by the joint distal sensor.

prox_w : numpy.ndarray

Nx3 array of angular velocities measured by the joint proximal sensor.

dist_w : numpy.ndarray

Nx3 array of angular velocities measured by the joint distal sensor.

prox_wd : numpy.ndarray

Nx3 array of angular accelerations measured by the joint proximal sensor.

dist_wd : numpy.ndarray

Nx3 array of angular accelerations measured by the joint distal sensor.

R_dist_prox : numpy.ndarray

Nx3x3 array of rotations from the distal sensor frame to the proximal sensor frame. Ignored if method is ‘SSFC’.

Returns:
prox_r : numpy.ndarray

Joint center to proximal sensor vector.

dist_r : numpy.ndarray

Joint center to distal sensor vector.

residual : float

Residual value per sample used from the joint center optimization