Drake
RevoluteJoint< T > Class Template Referencefinal

This Joint allows two bodies to rotate relatively to one another around a common axis. More...

#include <drake/multibody/multibody_tree/joints/revolute_joint.h>

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

## Public Types

template<typename Scalar >
using Context = systems::Context< Scalar >

## Public Member Functions

RevoluteJoint (const std::string &name, const Frame< T > &frame_on_parent, const Frame< T > &frame_on_child, const Vector3< double > &axis)
Constructor to create a revolute joint between two bodies so that frame F attached to the parent body P and frame M attached to the child body B, rotate relatively to one another about a common axis. More...

const Vector3< double > & get_revolute_axis () const
Returns the axis of revolution of this joint as a unit vector. More...

Does not allow copy, move, or assignment
RevoluteJoint (const RevoluteJoint &)=delete

RevoluteJointoperator= (const RevoluteJoint &)=delete

RevoluteJoint (RevoluteJoint &&)=delete

RevoluteJointoperator= (RevoluteJoint &&)=delete

Context-dependent value access

These methods require the provided context to be an instance of MultibodyTreeContext.

Failure to do so leads to a std::logic_error.

const T & get_angle (const Context< T > &context) const
Gets the rotation angle of this mobilizer from context. More...

const RevoluteJoint< T > & set_angle (Context< T > *context, const T &angle) const
Sets the context so that the generalized coordinate corresponding to the rotation angle of this joint equals angle. More...

const T & get_angular_rate (const Context< T > &context) const
Gets the rate of change, in radians per second, of this joint's angle (see get_angle()) from context. More...

const RevoluteJoint< T > & set_angular_rate (Context< T > *context, const T &angle) const
Sets the rate of change, in radians per second, of this this joint's angle to theta_dot. More...

Public Member Functions inherited from Joint< T >
Joint (const std::string &name, const Frame< T > &frame_on_parent, const Frame< T > &frame_on_child)
Creates a joint between two Frame objects which imposes a given kinematic relation between frame F attached on the parent body P and frame M attached on the child body B. More...

virtual ~Joint ()

const std::string & get_name () const
Returns the name of this joint. More...

const Body< T > & get_parent_body () const
Returns a const reference to the parent body P. More...

const Body< T > & get_child_body () const
Returns a const reference to the child body B. More...

const Frame< T > & get_frame_on_parent () const
Returns a const reference to the frame F attached on the parent body P. More...

const Frame< T > & get_frame_on_child () const
Returns a const reference to the frame M attached on the child body B. More...

Joint (const Joint &)=delete

Jointoperator= (const Joint &)=delete

Joint (Joint &&)=delete

Jointoperator= (Joint &&)=delete

## Friends

template<typename >
class RevoluteJoint

class JointTester

Protected Member Functions inherited from Joint< T >
void DoSetTopology (const MultibodyTreeTopology &)

const JointImplementationget_implementation () const
Returns a const reference to the internal implementation of this joint. More...

## Detailed Description

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

This Joint allows two bodies to rotate relatively to one another around a common axis.

That is, given a frame F attached to the parent body P and a frame M attached to the child body B (see the Joint class's documentation), this Joint allows frames F and M to rotate with respect to each other about an axis â. The rotation angle's sign is defined such that child body B rotates about axis â according to the right hand rule, with thumb aligned in the axis direction. Axis â is constant and has the same measures in both frames F and M, that is, â_F = â_M.

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.

## Member Typedef Documentation

 using Context = systems::Context

## Constructor & Destructor Documentation

 RevoluteJoint ( const RevoluteJoint< T > & )
delete
 RevoluteJoint ( RevoluteJoint< T > && )
delete
 RevoluteJoint ( const std::string & name, const Frame< T > & frame_on_parent, const Frame< T > & frame_on_child, const Vector3< double > & axis )
inline

Constructor to create a revolute joint between two bodies so that frame F attached to the parent body P and frame M attached to the child body B, rotate relatively to one another about a common axis.

See this class's documentation for further details on the definition of these frames and rotation angle. The first three arguments to this constructor are those of the Joint class constructor. See the Joint class's documentation for details. The additional parameter axis is:

Parameters
 [in] axis A vector in ℝ³ specifying the axis of revolution for this joint. Given that frame M only rotates with respect to F and their origins are coincident at all times, the measures of axis in either frame F or M are exactly the same, that is, axis_F = axis_M. In other words, axis_F (or axis_M) is the eigenvector of R_FM with eigenvalue equal to one. This vector can have any length, only the direction is used. This method aborts if axis is the zero vector.

## Member Function Documentation

 const T& get_angle ( const Context< T > & context ) const
inline

Gets the rotation angle of this mobilizer from context.

Parameters
 [in] context The context of the MultibodyTree this joint belongs to.
Returns
The angle coordinate of this joint stored in the context.
 const T& get_angular_rate ( const Context< T > & context ) const
inline

Gets the rate of change, in radians per second, of this joint's angle (see get_angle()) from context.

Parameters
 [in] context The context of the MultibodyTree this joint belongs to.
Returns
The rate of change of this joint's angle as stored in the context.
 const Vector3& get_revolute_axis ( ) const
inline

Returns the axis of revolution of this joint as a unit vector.

Since the measures of this axis in either frame F or M are the same (see this class's documentation for frames's definitions) then, axis = axis_F = axis_M.

 RevoluteJoint& operator= ( RevoluteJoint< T > && )
delete
 RevoluteJoint& operator= ( const RevoluteJoint< T > & )
delete
 const RevoluteJoint& set_angle ( Context< T > * context, const T & angle ) const
inline

Sets the context so that the generalized coordinate corresponding to the rotation angle of this joint equals angle.

Parameters
 [in] context The context of the MultibodyTree this joint belongs to. [in] angle The desired angle in radians to be stored in context.
Returns
a constant reference to this joint.
 const RevoluteJoint& set_angular_rate ( Context< T > * context, const T & angle ) const
inline

Sets the rate of change, in radians per second, of this this joint's angle to theta_dot.

The new rate of change theta_dot gets stored in context.

Parameters
 [in] context The context of the MultibodyTree this joint belongs to. [in] theta_dot The desired rate of change of this joints's angle in radians per second.
Returns
a constant reference to this joint.

Here is the call graph for this function:

## Friends And Related Function Documentation

 friend class JointTester
friend
 friend class RevoluteJoint
friend

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