Drake
AccelerationKinematicsCache< T > Class Template Reference

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

#include <multibody/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
TThe 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.

Constructor & Destructor Documentation

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.

Here is the call graph for this function:

Member Function Documentation

const SpatialAcceleration<T>& 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_indexThe unique index for the computational BodyNode object associated with body B.
Return values
A_WBthe spatial acceleration of the body frame B measured and expressed in the world frame W.

Here is the caller graph for this function:

const std::vector<SpatialAcceleration<T> >& 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.

SpatialAcceleration<T>& get_mutable_A_WB ( BodyNodeIndex  body_node_index)
inline

Mutable version of get_A_WB().

Here is the caller graph for this function:

std::vector<SpatialAcceleration<T> >& get_mutable_A_WB_pool ( )
inline

Mutable version of get_A_WB_pool().

Here is the call graph for this function:

Here is the caller graph for this function:

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

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