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

#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
 

Detailed Description

Configuration class for an Arm mechanism.

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

Constructor & Destructor Documentation

◆ ArmConfig()

yams::mechanisms::config::ArmConfig::ArmConfig ( )
default

Member Function Documentation

◆ GetArmLength()

std::optional< wpi::units::meter_t > yams::mechanisms::config::ArmConfig::GetArmLength ( ) const

Get the optional arm length.

◆ GetMaxAngle()

std::optional< wpi::units::degree_t > yams::mechanisms::config::ArmConfig::GetMaxAngle ( ) const

Get the optional maximum (upper hard-limit) angle.

◆ GetMechanismPositionConfig()

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

Get where the mechanism is on the robot.

◆ GetMinAngle()

std::optional< wpi::units::degree_t > yams::mechanisms::config::ArmConfig::GetMinAngle ( ) const

Get the optional minimum (lower hard-limit) angle.

◆ GetSimColor()

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

Get the Mechanism2d simulation colour.

◆ GetTelemetryName()

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

Get the telemetry name.

◆ WithArmLength()

ArmConfig & yams::mechanisms::config::ArmConfig::WithArmLength ( wpi::units::meter_t  length)

Set the physical arm length for MOI estimation and visualisation.

Parameters
lengthLength of the arm.
Returns
*this for chaining.

◆ WithMaxAngle()

ArmConfig & yams::mechanisms::config::ArmConfig::WithMaxAngle ( wpi::units::degree_t  angle)

Set the maximum (upper hard) angle for simulation and soft-limit purposes.

Parameters
angleMaximum angle.
Returns
*this for chaining.

◆ WithMechanismPositionConfig()

ArmConfig & yams::mechanisms::config::ArmConfig::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.

◆ WithMinAngle()

ArmConfig & yams::mechanisms::config::ArmConfig::WithMinAngle ( wpi::units::degree_t  angle)

Set the minimum (lower hard) angle for simulation and soft-limit purposes.

Parameters
angleMinimum angle.
Returns
*this for chaining.

◆ WithSimColor()

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

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

Parameters
colorDesired colour.
Returns
*this for chaining.

◆ WithTelemetryName()

ArmConfig & yams::mechanisms::config::ArmConfig::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: