underactuated.multibody
- underactuated.multibody.MakePidStateProjectionMatrix(plant)
Given a MultibodyPlant, returns a selection matrix, S, such that [q_a; v_a] = S @ [q; v], where q_a and v_a are the actuated positions and velocities and q, v, are the full state. This can be passed to e.g. the state_projection argument of the PidController constructor.
- Parameters:
plant (MultibodyPlant) – The MultibodyPlant for the projection matrix.
- underactuated.multibody.ManipulatorDynamics(plant, q, v=None, context=None)
Returns the components of the manipulator equations – M(q), C(q,v), tauG(q), B(q), and tauExt(q, v) – for a given MultibodyPlant.
- Parameters:
plant (MultibodyPlant) – The MultibodyPlant for which to compute the manipulator equations.
q (ndarray[Any, dtype[_ScalarType_co]]) – The generalized positions.
v (ndarray[Any, dtype[_ScalarType_co]] | None) – The generalized velocities. If None, the velocities are taken from the context.
context (Context | None) – The Context to use for the computation. If None, a new default Context will be created.