jacobians module

class dynamapp.jacobians.ModelJacobian(Imats: list, dhparams: list, gravity=-9.81, dampings: list = None)[source]

Bases: object

A base class for computing the Jacobians of joint quantities (torques, forces, etc.) with respect to specified model parameters.

This class provides methods to compute the derivatives of generalized torques and inertia tensors concerning inertia parameters, DH parameters, and joint damping coefficients.

Attributes:
  • m (Model): An instance of the Model class initialized with inertia

    matrices, DH parameters, gravity, and damping coefficients.

generalized_torques_wrt_inertia(q: jax.numpy.ndarray, v: jax.numpy.ndarray, a: jax.numpy.ndarray) jax.numpy.ndarray[source]

Computes the regressor tensor of generalized torques with respect to inertia.

inertia_tensor_wrt_inertia(q: jax.numpy.ndarray) jax.numpy.ndarray[source]

Computes the regressor of the inertia matrix with respect to inertia tensor values.

generalized_torques_wrt_dhparams(q: jax.numpy.ndarray, v: jax.numpy.ndarray, a: jax.numpy.ndarray) jax.numpy.ndarray[source]

Computes the regressor tensor of generalized torques with respect to DH-parameters.

generalized_torques_wrt_damping(q: jax.numpy.ndarray, v: jax.numpy.ndarray, a: jax.numpy.ndarray) jax.numpy.ndarray[source]

Computes the regressor tensor of generalized torques with respect to joint damping.

full_torques_wrt_inertia(q: jax.numpy.ndarray, v: jax.numpy.ndarray, a: jax.numpy.ndarray, alpha: jax.numpy.ndarray, beta: jax.numpy.ndarray, gamma: jax.numpy.ndarray, dampings: list) jax.numpy.ndarray[source]

Computes the regressor tensor of full torques with respect to inertia parameters.

full_torques_wrt_friction(q: jax.numpy.ndarray, v: jax.numpy.ndarray, a: jax.numpy.ndarray) jax.numpy.ndarray[source]

Computes the regressor tensor of full torques with respect to friction coefficients.

class dynamapp.jacobians.ModelStateJacobian(Imats: list, dhparams: list, gravity=-9.81, dampings: list = None, x_init: jax.numpy.ndarray = None)[source]

Bases: object

A base class for computing Jacobians of eigenvalues and state matrices with respect to model parameters.

This class provides methods to compute the derivatives of eigenvalues and the state matrix A concerning inertia parameters, DH parameters, damping coefficients, and state variables.

Attributes:
ms (ModelState): An instance of the ModelState class initialized

with inertia matrices, DH parameters, gravity, and damping coefficients.

eigvals_wrt_inertia(q: jax.numpy.ndarray, v: jax.numpy.ndarray) jax.numpy.ndarray[source]

Computes the Jacobian of eigenvalues with respect to inertia parameters.

eigvals_wrt_dhparams(q: jax.numpy.ndarray, v: jax.numpy.ndarray) jax.numpy.ndarray[source]

Computes the Jacobian of eigenvalues with respect to DH parameters.

eigvals_wrt_damping(q: jax.numpy.ndarray, v: jax.numpy.ndarray) jax.numpy.ndarray[source]

Computes the Jacobian of eigenvalues with respect to damping coefficients.

state_matrix_a_wrt_inertia(q: jax.numpy.ndarray, v: jax.numpy.ndarray) jax.numpy.ndarray[source]

Computes the Jacobian of state matrix A with respect to inertia coefficients.

state_matrix_a_wrt_state(q: jax.numpy.ndarray, v: jax.numpy.ndarray) jax.numpy.ndarray[source]

Computes the Jacobian of state matrix A with respect to state variables (q, v).