Public Member Functions | Protected Attributes | List of all members
transmission_interface::DifferentialTransmission Class Reference

Implementation of a differential transmission. More...

#include <differential_transmission.h>

Inheritance diagram for transmission_interface::DifferentialTransmission:
Inheritance graph
[legend]

Public Member Functions

void actuatorToJointAbsolutePosition (const ActuatorData &act_data, JointData &jnt_data) override
 Transform absolute encoder values from actuator to joint space. More...
 
void actuatorToJointEffort (const ActuatorData &act_data, JointData &jnt_data) override
 Transform effort variables from actuator to joint space. More...
 
void actuatorToJointPosition (const ActuatorData &act_data, JointData &jnt_data) override
 Transform position variables from actuator to joint space. More...
 
void actuatorToJointTorqueSensor (const ActuatorData &act_data, JointData &jnt_data) override
 Transform torque sensor values from actuator to joint space. More...
 
void actuatorToJointVelocity (const ActuatorData &act_data, JointData &jnt_data) override
 Transform velocity variables from actuator to joint space. More...
 
 DifferentialTransmission (const std::vector< double > &actuator_reduction, const std::vector< double > &joint_reduction, const std::vector< double > &joint_offset)
 
 DifferentialTransmission (const std::vector< double > &actuator_reduction, const std::vector< double > &joint_reduction, bool ignore_transmission_for_absolute_encoders=false, const std::vector< double > &joint_offset=std::vector< double >(2, 0.0))
 
const std::vector< double > & getActuatorReduction () const
 
const std::vector< double > & getJointOffset () const
 
const std::vector< double > & getJointReduction () const
 
bool hasActuatorToJointAbsolutePosition () const override
 
bool hasActuatorToJointTorqueSensor () const override
 
void jointToActuatorEffort (const JointData &jnt_data, ActuatorData &act_data) override
 Transform effort variables from joint to actuator space. More...
 
void jointToActuatorPosition (const JointData &jnt_data, ActuatorData &act_data) override
 Transform position variables from joint to actuator space. More...
 
void jointToActuatorVelocity (const JointData &jnt_data, ActuatorData &act_data) override
 Transform velocity variables from joint to actuator space. More...
 
std::size_t numActuators () const override
 
std::size_t numJoints () const override
 
- Public Member Functions inherited from transmission_interface::Transmission
virtual ~Transmission ()=default
 

Protected Attributes

std::vector< double > act_reduction_
 
bool ignore_transmission_for_absolute_encoders_
 
std::vector< double > jnt_offset_
 
std::vector< double > jnt_reduction_
 

Detailed Description

Implementation of a differential transmission.

This transmission relates two actuators and two joints through a differential mechanism, as illustrated below.

differential_transmission.png
Effort
Velocity
Position
Actuator to joint

\begin{eqnarray*} \tau_{j_1} & = & n_{j_1} ( n_{a_1} \tau_{a_1} + n_{a_2} \tau_{a_2} ) \\[2.5em] \tau_{j_2} & = & n_{j_2} ( n_{a_1} \tau_{a_1} + n_{a_2} \tau_{a_2} ) \end{eqnarray*}

\begin{eqnarray*} \dot{x}_{j_1} & = & \frac{ \dot{x}_{a_1} / n_{a_1} + \dot{x}_{a_2} / n_{a_2} }{2 n_{j_1}} \\[1em] \dot{x}_{j_2} & = & \frac{ \dot{x}_{a_1} / n_{a_1} - \dot{x}_{a_2} / n_{a_2} }{2 n_{j_2}} \end{eqnarray*}

\begin{eqnarray*} x_{j_1} & = & \frac{ x_{a_1} / n_{a_1} + x_{a_2} / n_{a_2} }{2 n_{j_1}} + x_{off_1} \\[1em] x_{j_2} & = & \frac{ x_{a_1} / n_{a_1} - x_{a_2} / n_{a_2} }{2 n_{j_1}} + x_{off_2} \end{eqnarray*}

Joint to actuator

\begin{eqnarray*} \tau_{a_1} & = & \frac{ \tau_{j_1} / n_{j_1} + \tau_{j_2} / n_{j_2} }{2 n_{a_1}} \\[1em] \tau_{a_2} & = & \frac{ \tau_{j_1} / n_{j_1} - \tau_{j_2} / n_{j_2} }{2 n_{a_1}} \end{eqnarray*}

\begin{eqnarray*} \dot{x}_{a_1} & = & n_{a_1} ( n_{j_1} \dot{x}_{j_1} + n_{j_2} \dot{x}_{j_2} ) \\[2.5em] \dot{x}_{a_2} & = & n_{a_2} ( n_{j_1} \dot{x}_{j_1} - n_{j_2} \dot{x}_{j_2} ) \end{eqnarray*}

