YAMS
Yet Another Mechanism System
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
yams::gearing::MechanismGearing Class Reference

#include <MechanismGearing.hpp>

Collaboration diagram for yams::gearing::MechanismGearing:
Collaboration graph
[legend]

Public Member Functions

 MechanismGearing (double reductionRatio)
 
 MechanismGearing (const GearBox &gearBox)
 
 MechanismGearing (const GearBox &gearBox, const Sprocket &sprockets)
 
double GetRotorToMechanismRatio () const
 
double GetMechanismToRotorRatio () const
 
MechanismGearing & Div (double i)
 

Static Public Attributes

static const MechanismGearing kOne
 

Detailed Description

Mechanism gearing for conversions from the motor rotor to the mechanism output.

Combines an optional GearBox and an optional Sprocket chain to produce a single rotor-to-mechanism ratio used by the motor controller configuration.

Constructor & Destructor Documentation

◆ MechanismGearing() [1/3]

yams::gearing::MechanismGearing::MechanismGearing ( double  reductionRatio)
explicit

Construct a MechanismGearing with a single reduction ratio.

Parameters
reductionRatioReduction ratio (e.g. 3.0 for 3:1, 0.5 for 1:2).

◆ MechanismGearing() [2/3]

yams::gearing::MechanismGearing::MechanismGearing ( const GearBox &  gearBox)
explicit

Construct a MechanismGearing with only a GearBox attached to the motor.

Parameters
gearBoxGearBox of the mechanism.

◆ MechanismGearing() [3/3]

yams::gearing::MechanismGearing::MechanismGearing ( const GearBox &  gearBox,
const Sprocket &  sprockets 
)

Construct a MechanismGearing with a GearBox and a downstream Sprocket chain.

Parameters
gearBoxGearBox attached to the motor.
sprocketsSprocket chain attached to the gearbox output.

Member Function Documentation

◆ Div()

MechanismGearing & yams::gearing::MechanismGearing::Div ( double  i)

Divide the gearbox reduction ratio by i.

Parameters
iDivisor.
Returns
*this for chaining.

◆ GetMechanismToRotorRatio()

double yams::gearing::MechanismGearing::GetMechanismToRotorRatio ( ) const

Get the mechanism-to-rotor ratio (IN/OUT), i.e. the overall reduction.

Returns
IN/OUT ratio to use for mechanism-to-sensor calculations.

◆ GetRotorToMechanismRatio()

double yams::gearing::MechanismGearing::GetRotorToMechanismRatio ( ) const

Get the rotor-to-mechanism ratio (OUT/IN).

Returns
OUT/IN ratio to use for sensor-to-mechanism calculations.

Member Data Documentation

◆ kOne

const MechanismGearing yams::gearing::MechanismGearing::kOne
static

1:1 MechanismGearing (no reduction).


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