Is there a simulator tool for simulating the code used to make the robot work?

Hello,
I am a member of FIRST Robotics Team 4939, and I’m searching for a simulator to test our code to ensure it functions correctly with a simulated robot’s actions.

Thank you,
4939

1 Like

WPILib has such a tool.

If you want your pid loops to actually work right, you have to set up some math to model your mechanism response, but this provides a framework for running robot code on desktop.

1 Like

To double-down for clarity - “Simulation” is multi-faceted.

WPILib’s built in functionality allows you the ability to run your code on your desktop, which removes the need to have a roboRIO.

WPILib also provides a code-based way for you to specify what your robot hardware looks like. This removes the need to have a physical robot.

However, only you know how many motors your robot has, what types they are, how they are geared, what radius your wheels are, etc… All theses things might matter for checking your code is functioning correctly. The specifics here are not provided out of the box.

So, set your expectations accordingly - wpilib’s simulation can be used to test your code, provided you’ve done enough to emulate how your hardware works so your software gets to the right lines of code to do testing.

2 Likes

You could look into autodesk synthesis