Drake

This Joint allows two bodies to translate relative to one another along a common axis. More...
#include <drake/multibody/multibody_tree/joints/prismatic_joint.h>
Public Types  
template<typename Scalar >  
using  Context = systems::Context< Scalar > 
Public Member Functions  
PrismaticJoint (const std::string &name, const Frame< T > &frame_on_parent, const Frame< T > &frame_on_child, const Vector3< double > &axis)  
Constructor to create a prismatic joint between two bodies so that frame F attached to the parent body P and frame M attached to the child body B, translate relatively to one another along a common axis. More...  
const Vector3< double > &  translation_axis () const 
Returns the axis of translation for this joint as a unit vector. More...  
void  AddInForce (const systems::Context< T > &context, const T &force, MultibodyForces< T > *multibody_forces) const 
Adds into multibody_forces a given force , in Newtons, for this joint that is to be applied along the joint's axis. More...  
Does not allow copy, move, or assignment  
PrismaticJoint (const PrismaticJoint &)=delete  
PrismaticJoint &  operator= (const PrismaticJoint &)=delete 
PrismaticJoint (PrismaticJoint &&)=delete  
PrismaticJoint &  operator= (PrismaticJoint &&)=delete 
Contextdependent 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_translation (const Context< T > &context) const 
Gets the translation distance of this mobilizer from context . More...  
const PrismaticJoint< T > &  set_translation (Context< T > *context, const T &translation) const 
Sets context so that the generalized coordinate corresponding to the translation distance of this joint equals translation . More...  
const T &  get_translation_rate (const Context< T > &context) const 
Gets the rate of change, in meters per second, of this joint's translation distance (see get_translation()) from context . More...  
const PrismaticJoint< T > &  set_translation_rate (Context< T > *context, const T &translation_dot) const 
Sets the rate of change, in meters per second, of this joint's translation distance to translation_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 &  name () const 
Returns the name of this joint. More...  
const Body< T > &  parent_body () const 
Returns a const reference to the parent body P. More...  
const Body< T > &  child_body () const 
Returns a const reference to the child body B. More...  
const Frame< T > &  frame_on_parent () const 
Returns a const reference to the frame F attached on the parent body P. More...  
const Frame< T > &  frame_on_child () const 
Returns a const reference to the frame M attached on the child body B. More...  
int  num_dofs () const 
Returns the number of degrees of freedom for this joint. More...  
void  AddInOneForce (const systems::Context< T > &context, int joint_dof, const T &joint_tau, MultibodyForces< T > *forces) const 
Adds into forces a force along the one of the joint's degrees of freedom indicated by index joint_dof . More...  
Joint (const Joint &)=delete  
Joint &  operator= (const Joint &)=delete 
Joint (Joint &&)=delete  
Joint &  operator= (Joint &&)=delete 
Protected Member Functions  
void  DoAddInOneForce (const systems::Context< T > &, int joint_dof, const T &joint_tau, MultibodyForces< T > *forces) const final 
Joint<T> virtual override called through public NVI, Joint::AddInForce(). More...  
Protected Member Functions inherited from Joint< T >  
void  DoSetTopology (const MultibodyTreeTopology &) 
const JointImplementation &  get_implementation () const 
Returns a const reference to the internal implementation of this joint. More...  
Friends  
template<typename >  
class  PrismaticJoint 
class  JointTester 
This Joint allows two bodies to translate relative to one another along 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 translate with respect to each other along an axis â. The translation distance is defined positive when child body B translates along the direction of â. Axis â is constant and has the same measures in both frames F and M, that is, â_F = â_M
.
T  The scalar type. Must be a valid Eigen scalar. 
Instantiated templates for the following kinds of T's are provided:
They are already available to link against in the containing library. No other values for T are currently supported.
using Context = systems::Context<Scalar> 

delete 

delete 

inline 
Constructor to create a prismatic joint between two bodies so that frame F attached to the parent body P and frame M attached to the child body B, translate relatively to one another along a common axis.
See this class's documentation for further details on the definition of these frames and translation distance. 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:
[in]  axis  A vector in ℝ³ specifying the translation axis for this joint. Given that frame M only translates with respect to F and there is no relative rotation, the measures of axis in either frame F or M are exactly the same, that is, axis_F = axis_M . This vector can have any length, only the direction is used. 
std::exception  if the L2 norm of axis is less than the square root of machine epsilon. 

inline 
Adds into multibody_forces
a given force
, in Newtons, for this
joint that is to be applied along the joint's axis.
The force is defined to be positive in the direction along this joint's axis. That is, a positive force causes a positive translational acceleration along the joint's axis.

inlinefinalprotectedvirtual 
Joint<T> virtual override called through public NVI, Joint::AddInForce().
Therefore arguments were already checked to be valid. For a PrismaticJoint, we must always have joint_dof = 0
since there is only a single degree of freedom (get_num_dofs() == 1). joint_tau
is the linear force applied along the joint's axis, on the body declared as child (according to the prismatic joint's constructor) at the origin of the child frame (which is coincident with the origin of the parent frame at all times).
Implements Joint< T >.

inline 
Gets the translation distance of this
mobilizer from context
.
[in]  context  The context of the MultibodyTree this joint belongs to. 
this
joint read from context
.

inline 
Gets the rate of change, in meters per second, of this
joint's translation distance (see get_translation()) from context
.
[in]  context  The context of the MultibodyTree this joint belongs to. 
this
joint's translation read from context
.

delete 

delete 

inline 
Sets context
so that the generalized coordinate corresponding to the translation distance of this
joint equals translation
.
[in]  context  The context of the MultibodyTree this joint belongs to. 
[in]  translation  The desired translation in meters to be stored in context . 
this
joint.

inline 
Sets the rate of change, in meters per second, of this
joint's translation distance to translation_dot
.
The new rate of change translation_dot
gets stored in context
.
[in]  context  The context of the MultibodyTree this joint belongs to. 
[in]  translation_dot  The desired rate of change of this joints's translation in meters per second. 
this
joint. Returns the axis of translation for 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
.

friend 

friend 