Drake
Body< T > Class Template Referenceabstract

Body provides the general abstraction of a body with an API that makes no assumption about whether a body is rigid or deformable and neither does it make any assumptions about the underlying physical model or approximation. More...

#include <drake/multibody/multibody_tree/body.h>

Inheritance diagram for Body< T >:
Collaboration diagram for Body< T >:

Public Member Functions

 Body ()
 Creates a Body with a BodyFrame associated with it. More...
 
virtual int get_num_flexible_positions () const =0
 Returns the number of generalized positions q describing flexible deformations for this body. More...
 
virtual int get_num_flexible_velocities () const =0
 Returns the number of generalized velocities v describing flexible deformations for this body. More...
 
const BodyFrame< T > & get_body_frame () const
 Returns a const reference to the associated BodyFrame. More...
 
BodyNodeIndex get_node_index () const
 Returns the index of the node in the underlying tree structure of the parent MultibodyTree to which this body belongs. More...
 
virtual SpatialInertia< T > CalcSpatialInertiaInBodyFrame (const MultibodyTreeContext< T > &context) const =0
 Computes the SpatialInertia I_BBo_B of this body about its frame origin Bo (not necessarily its center of mass) and expressed in its body frame B. More...
 
Does not allow copy, move, or assignment
 Body (const Body &)=delete
 
Bodyoperator= (const Body &)=delete
 
 Body (Body &&)=delete
 
Bodyoperator= (Body &&)=delete
 

Friends

class internal::BodyAttorney< T >
 

Detailed Description

template<typename T>
class drake::multibody::Body< T >

Body provides the general abstraction of a body with an API that makes no assumption about whether a body is rigid or deformable and neither does it make any assumptions about the underlying physical model or approximation.

As an element or component of a MultibodyTree, a body is a MultibodyTreeElement, and therefore it has a unique index of type BodyIndex within the multibody tree it belongs to.

A Body contains a unique BodyFrame; see BodyFrame class documentation for more information.

Template Parameters
TThe scalar type. Must be a valid Eigen scalar.

Constructor & Destructor Documentation

Body ( const Body< T > &  )
delete
Body ( Body< T > &&  )
delete
Body ( )
inline

Creates a Body with a BodyFrame associated with it.

Member Function Documentation

virtual SpatialInertia<T> CalcSpatialInertiaInBodyFrame ( const MultibodyTreeContext< T > &  context) const
pure virtual

Computes the SpatialInertia I_BBo_B of this body about its frame origin Bo (not necessarily its center of mass) and expressed in its body frame B.

In general, the spatial inertia of a body is a function of state. Consider for instance the case of a flexible body for which its spatial inertia in the body frame depends on the generalized coordinates describing its state of deformation. As a particular case, the spatial inertia of a RigidBody in its body frame is constant.

Implemented in RigidBody< T >, and RigidBody< double >.

Here is the caller graph for this function:

const BodyFrame<T>& get_body_frame ( ) const
inline

Returns a const reference to the associated BodyFrame.

BodyNodeIndex get_node_index ( ) const
inline

Returns the index of the node in the underlying tree structure of the parent MultibodyTree to which this body belongs.

virtual int get_num_flexible_positions ( ) const
pure virtual

Returns the number of generalized positions q describing flexible deformations for this body.

A rigid body will therefore return zero.

Implemented in RigidBody< T >, and RigidBody< double >.

virtual int get_num_flexible_velocities ( ) const
pure virtual

Returns the number of generalized velocities v describing flexible deformations for this body.

A rigid body will therefore return zero.

Implemented in RigidBody< T >, and RigidBody< double >.

Body& operator= ( const Body< T > &  )
delete
Body& operator= ( Body< T > &&  )
delete

Friends And Related Function Documentation

friend class internal::BodyAttorney< T >
friend

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