|
YAMS
Yet Another Mechanism System
|
#include <SmartPositionalMechanism.hpp>


Public Member Functions | |
| SmartPositionalMechanism () | |
| virtual | ~SmartPositionalMechanism ()=default |
| virtual wpi::cmd::Trigger | Max ()=0 |
| virtual wpi::cmd::Trigger | Min ()=0 |
| wpi::MechanismLigament2d * | GetMechanismLigament () |
| wpi::MechanismRoot2d * | GetMechanismRoot () |
| motorcontrollers::SmartMotorController * | GetMotor () |
Public Member Functions inherited from yams::mechanisms::SmartMechanism | |
| SmartMechanism () | |
| virtual | ~SmartMechanism ()=default |
| virtual void | SimIterate ()=0 |
| virtual void | UpdateTelemetry ()=0 |
| virtual void | VisualizationUpdate ()=0 |
| virtual std::string | GetName () const =0 |
| virtual wpi::math::Pose3d | GetPose3d () const =0 |
| wpi::cmd::CommandPtr | Set (double dutycycle) |
| wpi::cmd::CommandPtr | Set (std::function< double()> dutycycle) |
| wpi::cmd::CommandPtr | SetVoltage (wpi::units::volt_t volts) |
| wpi::cmd::CommandPtr | SetVoltage (std::function< wpi::units::volt_t()> volts) |
| void | SetMechanismVelocitySetpoint (wpi::units::turns_per_second_t velocity) |
| void | SetMeasurementVelocitySetpoint (wpi::units::meters_per_second_t velocity) |
| void | SetMechanismPositionSetpoint (wpi::units::turn_t angle) |
| void | SetMeasurementPositionSetpoint (wpi::units::meter_t distance) |
| void | SetVoltageSetpoint (wpi::units::volt_t voltage) |
| void | SetDutyCycleSetpoint (double dutycycle) |
| motorcontrollers::SmartMotorController * | GetMotorController () |
| std::optional< wpi::units::turn_t > | GetMechanismSetpoint () |
| std::optional< wpi::units::meter_t > | GetMeasurementSetpoint () |
| wpi::Mechanism2d * | GetMechanismWindow () |
Protected Attributes | |
| wpi::MechanismRoot2d * | m_mechanismRoot {nullptr} |
| wpi::MechanismLigament2d * | m_mechanismLigament {nullptr} |
Protected Attributes inherited from yams::mechanisms::SmartMechanism | |
| wpi::cmd::SubsystemBase * | m_subsystem {nullptr} |
| motorcontrollers::SmartMotorController * | m_smc {nullptr} |
| std::optional< wpi::Mechanism2d > | m_mechanismWindow |
Abstract base class for positionally-controlled mechanisms (arms, elevators, pivots, etc.).
Extends SmartMechanism with hardware limit triggers and Mechanism2d ligament/root accessors for visualisation.
|
inline |
|
virtualdefault |
| wpi::MechanismLigament2d * yams::mechanisms::positional::SmartPositionalMechanism::GetMechanismLigament | ( | ) |
Get the MechanismLigament2d used to animate this mechanism.
| wpi::MechanismRoot2d * yams::mechanisms::positional::SmartPositionalMechanism::GetMechanismRoot | ( | ) |
Get the MechanismRoot2d anchor point for this mechanism.
| motorcontrollers::SmartMotorController * yams::mechanisms::positional::SmartPositionalMechanism::GetMotor | ( | ) |
Get the underlying SmartMotorController (alias for GetMotorController()).
|
pure virtual |
Trigger that becomes true when the mechanism is at or past its maximum (forward / upper) hard limit.
Implemented in yams::mechanisms::positional::Arm, yams::mechanisms::positional::Elevator, and yams::mechanisms::positional::Pivot.
|
pure virtual |
Trigger that becomes true when the mechanism is at or past its minimum (reverse / lower) hard limit.
Implemented in yams::mechanisms::positional::Arm, yams::mechanisms::positional::Elevator, and yams::mechanisms::positional::Pivot.
|
protected |
Animated ligament representing the moving part of the mechanism.
|
protected |
Root anchor point in the Mechanism2d canvas.