REVLib Simulation Feature Overview
Last updated
Last updated
As your simulation runs, GUI elements will be added to the Devices tab as they are called, with specific dialogues for each sensor and tool.
Every device simulation object includes a .iterate method designed for easy integration with WPILib's Physics models and tools.
Nearly every attribute of the Spark object is directly addressable via the SparkSim object, allowing you to tailor your simulations to any scenario.
By creating a SimFaultManager object, you are given the ability to throw each possible fault individually, either through the GUI or programmatically with the object.
Position, velocity, current, MAXMotion Position Control, and MAXMotion Velocity Control algorithms have been translated into the simulation.
Both MAXMotion Position Control and MAXMotion Velocity Control are able to be fully simulated.
The Voltage Compensation algorithm from the Sparks has been ported to the simulation.
The Smart Current Limiting algorithm from the Sparks has been ported to the simulation.
All auxiliary devices are able to be fully controlled, through their individual simulation objects. Selected sensors will automatically be updated by the SparkSim.iterate() method. For more details on how to set these device simulations up, see Simulating Additional Sensors and Auxiliary Devices.