analyses/utils.py
def residual_torque_time_series(m: biorbd.Model, q: np.array, qdot: np.array, qddot: np.array):
    """
    Compute the residual torque time series

    Parameters
    ----------
    m : biorbd.Model
        Biorbd Model
    q : numpy.array
        generalized coordinates
    qdot : numpy.array
        generalized velocities
    qddot : numpy.array
        generalized accelerations
    """
    n = q.shape[1]
    residual_torque = np.zeros((6, n))
    for ii in range(n):
        residual_torque[:, ii] = m.InverseDynamics(q[:, ii], qdot[:, ii], qddot[:, ii]).to_array()[:6]

    return residual_torque

    Compute the residual torque time series

    Parameters
    ----------
    m : biorbd.Model
        Biorbd Model
    q : numpy.array
        generalized coordinates
    qdot : numpy.array
        generalized velocities
    qddot : numpy.array
        generalized accelerations
    
Compute the residual torque time series
Parameters

m : biorbd.Model
Biorbd Model
q : numpy.array
generalized coordinates
qdot : numpy.array
generalized velocities
qddot : numpy.array
generalized accelerations
Compute the residual torque time series Parameters m : biorbd . Model Biorbd Model q : numpy . array generalized coordinates qdot : numpy . array generalized velocities qddot : numpy . array generalized accelerations
def residual_torque_time_series(m: biorbd.Model, q: np.array, qdot: np.array, qddot: np.array):
    n = q.shape[1]
    residual_torque = np.zeros((6, n))
    for ii in range(n):
        residual_torque[:, ii] = m.InverseDynamics(q[:, ii], qdot[:, ii], qddot[:, ii]).to_array()[:6]
    return residual_torque
def residual_torque_time_series ( m : biorbd . Model , q : np . array , qdot : np . array , qddot : np . array ) : n = q . shape [ 1 ] residual_torque = np . zeros ( ( 6 , n ) ) for ii in range ( n ) : residual_torque [ : , ii ] = m . InverseDynamics ( q [ : , ii ] , qdot [ : , ii ] , qddot [ : , ii ] ) . to_array ( ) [ : 6 ] return residual_torque
Compute the residual torque time series
Parameters
Compute the residual torque time series Parameters
"""
    Compute the residual torque time series

    Parameters
    ----------
    m : biorbd.Model
        Biorbd Model
    q : numpy.array
        generalized coordinates
    qdot : numpy.array
        generalized velocities
    qddot : numpy.array
        generalized accelerations
    """
m
biorbd.Model
q
np.array
qdot
np.array
qddot
np.array