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

#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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ PivotConfig()

yams::mechanisms::config::PivotConfig::PivotConfig ( )
default

Member Function Documentation

◆ GetMaxAngle()

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

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

◆ GetMechanismPositionConfig()

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

Get where the mechanism is on the robot.

◆ GetMinAngle()

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

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

◆ GetSimColor()

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

Get the Mechanism2d simulation colour.

◆ GetTelemetryName()

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

Get the telemetry name.

◆ WithMaxAngle()

PivotConfig & yams::mechanisms::config::PivotConfig::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()

PivotConfig & yams::mechanisms::config::PivotConfig::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()

PivotConfig & yams::mechanisms::config::PivotConfig::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()

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

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

Parameters
colorDesired colour.
Returns
*this for chaining.

◆ WithTelemetryName()

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