|
YAMS
Yet Another Mechanism System
|
#include <PivotConfig.hpp>
Public Member Functions | |
| PivotConfig ()=default | |
| PivotConfig & | WithTelemetryName (const std::string &name) |
| PivotConfig & | WithMinAngle (wpi::units::degree_t angle) |
| PivotConfig & | WithMaxAngle (wpi::units::degree_t angle) |
| PivotConfig & | WithSimColor (const wpi::util::Color8Bit &color) |
| PivotConfig & | WithMechanismPositionConfig (const MechanismPositionConfig &mechanismPositionConfig) |
| std::string | GetTelemetryName () const |
| std::optional< wpi::units::degree_t > | GetMinAngle () const |
| std::optional< wpi::units::degree_t > | GetMaxAngle () const |
| wpi::util::Color8Bit | GetSimColor () const |
| const MechanismPositionConfig & | GetMechanismPositionConfig () const |
Configuration class for a Pivot mechanism.
Pivots are similar to Arms but do not necessarily have a meaningful arm length they typically rotate a mechanism around a fixed axis. Uses a fluent builder pattern; all With* methods return *this for chaining.
|
default |
| std::optional< wpi::units::degree_t > yams::mechanisms::config::PivotConfig::GetMaxAngle | ( | ) | const |
Get the optional maximum (upper hard-limit) angle.
|
inline |
Get where the mechanism is on the robot.
| std::optional< wpi::units::degree_t > yams::mechanisms::config::PivotConfig::GetMinAngle | ( | ) | const |
Get the optional minimum (lower hard-limit) angle.
| wpi::util::Color8Bit yams::mechanisms::config::PivotConfig::GetSimColor | ( | ) | const |
Get the Mechanism2d simulation colour.
| std::string yams::mechanisms::config::PivotConfig::GetTelemetryName | ( | ) | const |
Get the telemetry name.
| PivotConfig & yams::mechanisms::config::PivotConfig::WithMaxAngle | ( | wpi::units::degree_t | angle | ) |
Set the maximum (upper hard) angle for simulation and soft-limit purposes.
| angle | Maximum angle. |
|
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. |
| PivotConfig & yams::mechanisms::config::PivotConfig::WithMinAngle | ( | wpi::units::degree_t | angle | ) |
Set the minimum (lower hard) angle for simulation and soft-limit purposes.
| angle | Minimum angle. |
| PivotConfig & yams::mechanisms::config::PivotConfig::WithSimColor | ( | const wpi::util::Color8Bit & | color | ) |
Set the Mechanism2d simulation colour for the pivot ligament (default: green).
| color | Desired colour. |
| PivotConfig & yams::mechanisms::config::PivotConfig::WithTelemetryName | ( | const std::string & | name | ) |
Set the NetworkTables / SmartDashboard name for telemetry.
| name | Telemetry name string. |