Drake
AxiallySymmetricFreeBodyPlant< T > Class Template Referencefinal

This plant models the free motion of a torque free body in space. More...

#include <drake/multibody/tree/test/floating_body_plant.h>

Public Member Functions

 AxiallySymmetricFreeBodyPlant (double mass, double I, double J, double g)
 Constructor from known rotational inertia values. More...
 
template<typename U >
 AxiallySymmetricFreeBodyPlant (const AxiallySymmetricFreeBodyPlant< U > &)
 Scalar-converting copy constructor. More...
 
void SetDefaultState (const systems::Context< T > &context, systems::State< T > *state) const override
 Sets state to a default value corresponding to a configuration in which the free body frame B is coincident with the world frame W and the angular and translational velocities have a value as returned by get_default_initial_angular_velocity() and get_default_initial_translational_velocity(), respectively. More...
 
Vector3< T > get_angular_velocity (const systems::Context< T > &context) const
 Returns the angular velocity w_WB stored in context of the free body B in the world frame W. More...
 
Vector3< T > get_translational_velocity (const systems::Context< T > &context) const
 Returns the translational velocity v_WB stored in context of the free body B in the world frame W. More...
 
math::RigidTransform< T > CalcPoseInWorldFrame (const systems::Context< T > &context) const
 Computes the pose X_WB of the body in the world frame. More...
 
SpatialVelocity< T > CalcSpatialVelocityInWorldFrame (const systems::Context< T > &context) const
 Computes the spatial velocity V_WB of the body in the world frame. More...
 
const RigidBody< T > & body () const
 Returns a constant reference to the free body model of this plant. More...
 
Does not allow copy, move, or assignment
 AxiallySymmetricFreeBodyPlant (const AxiallySymmetricFreeBodyPlant &)=delete
 
AxiallySymmetricFreeBodyPlantoperator= (const AxiallySymmetricFreeBodyPlant &)=delete
 
 AxiallySymmetricFreeBodyPlant (AxiallySymmetricFreeBodyPlant &&)=delete
 
AxiallySymmetricFreeBodyPlantoperator= (AxiallySymmetricFreeBodyPlant &&)=delete
 

Static Public Member Functions

static Vector3< doubleget_default_initial_angular_velocity ()
 Returns the default value of the angular velocity set by default by SetDefaultState(). More...
 
static Vector3< doubleget_default_initial_translational_velocity ()
 Returns the default value of the translational velocity set by default by SetDefaultState(). More...
 

Detailed Description

template<typename T>
class drake::multibody::multibody_tree::test::AxiallySymmetricFreeBodyPlant< T >

This plant models the free motion of a torque free body in space.

This body is axially symmetric with rotational inertia about its axis of revolution J and with a rotational inertia I about any axis perpendicular to its axis of revolution. This particular case has a nice closed form analytical solution which we have implemented in drake::multibody::benchmarks::free_body::FreeBody.

Template Parameters
TThe 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

◆ AxiallySymmetricFreeBodyPlant() [1/4]

◆ AxiallySymmetricFreeBodyPlant() [2/4]

◆ AxiallySymmetricFreeBodyPlant() [3/4]

Constructor from known rotational inertia values.

Rotational inertia values have units of kg⋅m².

Parameters
massThe mass of the body.
Irotational inertia about any axis perpendicular to the axis of revolution of the body.
Jrotational inertia about the axis of revolution of the body.
gAcceleration of gravity. In this model if g > 0 the gravity vector points downward in the z-axis direction.

◆ AxiallySymmetricFreeBodyPlant() [4/4]

Scalar-converting copy constructor.

Member Function Documentation

◆ body()

const RigidBody<T>& body ( ) const
inline

Returns a constant reference to the free body model of this plant.

◆ CalcPoseInWorldFrame()

math::RigidTransform< T > CalcPoseInWorldFrame ( const systems::Context< T > &  context) const

Computes the pose X_WB of the body in the world frame.

◆ CalcSpatialVelocityInWorldFrame()

SpatialVelocity< T > CalcSpatialVelocityInWorldFrame ( const systems::Context< T > &  context) const

Computes the spatial velocity V_WB of the body in the world frame.

◆ get_angular_velocity()

Vector3< T > get_angular_velocity ( const systems::Context< T > &  context) const

Returns the angular velocity w_WB stored in context of the free body B in the world frame W.

◆ get_default_initial_angular_velocity()

Vector3< double > get_default_initial_angular_velocity ( )
static

Returns the default value of the angular velocity set by default by SetDefaultState().

Currently a non-zero value.

◆ get_default_initial_translational_velocity()

Vector3< double > get_default_initial_translational_velocity ( )
static

Returns the default value of the translational velocity set by default by SetDefaultState().

Currently a non-zero value.

◆ get_translational_velocity()

Vector3< T > get_translational_velocity ( const systems::Context< T > &  context) const

Returns the translational velocity v_WB stored in context of the free body B in the world frame W.

◆ operator=() [1/2]

◆ operator=() [2/2]

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

◆ SetDefaultState()

void SetDefaultState ( const systems::Context< T > &  context,
systems::State< T > *  state 
) const
override

Sets state to a default value corresponding to a configuration in which the free body frame B is coincident with the world frame W and the angular and translational velocities have a value as returned by get_default_initial_angular_velocity() and get_default_initial_translational_velocity(), respectively.


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