Package yams.core.telemetry
package yams.core.telemetry
NetworkTables publishers for mechanism and motor controller state.
This package provides classes that stream live data from YAMS mechanisms and motor controllers to a NetworkTables server, making that data available to dashboard tools (Shuffleboard, AdvantageScope, Glass) and to tuning workflows that adjust PID gains without redeploying code.
Mechanism telemetry
MechanismTelemetrypublishes the high-level state of a mechanism: current position, active setpoint, goal, and status flags. Updated each robot periodic cycle.
Motor controller telemetry
SmartMotorControllerTelemetryConfigfluent builder that selects which signals to publish and under what NetworkTables keys. Signals include duty cycle, applied voltage, velocity, position, supply current, stator current, and device temperature.SmartMotorControllerTelemetrypublisher that consumes aSmartMotorControllerTelemetryConfigand writes the selected signals to NetworkTables on everyperiodic()call.
Lightweight scalar publishers
BooleanTelemetrylightweight publisher for a singlebooleanvalue (e.g. limit switch state, at-setpoint flag).-
DoubleTelemetrylightweight publisher for a singledoublevalue (e.g. a raw sensor reading or computed error).
Enabling telemetry
Telemetry is opt-in. Call setupTelemetry() on a
SmartMotorController or mechanism instance, passing the desired
configuration object, to begin publishing. The call must happen before the first
periodic() call (typically in robotInit or the subsystem constructor):
SmartMotorControllerTelemetryConfig telemetryCfg =
new SmartMotorControllerTelemetryConfig("arm/motor")
.withVelocity()
.withPosition()
.withSupplyCurrent()
.withTemperature();
motor.setupTelemetry(telemetryCfg);
- See Also:
-
ClassDescriptionBoolean Telemetry for SmartMotorControllers.Double Telemetry for SmartMotorControllers.Mechanism telemetry.Registers
TelemetryRegistryandTunableRegistrybackends that publish directly under theMechanismsandTuningNetworkTables roots so the same rootsMechanismTelemetryandSmartMotorControllerTelemetryalready publish raw NetworkTables data to instead of the default/Telemetryand/Tunablesroots.Smart motor controller telemetry.Boolean telemetry forSmartMotorControllersDouble telemetry field.Smart motor controller telemetry configuration.StructArrayTelemetry<T,F> Struct array Telemetry for arbitraryStructserializable array types.StructTelemetry<T,F> Struct Telemetry for arbitraryStructserializable types.PublishesSwerveDrivetelemetry to NetworkTables and DataLog, and applies live tuning values.Boolean telemetry field forSwerveDrives.Double telemetry field forSwerveDrives.Struct array telemetry field forSwerveDrives.Struct telemetry field forSwerveDrives.Swerve drive telemetry configuration.Swerve module telemetry.Double telemetry field forSwerveModules.Struct telemetry field forSwerveModules.Swerve module telemetry configuration.