Package com.revrobotics
Class REVPhysicsSim
java.lang.Object
com.revrobotics.REVPhysicsSim
Manages physics simulation for REV Robotics products.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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
Gets the robot simulator instance.void
run()
Runs the simulator: - enable the robot - runs all SparkMax devices connected
-
Constructor Details
-
REVPhysicsSim
public REVPhysicsSim()
-
-
Method Details
-
getInstance
Gets the robot simulator instance. -
addSparkMax
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
Adds a SparkMAX controller to the simulator.- Parameters:
spark
- The SparkMAX devicemotor
- the motor connected to the spark max
-
run
Runs the simulator: - enable the robot - runs all SparkMax devices connected
-