Drake
RigidBody< T > Class Template Reference

The term rigid body implies that the deformations of the body under consideration are so small that they have no significant effect on the overall motions of the body and therefore deformations can be neglected. More...

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

Inheritance diagram for RigidBody< T >:
[legend]
Collaboration diagram for RigidBody< T >:
[legend]

## Public Member Functions

RigidBody (const SpatialInertia< double > M_BBo_B)
Constructs a RigidBody with the given default SpatialInertia. More...

int get_num_flexible_positions () const final
There are no flexible degrees of freedom associated with a rigid body and therefore this method returns zero. More...

int get_num_flexible_velocities () const final
There are no flexible degrees of freedom associated with a rigid body and therefore this method returns zero. More...

const Vector3< double > & get_default_com () const
Returns the default value of this body's center of mass as measured and expressed in this body's frame. More...

SpatialInertia< T > CalcSpatialInertiaInBodyFrame (const MultibodyTreeContext< T > &) const override
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
RigidBody (const RigidBody &)=delete

RigidBodyoperator= (const RigidBody &)=delete

RigidBody (RigidBody &&)=delete

RigidBodyoperator= (RigidBody &&)=delete

Public Member Functions inherited from Body< T >
Body ()
Creates a Body with a BodyFrame associated with it. 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...

template<typename ToScalar >
std::unique_ptr< Body< ToScalar > > CloneToScalar (const MultibodyTree< ToScalar > &tree_clone) const
NVI (Non-Virtual Interface) to DoCloneToScalar() templated on the scalar type of the new clone to be created. More...

Body (const Body &)=delete

Bodyoperator= (const Body &)=delete

Body (Body &&)=delete

Bodyoperator= (Body &&)=delete

## Protected Member Functions

std::unique_ptr< Body< double > > DoCloneToScalar (const MultibodyTree< double > &tree_clone) const final
Clones this Body (templated on T) to a body templated on double. More...

std::unique_ptr< Body< AutoDiffXd > > DoCloneToScalar (const MultibodyTree< AutoDiffXd > &tree_clone) const final
Clones this Body (templated on T) to a body templated on AutoDiffXd. More...

Methods to make a clone templated on different scalar types.

These methods are meant to be called by MultibodyTree::CloneToScalar() when making a clone of the entire tree or a new instance templated on a different scalar type.

The only const argument to these methods is the new MultibodyTree clone under construction. Specific Body subclasses might specify a number of prerequisites on the cloned tree and therefore require it to be at a given state of cloning (for instance requiring that the cloned tree already contains all the frames in the world as in the original tree.) See MultibodyTree::CloneToScalar() for a list of prerequisites that are guaranteed to be satisfied during the cloning process.

## Detailed Description

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

The term rigid body implies that the deformations of the body under consideration are so small that they have no significant effect on the overall motions of the body and therefore deformations can be neglected.

If deformations are neglected, the distance between any two points on the rigid body remains constant at all times. This invariance of the distance between two arbitrary points is often taken as the definition of a rigid body in classical treatments of multibody mechanics [Goldstein 2001]. It can be demonstrated that the unconstrained three-dimensional motions of a rigid body can be described by six coordinates and thus it is often said that a free body in space has six degrees of freedom. These degrees of freedom obey the Newton-Euler equations of motion. However, within a MultibodyTree, a RigidBody is not free in space; instead, it is assigned a limited number of degrees of freedom (0-6) with respect to its parent body in the multibody tree by its Mobilizer (also called a "tree joint" or "inboard joint"). Additional constraints on permissible motion can be added using Constraint objects to remove more degrees of freedom.

• [Goldstein 2001] H Goldstein, CP Poole, JL Safko, Classical Mechanics (3rd Edition), Addison-Wesley, 2001.
Template Parameters
 T The scalar type. 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. No other values for T are currently supported.

## Constructor & Destructor Documentation

 RigidBody ( const RigidBody< T > & )
delete
 RigidBody ( RigidBody< T > && )
delete
 RigidBody ( const SpatialInertia< double > M_BBo_B )
explicit

Constructs a RigidBody with the given default SpatialInertia.

Parameters
 [in] M_BBo_B Spatial inertia of this body B about the frame's origin Bo and expressed in the body frame B.
Note
See Spatial Mass Matrix (Spatial Inertia) for details on the monogram notation used for spatial inertia quantities.

## Member Function Documentation

 SpatialInertia CalcSpatialInertiaInBodyFrame ( const MultibodyTreeContext< T > & context ) const
inlineoverridevirtual

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.

Implements Body< T >.

 std::unique_ptr > DoCloneToScalar ( const MultibodyTree< double > & tree_clone ) const
inlinefinalprotectedvirtual

Clones this Body (templated on T) to a body templated on double.

Implements Body< T >.

 std::unique_ptr > DoCloneToScalar ( const MultibodyTree< AutoDiffXd > & tree_clone ) const
inlinefinalprotectedvirtual

Clones this Body (templated on T) to a body templated on AutoDiffXd.

Implements Body< T >.

 const Vector3& get_default_com ( ) const
inline

Returns the default value of this body's center of mass as measured and expressed in this body's frame.

This value is initially supplied at construction when specifying this body's SpatialInertia.

Return values
 p_BoBcm_B The position of this body's center of mass Bcm measured from this body's frame origin Bo and expressed in this body's frame B.
 int get_num_flexible_positions ( ) const
inlinefinalvirtual

There are no flexible degrees of freedom associated with a rigid body and therefore this method returns zero.

By definition, a rigid body has no state associated with flexible deformations.

Implements Body< T >.

 int get_num_flexible_velocities ( ) const
inlinefinalvirtual

There are no flexible degrees of freedom associated with a rigid body and therefore this method returns zero.

By definition, a rigid body has no state associated with flexible deformations.

Implements Body< T >.

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

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