I’m pleased to announce SnobotSim for the 2020 season.
SnobotSim is a simulator for java robots. It automatically hooks any motors controllers or sensors you have on your robot, and has a display that allows you to hook them together to enable a decent enough simulation of motion traveled by motors. It isn’t good enough to tune a robot, but can give you a solid warm-and-fuzzy that your code to run your climber state machine, or your elevator ‘go to height’ controller, or your drivetrain trajectory driving is algorithmically sound.
This season, wpilib greatly extended the built in simulation framework, and has their own GUI. From my brief time playing around with it, here are a list of the differences:
- The GUI alows you to connect/name/setup your sensors without having to modify any of your code. It is all stored in a configuration file
- Has support for CTRE (TalonSRX, PigeonIMU), REV (SparkMax), and NavX third party libraries
- Can easily run the simulator from the command line or an IDE without having to manually specify extensions to use
- Since SnobotSim is “third party”, I can make updates and fix bugs to the simulator without forcing a new version of wpilib
- Has C++ support (sorry, it fell off the backburner again)
- Deals with the ADX family of gyros and accelerometers a little cleaner
My goal for the past couple of years was for SnobotSim to go away, and have it be handled by wpilib. A lot of progress was made, but until the third party companies provide simulation abilities, I will continue to make updates.
New Features for 2020
- Better setup documentation
VS Code extension
– Provides an easy way to add SnobotSim capabilities to your existing robot project
– Provides a task to automatically download the latest SnobotSim config from my maven repo, so you don’t have to worry about manually updating version numbers
– Provides a command to run the simulator from the command palette