ros2_control - foxy
Loading...
Searching...
No Matches
transmission_interface::SimpleTransmission Class Reference

Implementation of a simple reducer transmission. More...

#include <simple_transmission.hpp>

Inheritance diagram for transmission_interface::SimpleTransmission:
Collaboration diagram for transmission_interface::SimpleTransmission:

Public Member Functions

 SimpleTransmission (const double joint_to_actuator_reduction, const double joint_offset=0.0)
void configure (const std::vector< JointHandle > &joint_handles, const std::vector< ActuatorHandle > &actuator_handles) override
 Set up the data the transmission operates on.
void actuator_to_joint () override
 Transform variables from actuator to joint space.
void joint_to_actuator () override
 Transform variables from joint to actuator space.
std::size_t num_actuators () const override
std::size_t num_joints () const override
double get_actuator_reduction () const
double get_joint_offset () const

Protected Attributes

double reduction_
double jnt_offset_
JointHandle joint_position_ = {"", "", nullptr}
JointHandle joint_velocity_ = {"", "", nullptr}
JointHandle joint_effort_ = {"", "", nullptr}
ActuatorHandle actuator_position_ = {"", "", nullptr}
ActuatorHandle actuator_velocity_ = {"", "", nullptr}
ActuatorHandle actuator_effort_ = {"", "", nullptr}

Detailed Description

Implementation of a simple reducer transmission.

This transmission relates one actuator and one joint through a reductor (or amplifier). Timing belts and gears are examples of this transmission type, and are illustrated below.

Effort
Velocity
Position
Actuator to joint

\‍[ \tau_j = n \tau_a \‍]

\‍[ \dot{x}_j = \dot{x}_a / n \‍]

\‍[ x_j = x_a / n + x_{off} \‍]

Joint to actuator

\‍[ \tau_a = \tau_j / n\‍]

\‍[ \dot{x}_a = n \dot{x}_j \‍]

\‍[ x_a = n (x_j - x_{off}) \‍]

where:

  • $ x $, $ \dot{x} $ and $ \tau $ are position, velocity and effort variables, respectively.
  • Subindices $ _a $ and $ _j $ are used to represent actuator-space and joint-space variables, respectively.
  • $ x_{off}$ represents the offset between motor and joint zeros, expressed in joint position coordinates.
  • $ n $ is the transmission ratio, and can be computed as the ratio between the output and input pulley radii for the timing belt; or the ratio between output and input teeth for the gear system. The transmission ratio can take any real value except zero. In particular:
    • If its absolute value is greater than one, it's a velocity reducer / effort amplifier, while if its absolute value lies in $ (0, 1) $ it's a velocity amplifier / effort reducer.
    • Negative values represent a direction flip, ie. actuator and joint move in opposite directions. For example, in timing belts actuator and joint move in the same direction, while in single-stage gear systems actuator and joint move in opposite directions.

Constructor & Destructor Documentation

◆ SimpleTransmission()

transmission_interface::SimpleTransmission::SimpleTransmission ( const double joint_to_actuator_reduction,
const double joint_offset = 0.0 )
inlineexplicit
Parameters
[in]joint_to_actuator_reductionJoint to actuator reduction ratio.
[in]joint_offsetJoint position offset used in the position mappings.
Precondition
Nonzero reduction value.

Member Function Documentation

◆ actuator_to_joint()

void transmission_interface::SimpleTransmission::actuator_to_joint ( )
inlineoverridevirtual

Transform variables from actuator to joint space.

This method operates on the handles provided when configuring the transmission. To call this method it is not required that all supported interface types are provided, e.g. one can supply only velocity handles

Implements transmission_interface::Transmission.

◆ configure()

void transmission_interface::SimpleTransmission::configure ( const std::vector< JointHandle > & joint_handles,
const std::vector< ActuatorHandle > & actuator_handles )
inlineoverridevirtual

Set up the data the transmission operates on.

Parameters
[in]joint_handlesVector of interface handles of one joint
[in]actuator_handlesVector of interface handles of one actuator
Precondition
Vectors are nonzero.
Joint handles share the same joint name and actuator handles share the same actuator name.

Implements transmission_interface::Transmission.

◆ joint_to_actuator()

void transmission_interface::SimpleTransmission::joint_to_actuator ( )
inlineoverridevirtual

Transform variables from joint to actuator space.

This method operates on the handles provided when configuring the transmission. To call this method it is not required that all supported interface types are provided, e.g. one can supply only velocity handles

Implements transmission_interface::Transmission.

◆ num_actuators()

std::size_t transmission_interface::SimpleTransmission::num_actuators ( ) const
inlineoverridevirtual
Returns
Number of actuators managed by transmission, ie. the dimension of the actuator space.

Implements transmission_interface::Transmission.

◆ num_joints()

std::size_t transmission_interface::SimpleTransmission::num_joints ( ) const
inlineoverridevirtual
Returns
Number of joints managed by transmission, ie. the dimension of the joint space.

Implements transmission_interface::Transmission.


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