Drake
VelocityKinematicsCache< T > Class Template Reference

This class is one of the cache entries in MultibodyTreeContext. More...

#include <multibody/multibody_tree/velocity_kinematics_cache.h>

## Public Member Functions

VelocityKinematicsCache (const MultibodyTreeTopology &topology)
Constructs a velocity kinematics cache entry for the given MultibodyTreeTopology. More...

void InitializeToZero ()
Initializes this VelocityKinematicsCache as if all generalized velocities of the corresponding MultibodyTree model were zero. More...

const SpatialVelocity< T > & get_V_WB (BodyNodeIndex body_node_index) const
Returns a constant reference to the spatial velocity V_WB of the body B (associated with node body_node_index) as measured and expressed in the world frame W. More...

SpatialVelocity< T > & get_mutable_V_WB (BodyNodeIndex body_node_index)
Mutable version of get_V_WB(). More...

const SpatialVelocity< T > & get_V_FM (BodyNodeIndex body_node_index) const
Returns a const reference to the across-mobilizer (associated with node body_node_index) spatial velocity V_FM of the outboard frame M in the inboard frame F. More...

SpatialVelocity< T > & get_mutable_V_FM (BodyNodeIndex body_node_index)
Mutable version of get_V_FM(). More...

const SpatialVelocity< T > & get_V_PB_W (BodyNodeIndex body_node_index) const
Returns a const reference to the spatial velocity V_PB_W of the body B associated with node body_node_index in the parent node's body frame P, expressed in the world frame W. More...

SpatialVelocity< T > & get_mutable_V_PB_W (BodyNodeIndex body_node_index)
Mutable version of get_V_PB_W(). More...

Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
VelocityKinematicsCache (const VelocityKinematicsCache &)=default

VelocityKinematicsCacheoperator= (const VelocityKinematicsCache &)=default

VelocityKinematicsCache (VelocityKinematicsCache &&)=default

VelocityKinematicsCacheoperator= (VelocityKinematicsCache &&)=default

## Detailed Description

### template<typename T> class drake::multibody::VelocityKinematicsCache< T >

This class is one of the cache entries in MultibodyTreeContext.

It holds the kinematics results of computations that depend not only on the generalized positions of the system, but also on its generalized velocities. Velocity kinematics results include:

• Spatial velocity V_WB for each body B in the model as measured and expressed in the world frame W.
• Spatial velocity V_PB for each body B in the model as measured and expressed in the inboard (or parent) body frame P.
• Spatial velocity V_FMb_W of frame Mb measured in the inboard frame F and expressed in W. Mb is an "offset" frame rigidly fixed to M, whose axes are parallel to M but whose origin is at Bo rather than Mo.
Template Parameters
 T The mathematical type of the context, which must be a valid Eigen scalar.

Instantiated templates for the following kinds of T's are provided:

• double
• AutoDiffXd

## Constructor & Destructor Documentation

 VelocityKinematicsCache ( const VelocityKinematicsCache< T > & )
default
 VelocityKinematicsCache ( VelocityKinematicsCache< T > && )
default
 VelocityKinematicsCache ( const MultibodyTreeTopology & topology )
inlineexplicit

Constructs a velocity kinematics cache entry for the given MultibodyTreeTopology.

In Release builds specific entries are left uninitialized resulting in a zero cost operation. However in Debug builds those entries are set to NaN so that operations using this uninitialized cache entry fail fast, easing bug detection.

Here is the call graph for this function:

## Member Function Documentation

 SpatialVelocity& get_mutable_V_FM ( BodyNodeIndex body_node_index )
inline

Mutable version of get_V_FM().

Here is the caller graph for this function:

 SpatialVelocity& get_mutable_V_PB_W ( BodyNodeIndex body_node_index )
inline

Mutable version of get_V_PB_W().

Here is the caller graph for this function:

 SpatialVelocity& get_mutable_V_WB ( BodyNodeIndex body_node_index )
inline

Mutable version of get_V_WB().

Here is the caller graph for this function:

 const SpatialVelocity& get_V_FM ( BodyNodeIndex body_node_index ) const
inline

Returns a const reference to the across-mobilizer (associated with node body_node_index) spatial velocity V_FM of the outboard frame M in the inboard frame F.

Here is the caller graph for this function:

 const SpatialVelocity& get_V_PB_W ( BodyNodeIndex body_node_index ) const
inline

Returns a const reference to the spatial velocity V_PB_W of the body B associated with node body_node_index in the parent node's body frame P, expressed in the world frame W.

Here is the caller graph for this function:

 const SpatialVelocity& get_V_WB ( BodyNodeIndex body_node_index ) const
inline

Returns a constant reference to the spatial velocity V_WB of the body B (associated with node body_node_index) as measured and expressed in the world frame W.

Parameters
 [in] body_node_index The unique index for the computational BodyNode object associated with body B.
Returns
V_WB the spatial velocity of the body frame B measured and expressed in the world frame W.

Here is the caller graph for this function:

 void InitializeToZero ( )
inline

Initializes this VelocityKinematicsCache as if all generalized velocities of the corresponding MultibodyTree model were zero.

Here is the caller graph for this function:

 VelocityKinematicsCache& operator= ( VelocityKinematicsCache< T > && )
default
 VelocityKinematicsCache& operator= ( const VelocityKinematicsCache< T > & )
default

The documentation for this class was generated from the following file: