Drake
JointActuator< T > Class Template Referencefinal

The JointActuator class is mostly a simple bookkeeping structure to represent an actuator acting on a given Joint. More...

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

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

Public Member Functions

 JointActuator (const std::string &name, const Joint< T > &joint)
 Creates an actuator for joint with the given name. More...
 
const std::string & name () const
 Returns the name of the actuator. More...
 
const Joint< T > & joint () const
 Returns a reference to the joint actuated by this JointActuator. More...
 
void AddInOneForce (const systems::Context< T > &context, int joint_dof, const T &tau, MultibodyForces< T > *forces) const
 Adds into forces a force along one of the degrees of freedom of the Joint actuated by this actuator. More...
 
void set_actuation_vector (const Eigen::Ref< const VectorX< T >> &u_instance, EigenPtr< VectorX< T >> u) const
 Given the actuation values u_instance for this actuator, this method sets the actuation vector u for the entire MultibodyTree model to which this actuator belongs to. More...
 
Does not allow copy, move, or assignment
 JointActuator (const JointActuator &)=delete
 
JointActuatoroperator= (const JointActuator &)=delete
 
 JointActuator (JointActuator &&)=delete
 
JointActuatoroperator= (JointActuator &&)=delete
 

Friends

template<typename U >
class JointActuator
 

Detailed Description

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

The JointActuator class is mostly a simple bookkeeping structure to represent an actuator acting on a given Joint.

It helps to flag whether a given Joint is actuated or not so that MultibodyTree clients can apply forces on actuated joints through their actuators, see AddInOneForce().

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

Constructor & Destructor Documentation

JointActuator ( const JointActuator< T > &  )
delete
JointActuator ( JointActuator< T > &&  )
delete
JointActuator ( const std::string &  name,
const Joint< T > &  joint 
)

Creates an actuator for joint with the given name.

The name must be unique within the given MultibodyTree model. This is enforced by MultibodyTree::AddJointActuator().

Member Function Documentation

void AddInOneForce ( const systems::Context< T > &  context,
int  joint_dof,
const T &  tau,
MultibodyForces< T > *  forces 
) const

Adds into forces a force along one of the degrees of freedom of the Joint actuated by this actuator.

The meaning for this degree of freedom, sign conventions and even its dimensional units depend on the specific joint sub-class being actuated. For a RevoluteJoint for instance, joint_dof can only be 0 since revolute joints's motion subspace only has one degree of freedom, while the units of tau are those of torque (N⋅m in the MKS system of units). For multi-dof joints please refer to the documentation provided by specific joint sub-classes regarding the meaning of joint_dof.

Parameters
[in]contextThe context storing the state and parameters for the model to which this joint belongs.
[in]joint_dofIndex specifying one of the degress of freedom for this joint. The index must be in the range 0 <= joint_dof < num_dofs() or otherwise this method will throw an exception.
[in]joint_tauGeneralized force corresponding to the degree of freedom indicated by joint_dof to be added into forces. Refere to the specific Joint sub-class documentation for details on the meaning and units for this degree of freedom.
[out]forcesOn return, this method will add force tau for the degree of freedom joint_dof into the output forces. This method aborts if forces is nullptr or if forces doest not have the right sizes to accommodate a set of forces for the model to which this actuator belongs.

Here is the call graph for this function:

Here is the caller graph for this function:

const Joint< T > & joint ( ) const

Returns a reference to the joint actuated by this JointActuator.

Here is the caller graph for this function:

const std::string& name ( ) const
inline

Returns the name of the actuator.

Here is the call graph for this function:

JointActuator& operator= ( JointActuator< T > &&  )
delete
JointActuator& operator= ( const JointActuator< T > &  )
delete
void set_actuation_vector ( const Eigen::Ref< const VectorX< T >> &  u_instance,
EigenPtr< VectorX< T >>  u 
) const

Given the actuation values u_instance for this actuator, this method sets the actuation vector u for the entire MultibodyTree model to which this actuator belongs to.

Parameters
[in]u_instanceActuation values for this actuator. It must be of size equal to the number of degrees of freedom of the actuated Joint, see Joint::num_dofs(). For units and sign conventions refer to the specific Joint sub-class documentation.
[out]uThe vector containing the actuation values for the entire MultibodyTree model to which this actuator belongs to.
Exceptions
ifu_instance.size() != this->joint().num_dofs().
ifu is nullptr.
ifu.size() != this->get_parent_tree().num_actuated_dofs().

Here is the call graph for this function:

Here is the caller graph for this function:

Friends And Related Function Documentation

friend class JointActuator
friend

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