Package com.revrobotics
Class REVPhysicsSim
- java.lang.Object
-
- com.revrobotics.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
-
-
-
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 devicestallTorque
- The stall Torque of the motor connected to SparkMAX units are N mfreeSpeed
- 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 devicemotor
- the motor connected to the spark max
-
run
public void run()
Runs the simulator: - enable the robot - runs all SparkMax devices connected
-
-