|
YAMS
Yet Another Mechanism System
|
#include <ArmConfig.hpp>
Public Member Functions | |
| ArmConfig ()=default | |
| ArmConfig & | WithTelemetryName (const std::string &name) |
| ArmConfig & | WithMinAngle (wpi::units::degree_t angle) |
| ArmConfig & | WithMaxAngle (wpi::units::degree_t angle) |
| ArmConfig & | WithArmLength (wpi::units::meter_t length) |
| ArmConfig & | WithSimColor (const wpi::util::Color8Bit &color) |
| ArmConfig & | WithMechanismPositionConfig (const MechanismPositionConfig &mechanismPositionConfig) |
| std::string | GetTelemetryName () const |
| std::optional< wpi::units::degree_t > | GetMinAngle () const |
| std::optional< wpi::units::degree_t > | GetMaxAngle () const |
| std::optional< wpi::units::meter_t > | GetArmLength () const |
| wpi::util::Color8Bit | GetSimColor () const |
| const MechanismPositionConfig & | GetMechanismPositionConfig () const |
Configuration class for an Arm mechanism.
Uses a fluent builder pattern; all With* methods return *this for chaining.
|
default |
| std::optional< wpi::units::meter_t > yams::mechanisms::config::ArmConfig::GetArmLength | ( | ) | const |
Get the optional arm length.
| std::optional< wpi::units::degree_t > yams::mechanisms::config::ArmConfig::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::ArmConfig::GetMinAngle | ( | ) | const |
Get the optional minimum (lower hard-limit) angle.
| wpi::util::Color8Bit yams::mechanisms::config::ArmConfig::GetSimColor | ( | ) | const |
Get the Mechanism2d simulation colour.
| std::string yams::mechanisms::config::ArmConfig::GetTelemetryName | ( | ) | const |
Get the telemetry name.
| ArmConfig & yams::mechanisms::config::ArmConfig::WithArmLength | ( | wpi::units::meter_t | length | ) |
Set the physical arm length for MOI estimation and visualisation.
| length | Length of the arm. |
| ArmConfig & yams::mechanisms::config::ArmConfig::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. |
| ArmConfig & yams::mechanisms::config::ArmConfig::WithMinAngle | ( | wpi::units::degree_t | angle | ) |
Set the minimum (lower hard) angle for simulation and soft-limit purposes.
| angle | Minimum angle. |
| ArmConfig & yams::mechanisms::config::ArmConfig::WithSimColor | ( | const wpi::util::Color8Bit & | color | ) |
Set the Mechanism2d simulation colour for the arm ligament (default: aqua).
| color | Desired colour. |
| ArmConfig & yams::mechanisms::config::ArmConfig::WithTelemetryName | ( | const std::string & | name | ) |
Set the NetworkTables / SmartDashboard name for telemetry.
| name | Telemetry name string. |