Simulation
YAGSL-Example provides simulation out of the box!
How it works?
YAGSL Simulates the entire robot using the same simulation modules provided by vendors to varying degrees of support. There is an entirely simulated SwerveModule named SwerveModuleSimulation
and SwerveIMUSimulation
which provide necessary data.
How do I enable it?
Cosine compensation and heading correction should be disabled when running simulation or else the simulation may be uncontrollable!
For simulation to work properly all you have to do is ensure that heading compensation and cosine compensation are disabled like in the example below.
Then run simulation like you normally would in wpilib.
For more information checkout WPILib documentaiton on simulation!
Last updated