YAMS
Yet Another Mechanism System
Loading...
Searching...
No Matches
Public Member Functions | List of all members
yams::mechanisms::config::FlyWheelConfig Class Reference

#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
 

Detailed Description

Configuration class for a FlyWheel (velocity) mechanism.

Uses a fluent builder pattern; all With* methods return *this for chaining.

Constructor & Destructor Documentation

◆ FlyWheelConfig()

yams::mechanisms::config::FlyWheelConfig::FlyWheelConfig ( )
default

Member Function Documentation

◆ GetMechanismPositionConfig()

const MechanismPositionConfig & yams::mechanisms::config::FlyWheelConfig::GetMechanismPositionConfig ( ) const
inline

Get where the mechanism is on the robot.

◆ GetRollerDiameter()

std::optional< wpi::units::meter_t > yams::mechanisms::config::FlyWheelConfig::GetRollerDiameter ( ) const

Get the optional roller diameter.

◆ GetSimColor()

wpi::util::Color8Bit yams::mechanisms::config::FlyWheelConfig::GetSimColor ( ) const

Get the Mechanism2d sim colour.

◆ GetTelemetryName()

std::string yams::mechanisms::config::FlyWheelConfig::GetTelemetryName ( ) const

Get the telemetry name.

◆ WithMechanismPositionConfig()

FlyWheelConfig & yams::mechanisms::config::FlyWheelConfig::WithMechanismPositionConfig ( const MechanismPositionConfig &  mechanismPositionConfig)
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.

Parameters
mechanismPositionConfigThe mechanism's position.
Returns
*this for chaining.

◆ WithRollerDiameter()

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.

Parameters
diameterOuter diameter of the roller.
Returns
*this for chaining.

◆ WithSimColor()

FlyWheelConfig & yams::mechanisms::config::FlyWheelConfig::WithSimColor ( const wpi::util::Color8Bit &  color)

Set the simulation colour for the Mechanism2d ligament (default: orange).

◆ WithTelemetryName()

FlyWheelConfig & yams::mechanisms::config::FlyWheelConfig::WithTelemetryName ( const std::string &  name)

Set the NetworkTables / SmartDashboard name for telemetry.

Parameters
nameTelemetry name string.
Returns
*this for chaining.

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