REVLib Simulation Feature Overview
SparkSim Features
Automatic GUI Generation
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.

WPILib Physics Model Integration
Every device simulation object includes a .iterate method designed for easy integration with WPILib's Physics models and tools.
Control Over Native Spark Object
Nearly every attribute of the Spark object is directly addressable via the SparkSim object, allowing you to tailor your simulations to any scenario.
Simulated Fault Manager
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.

Algorithms and Features
Closed Loop Control
Position, velocity, current, MAXMotion Position Control, and MAXMotion Velocity Control algorithms have been translated into the simulation.
MAXMotion Simulation
Both MAXMotion Position Control and MAXMotion Velocity Control are able to be fully simulated.
Voltage Compensation Algorithm
The Voltage Compensation algorithm from the Sparks has been ported to the simulation.
Current Limiting Algorithm
The Smart Current Limiting algorithm from the Sparks has been ported to the simulation.
Encoder, Sensor, and Limit Switch 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.
Last updated
Was this helpful?