Body¶
This abstract class represents an abstract body.
- class Body¶
Bases:
handle
Abstract class modeling a generic body of a
BodyTree
.- Property Summary
- Parameters¶
Vector of parameters for the body.
- n¶
Number of DoF of the body.
- Method Summary
- D(q, dq)¶
Evaluate the generalized damping force.
- Parameters:
q (
[double], [sym]
) – Configuration variablesdq (
[double], [sym]
) – First-order time derivative of the configuration variables
- I(q)¶
Evaluate the body inertia matrix in the body distal end frame.
- Parameters:
q (
[double], [sym]
) – Configuration variables
- J(q, dq)¶
Evaluate the firs-order time derivative of the body inertia matrix in the body distal end frame.
- Parameters:
q (
[double], [sym]
) – Configuration variablesdq (
[double], [sym]
) – First-order time derivative of the configuration variables
- K(q)¶
Evaluate the generalized elastic force.
- Parameters:
q (
[double], [sym]
) – Configuration variables
- T(q)¶
Evaluate the relative transformation matrix from the body distal end frame to the body proximal end frame.
- Parameters:
q (
[double], [sym]
) – Configuration variables
- Update(q, dq, ddq, options)¶
Update the current state of the body.
- Parameters:
q (
[double], [sym]
) – Configuration variablesdq (
[double], [sym]
) – First-order time derivative of the configuration variablesddq (
[double], [sym]
) – Second-order time derivative of the configuration variables
- a_com_rel(q, dq, ddq)¶
Evaluate the second-order time derivative of the center of mass position in the body distal end frame.
- Parameters:
q (
[double], [sym]
) – Configuration variablesdq (
[double], [sym]
) – First-order time derivative of the configuration variablesddq (
[double], [sym]
) – Second-order time derivative of the configuration variables
- a_rel(q, dq, ddq)¶
Evaluate the relative linear acceleration of the body distal end frame in the body proximal end frame.
- Parameters:
q (
[double], [sym]
) – Configuration variablesdq (
[double], [sym]
) – First-order time derivative of the configuration variablesddq (
[double], [sym]
) – Second-order time derivative of the configuration variables
- domega_rel(q, dq, ddq)¶
Evaluate the relative angular acceleration of the body distal end frame in the body proximal end frame.
- Parameters:
q (
[double], [sym]
) – Configuration variablesdq (
[double], [sym]
) – First-order time derivative of the configuration variablesddq (
[double], [sym]
) – Second-order time derivative of the configuration variables
- grad_J(q)¶
Evaluate
, where
is the first-order time derivative of the body inertia.
- Parameters:
q (
[double], [sym]
) – Configuration variables
- grad_int_r_X_dr(q)¶
Evaluate
, where
is the relative position vector of the body particle in the body distal end frame.
- Parameters:
q (
[double], [sym]
) – Configuration variables
- grad_v_com(q)¶
Evaluate
, where
is the position of the center of mass in the body distal end frame.
- Parameters:
q (
[double], [sym]
) – Configuration variables
- int_dr_X_pv_r(q, dq)¶
Evaluate
, where
is the relative position vector of the body particle in the body distal end frame.
- Parameters:
q (
[double], [sym]
) – Configuration variablesdq (
[double], [sym]
) – First-order time derivative of the configuration variables
- int_pv_r_O_dd_r(q, dq, ddq)¶
Evaluate
, where
is the relative position vector of the body particle in the body distal end frame.
- Parameters:
q (
[double], [sym]
) – Configuration variablesdq (
[double], [sym]
) – First-order time derivative of the configuration variablesddq (
[double], [sym]
) – Second-order time derivative of the configuration variables
- int_r_X_ddr(q, dq, ddq)¶
Evaluate
, where
is the relative position vector of the body particle in the body distal end frame.
- Parameters:
q (
[double], [sym]
) – Configuration variablesdq (
[double], [sym]
) – First-order time derivative of the configuration variablesddq (
[double], [sym]
) – Second-order time derivative of the configuration variables
- int_r_X_dr(q, dq)¶
Evaluate
, where
is the relative position vector of the body particle in the body distal end frame.
- Parameters:
q (
[double], [sym]
) – Configuration variablesdq (
[double], [sym]
) – First-order time derivative of the configuration variables
- m()¶
Evaluate the body mass.
- omega_par(q)¶
Evaluate the Jacobian of the relative angular velocity of the body distal end frame in its frame.
- Parameters:
q (
[double], [sym]
) – Configuration variables
- omega_rel(q, dq)¶
Evaluate the relative angular velocity of the body distal end frame in the body proximal end frame.
- Parameters:
q (
[double], [sym]
) – Configuration variablesdq (
[double], [sym]
) – First-order time derivative of the configuration variables
- p_com(q)¶
Evaluate the center of mass position in the body distal end frame.
- Parameters:
q (
[double], [sym]
) – Configuration variables
- toStruct()¶
Convert the body object to a struct representation.
- v_com_rel(q, dq)¶
Evaluate the first-order time derivative of the center of mass position in the body distal end frame.
- Parameters:
q (
[double], [sym]
) – Configuration variablesdq (
[double], [sym]
) – First-order time derivative of the configuration variables
- v_par(q)¶
Evaluate the Jacobian of the relative linear velocity of the body distal end frame in its frame.
- Parameters:
q (
[double], [sym]
) – Configuration variables
- v_rel(q, dq)¶
Evaluate the relative linear velocity of the body distal end frame in the body proximal end frame.
- Parameters:
q (
[double], [sym]
) – Configuration variablesdq (
[double], [sym]
) – First-order time derivative of the configuration variables