MechanismState
Index
RigidBodyDynamics.MechanismStateBase.Random.rand!RigidBodyDynamics.configurationRigidBodyDynamics.configurationRigidBodyDynamics.global_coordinates!RigidBodyDynamics.local_coordinates!RigidBodyDynamics.non_tree_jointsRigidBodyDynamics.num_positionsRigidBodyDynamics.num_velocitiesRigidBodyDynamics.rand_configuration!RigidBodyDynamics.rand_velocity!RigidBodyDynamics.relative_transformRigidBodyDynamics.relative_twistRigidBodyDynamics.relative_twistRigidBodyDynamics.set_configuration!RigidBodyDynamics.set_configuration!RigidBodyDynamics.set_velocity!RigidBodyDynamics.set_velocity!RigidBodyDynamics.setdirty!RigidBodyDynamics.velocityRigidBodyDynamics.velocityRigidBodyDynamics.zero!RigidBodyDynamics.zero_configuration!RigidBodyDynamics.zero_velocity!
The MechanismState type
RigidBodyDynamics.MechanismState — Type.immutable MechanismState{X<:Number, M<:Number, C<:Number}A MechanismState stores state information for an entire Mechanism. It contains the joint configuration and velocity vectors $q$ and $v$, as well as cache variables that depend on $q$ and $v$ and are aimed at preventing double work.
Type parameters:
X: the scalar type of the $q$ and $v$ vectors.M: the scalar type of theMechanismC: the scalar type of the cache variables (== promote_type(X, M))
Functions
RigidBodyDynamics.configuration — Method.configuration(state, joint)
Return the part of the configuration vector $q$ associated with joint.
RigidBodyDynamics.configuration — Method.configuration(state)
Return the configuration vector $q$.
Note that this returns a reference to the underlying data in state. The user is responsible for calling setdirty! after modifying this vector to ensure that dependent cache variables are invalidated.
RigidBodyDynamics.global_coordinates! — Method.global_coordinates!(state, q0, ϕ)
Convert local coordinates $phi$ centered around $q_0$ to (global) configuration vector $q$.
RigidBodyDynamics.local_coordinates! — Method.local_coordinates!(state, ϕ, ϕd, q0)
Compute local coordinates $phi$ centered around (global) configuration vector $q_0$, as well as their time derivatives $\dot{\phi}$.
RigidBodyDynamics.num_positions — Method.num_positions(state)
Return the length of the joint configuration vector $q$.
RigidBodyDynamics.num_velocities — Method.num_velocities(state)
Return the length of the joint velocity vector $v$.
RigidBodyDynamics.rand_configuration! — Method.rand_configuration!(state)
Randomize the configuration vector $q$. The distribution depends on the particular joint types present in the associated Mechanism. The resulting $q$ is guaranteed to be on the Mechanism's configuration manifold. Invalidates cache variables.
RigidBodyDynamics.rand_velocity! — Method.rand_velocity!(state)
Randomize the velocity vector $v$. Invalidates cache variables.
RigidBodyDynamics.relative_transform — Method.relative_transform(state, from, to)
Return the homogeneous transform from from to to.
RigidBodyDynamics.relative_twist — Method.relative_twist(state, bodyFrame, baseFrame)
Return the twist of bodyFrame with respect to baseFrame, expressed in the Mechanism's root frame.
RigidBodyDynamics.relative_twist — Method.relative_twist(state, body, base)
Return the twist of body with respect to base, expressed in the Mechanism's root frame.
RigidBodyDynamics.set_configuration! — Method.set_configuration!(state, q)
Set the configuration vector $q$. Invalidates cache variables.
RigidBodyDynamics.set_configuration! — Method.set_configuration!(state, joint, q)
Set the part of the configuration vector associated with joint. Invalidates cache variables.
RigidBodyDynamics.set_velocity! — Method.set_velocity!(state, v)
Set the velocity vector $v$. Invalidates cache variables.
RigidBodyDynamics.set_velocity! — Method.set_velocity!(state, joint, v)
Set the part of the velocity vector associated with joint. Invalidates cache variables.
RigidBodyDynamics.setdirty! — Method.setdirty!(state)
Invalidate all cache variables.
RigidBodyDynamics.velocity — Method.velocity(state, joint)
Return the part of the velocity vector $v$ associated with joint.
RigidBodyDynamics.velocity — Method.velocity(state)
Return the velocity vector $v$.
Note that this function returns a read-write reference to a field in state. The user is responsible for calling setdirty! after modifying this vector to ensure that dependent cache variables are invalidated.
RigidBodyDynamics.zero! — Method.zero!(state)
Zero both the configuration and velocity. Invalidates cache variables.
RigidBodyDynamics.zero_configuration! — Method.zero_configuration!(state)
'Zero' the configuration vector $q$. Invalidates cache variables.
Note that when the Mechanism contains e.g. quaternion-parameterized joints, $q$ may not actually be set to all zeros; the quaternion part of the configuration vector would be set to identity. The contract is that each of the joint transforms should be an identity transform.
RigidBodyDynamics.zero_velocity! — Method.zero_velocity!(state)
Zero the velocity vector $v$. Invalidates cache variables.
Base.Random.rand! — Method.rand!(state)
Randomize both the configuration and velocity. Invalidates cache variables.
RigidBodyDynamics.non_tree_joints — Method.non_tree_joints(state)
Return the Joints that are not part of the underlying Mechanism's spanning tree as an iterable collection.