Package swervelib.simulation.ctre
Class TalonSRXSimProfile
java.lang.Object
swervelib.simulation.ctre.PhysicsSim.SimProfile
swervelib.simulation.ctre.TalonSRXSimProfile
Holds information about a simulated TalonSRX.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final doubleprivate final doubleprivate final booleanprivate final com.ctre.phoenix.motorcontrol.can.TalonSRXprivate doubleThe current velocity -
Constructor Summary
ConstructorsConstructorDescriptionTalonSRXSimProfile(com.ctre.phoenix.motorcontrol.can.TalonSRX talon, double accelToFullTime, double fullVel, boolean sensorPhase) Creates a new simulation profile for a TalonSRX device. -
Method Summary
Methods inherited from class swervelib.simulation.ctre.PhysicsSim.SimProfile
getPeriod
-
Field Details
-
_talon
private final com.ctre.phoenix.motorcontrol.can.TalonSRX _talon -
_accelToFullTime
private final double _accelToFullTime -
_fullVel
private final double _fullVel -
_sensorPhase
private final boolean _sensorPhase -
_vel
private double _velThe current velocity
-
-
Constructor Details
-
TalonSRXSimProfile
public TalonSRXSimProfile(com.ctre.phoenix.motorcontrol.can.TalonSRX talon, double accelToFullTime, double fullVel, boolean sensorPhase) Creates a new simulation profile for a TalonSRX device.- Parameters:
talon- The TalonSRX deviceaccelToFullTime- The time the motor takes to accelerate from 0 to full, in secondsfullVel- The maximum motor velocity, in ticks per 100mssensorPhase- The phase of the TalonSRX sensors
-
-
Method Details
-
run
public void run()Runs the simulation profile.This uses very rudimentary physics simulation and exists to allow users to test features of our products in simulation using our examples out of the box. Users may modify this to utilize more accurate physics simulation.
- Overrides:
runin classPhysicsSim.SimProfile
-