YAMS
Yet Another Mechanism System
Loading...
Searching...
No Matches
Classes | Enumerations | Functions
yams::telemetry Namespace Reference

Classes

class  BooleanTelemetry
 
class  DoubleTelemetry
 
class  MechanismTelemetry
 
class  SmartMotorControllerTelemetry
 
class  SmartMotorControllerTelemetryConfig
 
class  StructArrayTelemetry
 
class  StructTelemetry
 
class  SwerveDriveTelemetry
 
class  SwerveDriveTelemetryConfig
 
class  SwerveModuleTelemetry
 
class  SwerveModuleTelemetryConfig
 
struct  UnsupportedTelemetryFields
 

Enumerations

enum class  DoubleTelemetryField {
  ExponentialProfileKV , ExponentialProfileKA , ExponentialProfileMaxInput , TrapezoidalProfileMaxVelocity ,
  TrapezoidalProfileMaxAcceleration , TrapezoidalProfileMaxJerk , TunableClosedLoopControllerSlot , ActiveClosedLoopControllerSlot ,
  kS , kV , kA , kG ,
  kP , kI , kD , TunableSetpointPosition ,
  SetpointPosition , TunableSetpointVelocity , SetpointVelocity , SetpointForce ,
  ClosedLoopPeriod , VelocityMeasurementDelay , TunableVoltage , OutputVoltage ,
  StatorCurrent , StatorCurrentLimit , SupplyCurrent , SupplyCurrentLimit ,
  MotorTemperature , MeasurementPosition , MeasurementVelocity , MeasurementAcceleration ,
  MeasurementLowerLimit , MeasurementUpperLimit , MechanismPosition , MechanismVelocity ,
  MechanismAcceleration , MechanismLowerLimit , MechanismUpperLimit , RotorPosition ,
  RotorVelocity , ExternalEncoderPosition , ExternalEncoderVelocity , ClosedloopRampRate ,
  OpenloopRampRate
}
 
enum class  BooleanTelemetryField {
  MechanismUpperLimit , MechanismLowerLimit , TemperatureLimit , VelocityControl ,
  ElevatorFeedForward , ArmFeedForward , SimpleMotorFeedForward , MotionProfile ,
  MotorInversion , EncoderInversion , TunableVoltageEnabled
}
 

Functions

void EnsureMechanismsTelemetryBackend ()
 
void EnsureMechanismsTunableBackend ()
 
void EnsureTuningTunableBackend ()
 

Enumeration Type Documentation

◆ BooleanTelemetryField

Identifies a boolean-valued telemetry field published by a SmartMotorController.

Enumerator
MechanismUpperLimit 

true when the mechanism is at or past its upper angular limit.

MechanismLowerLimit 

true when the mechanism is at or past its lower angular limit.

TemperatureLimit 

true when the motor temperature has reached the cutoff threshold.

VelocityControl 

true when a velocity setpoint is active.

ElevatorFeedForward 

true when an elevator feedforward model is configured.

ArmFeedForward 

true when an arm feedforward model is configured.

SimpleMotorFeedForward 

true when a simple motor feedforward model is configured.

MotionProfile 

true when a motion profile (trapezoidal or exponential) is active.

MotorInversion 

true when the motor output direction is inverted (tunable).

EncoderInversion 

true when the encoder count direction is inverted (tunable).

TunableVoltageEnabled 

Drive the motor and its loosely coupled followers at TunableVoltage instead of the closed-loop controller while on (tunable).

◆ DoubleTelemetryField

Identifies a double-valued telemetry field published by a SmartMotorController.

Enumerator
ExponentialProfileKV 

Exponential profile kV constant (tunable).

ExponentialProfileKA 

Exponential profile kA constant (tunable).

ExponentialProfileMaxInput 

Exponential profile maximum input voltage (tunable).

TrapezoidalProfileMaxVelocity 

Trapezoidal profile max velocity RPM or m/s (tunable).

TrapezoidalProfileMaxAcceleration 

Trapezoidal profile max acceleration RPM/s or m/s² (tunable).

TrapezoidalProfileMaxJerk 

Trapezoidal profile max jerk RPM/s² (tunable).

TunableClosedLoopControllerSlot 

