Class REVPhysicsSim

java.lang.Object
com.revrobotics.REVPhysicsSim

public class REVPhysicsSim extends Object
Manages physics simulation for REV Robotics products.
  • Constructor Details

  • Method Details

    • getInstance

      public static REVPhysicsSim getInstance()
      Gets the robot simulator instance.
    • addSparkMax

      public void addSparkMax(CANSparkMax spark, float stallTorque, float freeSpeed)
      Adds a SparkMAX controller to the simulator.
      Parameters:
      spark - The SparkMAX device
      stallTorque - The stall Torque of the motor connected to SparkMAX units are N m
      freeSpeed - The maximum freeSpeed in RPM
    • addSparkMax

      public void addSparkMax(CANSparkMax spark, edu.wpi.first.math.system.plant.DCMotor motor)
      Adds a SparkMAX controller to the simulator.
      Parameters:
      spark - The SparkMAX device
      motor - the motor connected to the spark max
    • run

      public void run()
      Runs the simulator: - enable the robot - runs all SparkMax devices connected