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 Summary

    Fields
    Modifier and Type
    Field
    Description
    static double[]
    Describes the desired forward, sideways and angular velocity of the robot.
    static double[]
    An array of rotation and velocity values describing the desired state of each swerve module
    static String
    The direction the robot should be facing when the "Robot Rotation" is zero or blank.
    static double
    The maximum achievable angular velocity of the robot.
    static double
    The maximum achievable speed of the modules, used to adjust the size of the vectors.
    static double[]
    The maximum achievable angular velocity of the robot.
    static double[]
    An array of rotation and velocity values describing the measured state of each swerve module
    static int
    The number of swerve modules
    static double
    The robot's current rotation based on odometry or gyro readings
    static String
    The units of the module rotations and robot rotation
    static double
    The distance between the front and back modules.
    static double
    The distance between the left and right modules.
    static double[]
    The number of swerve modules
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Upload data to smartdashboard

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • 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