\begin{eqnarray*} x_{a_1} & = & n_{a_1} \left[ n_{j_1} (x_{j_1} - x_{off_1}) + n_{j_2} (x_{j_2} - x_{off_2}) \right] \\[2.5em] x_{a_2} & = & n_{a_2} \left[ n_{j_1} (x_{j_1} - x_{off_1}) - n_{j_2} (x_{j_2} - x_{off_2}) \right] \end{eqnarray*}

where:

Note
This implementation currently assumes a specific layout for location of the actuators and joint axes which is common in robotic mechanisms. Please file an enhancement ticket if your use case does not adhere to this layout.

Definition at line 117 of file differential_transmission.h.

Constructor & Destructor Documentation

◆ DifferentialTransmission() [1/2]

transmission_interface::DifferentialTransmission::DifferentialTransmission ( const std::vector< double > &  actuator_reduction,
const std::vector< double > &  joint_reduction,
const std::vector< double > &  joint_offset 
)
inline
Parameters
actuator_reductionReduction ratio of actuators.
joint_reductionReduction ratio of joints.
joint_offsetJoint position offset used in the position mappings.
Precondition
Nonzero actuator and joint reduction values.

Definition at line 238 of file differential_transmission.h.

◆ DifferentialTransmission() [2/2]

transmission_interface::DifferentialTransmission::DifferentialTransmission ( const std::vector< double > &  actuator_reduction,
const std::vector< double > &  joint_reduction,
bool  ignore_transmission_for_absolute_encoders = false,
const std::vector< double > &  joint_offset = std::vector<double>(2, 0.0) 
)
inline
Parameters
actuator_reductionReduction ratio of actuators.
joint_reductionReduction ratio of joints.
ignore_transmission_for_absolute_encodersWhether to take the data directly from absolute encoders instead of calculating through transmission.
joint_offsetJoint position offset used in the position mappings.
Precondition
Nonzero actuator and joint reduction values.

Definition at line 244 of file differential_transmission.h.

Member Function Documentation

◆ actuatorToJointAbsolutePosition()

void transmission_interface::DifferentialTransmission::actuatorToJointAbsolutePosition ( const ActuatorData act_data,
JointData jnt_data 
)
inlineoverridevirtual

Transform absolute encoder values from actuator to joint space.

Parameters
[in]act_dataActuator-space variables.
[out]jnt_dataJoint-space variables.
Precondition
Actuator, joint position and absolute encoder position vectors must have the same size. To call this method it is not required that all other data vectors contain valid data, and can even remain empty.

Reimplemented from transmission_interface::Transmission.

Definition at line 308 of file differential_transmission.h.

◆ actuatorToJointEffort()

void transmission_interface::DifferentialTransmission::actuatorToJointEffort ( const ActuatorData act_data,
JointData jnt_data 
)
inlineoverridevirtual

Transform effort variables from actuator to joint space.

Parameters
[in]act_dataActuator-space variables.
[out]jnt_dataJoint-space variables.
Precondition
Actuator and joint effort vectors must have size 2 and point to valid data. To call this method it is not required that all other data vectors contain valid data, and can even remain empty.

Implements transmission_interface::Transmission.

Definition at line 269 of file differential_transmission.h.

◆ actuatorToJointPosition()

void transmission_interface::DifferentialTransmission::actuatorToJointPosition ( const ActuatorData act_data,
JointData jnt_data 
)
inlineoverridevirtual

Transform position variables from actuator to joint space.

Parameters
[in]act_dataActuator-space variables.
[out]jnt_dataJoint-space variables.
Precondition
Actuator and joint position vectors must have size 2 and point to valid data. To call this method it is not required that all other data vectors contain valid data, and can even remain empty.

Implements transmission_interface::Transmission.

Definition at line 295 of file differential_transmission.h.

◆ actuatorToJointTorqueSensor()

void transmission_interface::DifferentialTransmission::actuatorToJointTorqueSensor ( const ActuatorData act_data,
JointData jnt_data 
)
inlineoverridevirtual

Transform torque sensor values from actuator to joint space.

Parameters
[in]act_dataActuator-space variables.
[out]jnt_dataJoint-space variables.
Precondition
Actuator, joint position and torque sensor vectors must have the same size. To call this method it is not required that all other data vectors contain valid data, and can even remain empty.

Reimplemented from transmission_interface::Transmission.

Definition at line 329 of file differential_transmission.h.

