Class REVPhysicsSim


  • public class REVPhysicsSim
    extends java.lang.Object
    Manages physics simulation for REV Robotics products.
    • Constructor Summary

      Constructors 
      Constructor Description
      REVPhysicsSim()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addSparkMax​(CANSparkMax spark, float stallTorque, float freeSpeed)
      Adds a SparkMAX controller to the simulator.
      void addSparkMax​(CANSparkMax spark, edu.wpi.first.math.system.plant.DCMotor motor)
      Adds a SparkMAX controller to the simulator.
      static REVPhysicsSim getInstance()
      Gets the robot simulator instance.
      void run()
      Runs the simulator: - enable the robot - runs all SparkMax devices connected
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • REVPhysicsSim

        public REVPhysicsSim()
    • Method Detail

      • 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