SnobotSim 2019

I’m pleased to announce the initial release for SnobotSim for the 2019 season.


SnobotSim is a java (and hypothetically C++ when I find the time to fix what broke over the summer) low-fi simulator for your robots code. It can tie into most of your wpilib sensors and actuators, as well as provide limited support for simulating NavX and CTRE products. It is also designed to be open for extension, so you can add your own simulation code, like simulating comms from a RaspberryPI, LimeLight, PixyCam for vision processing, or adding some “This limit switch should be pressed if the elevator height is greater than 30 inches” advanced simulations. It isn’t meant to be a full blown, super accurate physics simulation, just something to test out algorithms and be able to tweak and test your code without a RoboRIO.

The tool comes with a GUI that can give you an idea of what is going on without having to put in printlns or open up SmartDashboard/Shuffleboard, as well as allow you to configure the simulator. It can also be used headless, which is great for unit tests. No need to explicitly mock out or override the HAL backends, SnobotSim can do it all for you.

Here is how my team last year was able to create unit tests with the simulator https://github.com/ArcticWarriors/snobot-2018/tree/master/RobotCode/snobot2018 (You can also check out the cool goodies that are super easy to integrate with gradle scripts, like code-style checks, static analysis tools, and code coverage)

I’ve switched teams, which has slowed down my ability to work on the simulator and test it with a real robot, so any bug fixes or feature requests might be slow. But, if you have any questions or problems, please leave an issue on the main repositories.

See previous threads for more detail.


PJ
(Former) Lead Software Mentor, FRC174 (RIP)

2 Likes