|
YAMS
Yet Another Mechanism System
|
#include <FlyWheelConfig.hpp>
Public Member Functions | |
| FlyWheelConfig ()=default | |
| FlyWheelConfig & | WithTelemetryName (const std::string &name) |
| FlyWheelConfig & | WithRollerDiameter (wpi::units::meter_t diameter) |
| FlyWheelConfig & | WithSimColor (const wpi::util::Color8Bit &color) |
| FlyWheelConfig & | WithMechanismPositionConfig (const MechanismPositionConfig &mechanismPositionConfig) |
| std::string | GetTelemetryName () const |
| std::optional< wpi::units::meter_t > | GetRollerDiameter () const |
| wpi::util::Color8Bit | GetSimColor () const |
| const MechanismPositionConfig & | GetMechanismPositionConfig () const |
Configuration class for a FlyWheel (velocity) mechanism.
Uses a fluent builder pattern; all With* methods return *this for chaining.
|
default |
|
inline |
Get where the mechanism is on the robot.
| std::optional< wpi::units::meter_t > yams::mechanisms::config::FlyWheelConfig::GetRollerDiameter | ( | ) | const |
Get the optional roller diameter.
| wpi::util::Color8Bit yams::mechanisms::config::FlyWheelConfig::GetSimColor | ( | ) | const |
Get the Mechanism2d sim colour.
| std::string yams::mechanisms::config::FlyWheelConfig::GetTelemetryName | ( | ) | const |
Get the telemetry name.
|
inline |
Set where the mechanism is on the robot, for GetPose3d(): where it is mounted, how it is turned there, the plane it moves in, and the mechanism it is mounted on, if any.
| mechanismPositionConfig | The mechanism's position. |
| FlyWheelConfig & yams::mechanisms::config::FlyWheelConfig::WithRollerDiameter | ( | wpi::units::meter_t | diameter | ) |
Set the roller/flywheel outer diameter.
Used to convert between angular and linear velocity for surface-speed setpoints and simulation.
| diameter | Outer diameter of the roller. |
| FlyWheelConfig & yams::mechanisms::config::FlyWheelConfig::WithSimColor | ( | const wpi::util::Color8Bit & | color | ) |
Set the simulation colour for the Mechanism2d ligament (default: orange).
| FlyWheelConfig & yams::mechanisms::config::FlyWheelConfig::WithTelemetryName | ( | const std::string & | name | ) |
Set the NetworkTables / SmartDashboard name for telemetry.
| name | Telemetry name string. |