Drake
AccelerationKinematicsCache< T > Class Template Reference

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

#include <drake/multibody/tree/acceleration_kinematics_cache.h>

## Public Member Functions

AccelerationKinematicsCache (const MultibodyTreeTopology &topology)
Constructs an acceleration kinematics cache entry for the given MultibodyTreeTopology. More...

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

SpatialAcceleration< T > & get_mutable_A_WB (BodyNodeIndex body_node_index)
Mutable version of get_A_WB(). More...

const std::vector< SpatialAcceleration< T > > & get_A_WB_pool () const
Returns a const reference to the pool of body accelerations. More...

std::vector< SpatialAcceleration< T > > & get_mutable_A_WB_pool ()
Mutable version of get_A_WB_pool(). More...

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

AccelerationKinematicsCacheoperator= (const AccelerationKinematicsCache &)=default

AccelerationKinematicsCache (AccelerationKinematicsCache &&)=default

AccelerationKinematicsCacheoperator= (AccelerationKinematicsCache &&)=default

## Detailed Description

### template<typename T> class drake::multibody::AccelerationKinematicsCache< 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 and generalized velocities, but also on the time derivatives of the generalized coordinates. Acceleration kinematics results include:

• Spatial acceleration A_WB for each body B in the model as measured and expressed in the world frame W.
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

They are already available to link against in the containing library.

## ◆ AccelerationKinematicsCache() [1/3]

 AccelerationKinematicsCache ( const AccelerationKinematicsCache< T > & )
default

## ◆ AccelerationKinematicsCache() [2/3]

 AccelerationKinematicsCache ( AccelerationKinematicsCache< T > && )
default

## ◆ AccelerationKinematicsCache() [3/3]

 AccelerationKinematicsCache ( const MultibodyTreeTopology & topology )
inlineexplicit

Constructs an acceleration 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.

## ◆ get_A_WB()

 const SpatialAcceleration& get_A_WB ( BodyNodeIndex body_node_index ) const
inline

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

This method aborts in Debug builds if body_node_index does not correspond to a valid BodyNode in the MultibodyTree.

Parameters
 [in] body_node_index The unique index for the computational BodyNode object associated with body B.
Return values
 A_WB the spatial acceleration of the body frame B measured and expressed in the world frame W.

## ◆ get_A_WB_pool()

 const std::vector >& get_A_WB_pool ( ) const
inline

Returns a const reference to the pool of body accelerations.

The pool is returned as a std::vector of SpatialAcceleration objects ordered by BodyNodeIndex. Most users should not need to call this method.

## ◆ get_mutable_A_WB()

 SpatialAcceleration& get_mutable_A_WB ( BodyNodeIndex body_node_index )
inline

Mutable version of get_A_WB().

## ◆ get_mutable_A_WB_pool()

 std::vector >& get_mutable_A_WB_pool ( )
inline

Mutable version of get_A_WB_pool().

## ◆ operator=() [1/2]

 AccelerationKinematicsCache& operator= ( AccelerationKinematicsCache< T > && )
default

## ◆ operator=() [2/2]

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

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