Class SwerveDriveTelemetry

java.lang.Object
swervelib.telemetry.SwerveDriveTelemetry

public class SwerveDriveTelemetry extends Object
Telemetry to describe the SwerveDrive following frc-web-components. (Which follows AdvantageKit)
  • Field Details

    • canIdWarning

      public static final Alert canIdWarning
      An Alert for if the CAN ID is greater than 40.
    • i2cLockupWarning

      public static final Alert i2cLockupWarning
      An Alert for if there is an I2C lockup issue on the roboRIO.
    • serialCommsIssueWarning

      public static final Alert serialCommsIssueWarning
      NavX serial comm issue.
    • verbosity

      public static SwerveDriveTelemetry.TelemetryVerbosity verbosity
      The current telemetry verbosity level.
    • isSimulation

      public static boolean isSimulation
      State of simulation of the Robot, used to optimize retrieval.
    • moduleCount

      public static int moduleCount
      The number of swerve modules
    • wheelLocations

      public static double[] wheelLocations
      The number of swerve modules
    • measuredStates

      public static double[] measuredStates
      An array of rotation and velocity values describing the measured state of each swerve module
    • desiredStates

      public static double[] desiredStates
      An array of rotation and velocity values describing the desired state of each swerve module
    • robotRotation

      public static double robotRotation
      The robot's current rotation based on odometry or gyro readings
    • maxSpeed

      public static double maxSpeed
      The maximum achievable speed of the modules, used to adjust the size of the vectors.
    • rotationUnit

      public static String rotationUnit
      The units of the module rotations and robot rotation
    • sizeLeftRight

      public static double sizeLeftRight
      The distance between the left and right modules.
    • sizeFrontBack

      public static double sizeFrontBack
      The distance between the front and back modules.
    • forwardDirection

      public static String forwardDirection
      The direction the robot should be facing when the "Robot Rotation" is zero or blank. This option is often useful to align with odometry data or match videos. 'up', 'right', 'down' or 'left'
    • maxAngularVelocity

      public static double maxAngularVelocity
      The maximum achievable angular velocity of the robot. This is used to visualize the angular velocity from the chassis speeds properties.
    • measuredChassisSpeeds

      public static double[] measuredChassisSpeeds
      The maximum achievable angular velocity of the robot. This is used to visualize the angular velocity from the chassis speeds properties.
    • desiredChassisSpeeds

      public static double[] desiredChassisSpeeds
      Describes the desired forward, sideways and angular velocity of the robot.
  • Constructor Details

    • SwerveDriveTelemetry

      public SwerveDriveTelemetry()
  • Method Details

    • updateData

      public static void updateData()
      Upload data to smartdashboard