Package com.revrobotics
Class REVPhysicsSim
java.lang.Object
com.revrobotics.REVPhysicsSim
Manages physics simulation for REV Robotics products.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSparkMax(CANSparkMax spark, float stallTorque, float freeSpeed) Adds a SparkMAX controller to the simulator.voidaddSparkMax(CANSparkMax spark, edu.wpi.first.math.system.plant.DCMotor motor) Adds a SparkMAX controller to the simulator.static REVPhysicsSimGets the robot simulator instance.voidrun()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
-