◆ actuatorToJointVelocity()

void transmission_interface::DifferentialTransmission::actuatorToJointVelocity ( const ActuatorData act_data,
JointData jnt_data 
)
inlineoverridevirtual

Transform velocity variables from actuator to joint space.

Parameters
[in]act_dataActuator-space variables.
[out]jnt_dataJoint-space variables.
Precondition
Actuator and joint velocity vectors must have size 2 and point to valid data. To call this method it is not required that all other data vectors contain valid data, and can even remain empty.

Implements transmission_interface::Transmission.

Definition at line 282 of file differential_transmission.h.

◆ getActuatorReduction()

const std::vector<double>& transmission_interface::DifferentialTransmission::getActuatorReduction ( ) const
inline

Definition at line 227 of file differential_transmission.h.

◆ getJointOffset()

const std::vector<double>& transmission_interface::DifferentialTransmission::getJointOffset ( ) const
inline

Definition at line 229 of file differential_transmission.h.

◆ getJointReduction()

const std::vector<double>& transmission_interface::DifferentialTransmission::getJointReduction ( ) const
inline

Definition at line 228 of file differential_transmission.h.

◆ hasActuatorToJointAbsolutePosition()

bool transmission_interface::DifferentialTransmission::hasActuatorToJointAbsolutePosition ( ) const
inlineoverridevirtual

Reimplemented from transmission_interface::Transmission.

Definition at line 224 of file differential_transmission.h.

◆ hasActuatorToJointTorqueSensor()

bool transmission_interface::DifferentialTransmission::hasActuatorToJointTorqueSensor ( ) const
inlineoverridevirtual

Reimplemented from transmission_interface::Transmission.

Definition at line 225 of file differential_transmission.h.

◆ jointToActuatorEffort()

void transmission_interface::DifferentialTransmission::jointToActuatorEffort ( const JointData jnt_data,
ActuatorData act_data 
)
inlineoverridevirtual

Transform effort variables from joint to actuator space.

Parameters
[in]jnt_dataJoint-space variables.
[out]act_dataActuator-space variables.
Precondition
Actuator and joint effort vectors must have size 2 and point to valid data. To call this method it is not required that all other data vectors contain valid data, and can even remain empty.

Implements transmission_interface::Transmission.

Definition at line 342 of file differential_transmission.h.

◆ jointToActuatorPosition()

void transmission_interface::DifferentialTransmission::jointToActuatorPosition ( const JointData jnt_data,
ActuatorData act_data 
)
inlineoverridevirtual

Transform position variables from joint to actuator space.

Parameters
[in]jnt_dataJoint-space variables.
[out]act_dataActuator-space variables.
Precondition
Actuator and joint position vectors must have size 2 and point to valid data. To call this method it is not required that all other data vectors contain valid data, and can even remain empty.

Implements transmission_interface::Transmission.

Definition at line 368 of file differential_transmission.h.

◆ jointToActuatorVelocity()

void transmission_interface::DifferentialTransmission::jointToActuatorVelocity ( const JointData jnt_data,
ActuatorData act_data 
)
inlineoverridevirtual

Transform velocity variables from joint to actuator space.

Parameters
[in]jnt_dataJoint-space variables.
[out]act_dataActuator-space variables.
Precondition
Actuator and joint velocity vectors must have size 2 and point to valid data. To call this method it is not required that all other data vectors contain valid data, and can even remain empty.

Implements transmission_interface::Transmission.

Definition at line 355 of file differential_transmission.h.

◆ numActuators()

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

Implements transmission_interface::Transmission.

Definition at line 222 of file differential_transmission.h.

◆ numJoints()

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

Implements transmission_interface::Transmission.

Definition at line 223 of file differential_transmission.h.

Member Data Documentation

◆ act_reduction_

std::vector<double> transmission_interface::DifferentialTransmission::act_reduction_
protected

Definition at line 232 of file differential_transmission.h.

◆ ignore_transmission_for_absolute_encoders_

bool transmission_interface::DifferentialTransmission::ignore_transmission_for_absolute_encoders_
protected

Definition at line 235 of file differential_transmission.h.

◆ jnt_offset_

std::vector<double> transmission_interface::DifferentialTransmission::jnt_offset_
protected

Definition at line 234 of file differential_transmission.h.

◆ jnt_reduction_

std::vector<double> transmission_interface::DifferentialTransmission::jnt_reduction_
protected

Definition at line 233 of file differential_transmission.h.


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


transmission_interface
Author(s): Adolfo Rodriguez Tsouroukdissian
autogenerated on Sun May 10 2020 03:14:56