The Synthesis emulator is a tool designed to help you test your FRC robot code. You can upload your own robot code as the user program you would normally deploy to the RoboRIO. Its normal communication with hardware is then redirected to the Synthesis engine for simulation.
The emulator allows you to test your robot code without the need for a physical robot. If you exported your robot CAD using a Synthesis exporter, you can even test your robot code against your actual robot model. If you don't have an exported model, you can still test your robot code, as the emulator gives you access to your print-outs in real time and as a downloadable log file. An input/output display also provides more details on the features we support. See the Robot IO Panel.
After you set up your robot model, enter the Emulation Tab.
Click on the Start Emulator button on the left-hand side of the Emulation toolbar. This will automatically open the Synthesis Driver Station where you can monitor communication status to your robot code as it starts.
After the emulator status changes from Starting to Ready, use the Select Code button to select your user program executable.
Uploading your robot code to the emulator will take a few seconds.
Once you have uploaded your robot code, the Synthesis Driver Station will show that it has been uploaded, and it will begin to run automatically.
Once the Synthesis Driver Station displays the robot code as running and connected, you can click the Use Emulation button in the Emulation toolbar to switch robot control from Synthesis controls to emulation control. You can now drive your model with your robot code.
The Synthesis Driver Station is setup to mimic the FRC Driver Station. You can test your robot code in TeleOperated, Autonomous, and Test modes or run it in Practice mode, which will run Autonomous for 15 seconds before switching to TeleOperated. From there, you can enable and disable your robot as usual. On the right side of the Synthesis Driver Station, you can also select your Team Station or enter Game Specific Data, such as the scale and switch order in FIRST Power Up.
The communications section also gives you the option to restart your running robot code.
To stop emulation, you can click the Stop Emulation button in the Emulation toolbar to switch robot control back to Synthesis controls. You can also click on the emulator status icon on the left side of the Emulation toolbar to close all background emulation processes.
The Synthesis engine only supports simulation of the following features:
However, the Robot IO Panel on the Emulation toolbar gives access to more specific input and output information, including manual control over inputs. These additional supported features are listed below:
From this panel, you can also view your robot code print-outs and download the log file from the most recent run of your robot code.
********** Robot program starting ********** Synthesis Emulation Startup Info: HEL Version: 1.1.0 Virtual Machine Version: 2.0 WPILib Version: v2019.4.1 NI Libraries Version: v2019-12 Synthesis warning: Unsupported feature: Function call tInterruptManager::registerHandler Synthesis warning: Unsupported feature: Function call tInterruptManager::enable Default RobotInit() method... Override me! Default DisabledInit() method... Override me! DisabledPeriodic gRPC serving on 0.0.0.0:50051. Default RobotPeriodic() method... Override me! Loop time of 2.000000e-02s overrun DisabledPeriodic DisabledPeriodic DisabledPeriodic DisabledPeriodic DisabledPeriodic DisabledPeriodic DisabledPeriodic DisabledPeriodic DisabledPeriodic DisabledPeriodic
You have now used the Synthesis emulator to test your robot code in a simulated environment. You uploaded your robot code into the Synthesis emulator, and then you learned how to access the Robot IO Panel for more control while testing your code.