Live-tunable closed-loop gain slot selector.

ActiveClosedLoopControllerSlot 

Currently active closed-loop gain slot (read-only).

kS 

Static friction feedforward gain kS (tunable).

kV 

Velocity feedforward gain kV (tunable).

kA 

Acceleration feedforward gain kA (tunable).

kG 

Gravity feedforward gain kG (tunable).

kP 

Proportional feedback gain kP (tunable).

kI 

Integral feedback gain kI (tunable).

kD 

Derivative feedback gain kD (tunable).

TunableSetpointPosition 

Live-tunable position setpoint degrees or meters.

SetpointPosition 

Read-only position setpoint rotations or meters.

TunableSetpointVelocity 

Live-tunable velocity setpoint RPM or m/s.

SetpointVelocity 

Read-only velocity setpoint RPS or m/s.

SetpointForce 

Feedforward force applied on the velocity setpoint (N).

ClosedLoopPeriod 

Period the closed-loop controller runs at (s).

VelocityMeasurementDelay 

How far behind the measured velocity is, when known (s).

TunableVoltage 

Voltage applied to the motor and its loosely coupled followers, without the closed-loop controller, while TunableVoltageEnabled is on (V, tunable).

OutputVoltage 

Voltage currently applied to the motor (V).

StatorCurrent 

Stator (output) current draw (A).

StatorCurrentLimit 

Configured stator current limit (A, tunable).

SupplyCurrent 

Supply (input) current draw (A).

SupplyCurrentLimit 

Configured supply current limit (A, tunable).

MotorTemperature 

Motor controller temperature (°F).

MeasurementPosition 

Linear measurement position (m).

MeasurementVelocity 

Linear measurement velocity (m/s).

MeasurementAcceleration 

Linear measurement acceleration (m/s²).

MeasurementLowerLimit 

Configured lower linear soft limit (m, tunable).

MeasurementUpperLimit 

Configured upper linear soft limit (m, tunable).

MechanismPosition 

Mechanism position in rotations.

MechanismVelocity 

Mechanism velocity in rotations per second.

MechanismAcceleration 

Mechanism acceleration in rotations per second squared.

MechanismLowerLimit 

Configured lower angular soft limit (degrees, tunable).

MechanismUpperLimit 

Configured upper angular soft limit (degrees, tunable).

RotorPosition 

Raw rotor position in rotations.

RotorVelocity 

Raw rotor velocity in rotations per second.

ExternalEncoderPosition 

External encoder's mechanism position in rotations, only with an external encoder.

ExternalEncoderVelocity 

External encoder's mechanism velocity in rotations per second, only with an external encoder.

ClosedloopRampRate 

Closed-loop duty-cycle ramp rate (s, tunable).

OpenloopRampRate 

Open-loop duty-cycle ramp rate (s, tunable).

Function Documentation

◆ EnsureMechanismsTelemetryBackend()

void yams::telemetry::EnsureMechanismsTelemetryBackend ( )
inline

Registers TelemetryRegistry and TunableRegistry backends that publish directly under the Mechanisms and Tuning NetworkTables roots – the same roots MechanismTelemetry and SmartMotorControllerTelemetry already publish raw NetworkTables data to – instead of the default /Telemetry and /Tunables roots. This keeps dashboard-facing widgets (Mechanism2d, Field2d, on-dashboard commands) in the same NetworkTables subtree as the rest of a mechanism's telemetry/tuning data. Ensure a TelemetryRegistry backend is registered at /Mechanisms that publishes directly to that NetworkTables root, for TelemetryLoggable objects such as Mechanism2d.

◆ EnsureMechanismsTunableBackend()

void yams::telemetry::EnsureMechanismsTunableBackend ( )
inline

Ensure a TunableRegistry backend is registered at /Mechanisms that publishes directly to that NetworkTables root, for ComplexTunable objects such as Field2d or on-dashboard Commands.

◆ EnsureTuningTunableBackend()

void yams::telemetry::EnsureTuningTunableBackend ( )
inline

Ensure a TunableRegistry backend is registered at /Tuning that publishes directly to that NetworkTables root, for ComplexTunable on-dashboard Commands such as the Live Tuning command.