- FRC Game Manual
- FRC Game Q&A

# Deploy Python program to roboRIO

Note

Before deploying the code to your robot, you must start by installing RobotPy on your computer

In particular, it is expected that you have ran `robotpy sync` to download all of the roboRIO python dependencies.

Windows

    py -3 -m robotpy deploy

macOS

    python3 -m robotpy deploy

Linux

    python3 -m robotpy deploy

When you execute the `robotpy deploy` subcommand, it will do the following:

- Run `pytest` tests on your code (will exit if they fail)

- Install Python on the roboRIO (if not already present)

- Install python packages on the roboRIO as specified by your `pyproject.toml` (if not already present)

- Copy the entire robot project directory to the roboRIO and execute it

Warning

Avoid powering off the robot while deploying robot code. Interrupting the deployment process can corrupt the roboRIO filesystem and prevent your code from working until the roboRIO is re-imaged.

When successful, you will see a `SUCCESS: Deploy was successful!` message.

You can watch your robot code’s output (and see any problems) with netconsole by using the Driver Station Log Viewer or pynetconsole. You can use netconsole and the normal FRC tools to interact with the running robot code.

See also

Viewing Console Output

Immediate feedback via Netconsole

When deploying the code to the roboRIO, you can have immediate feedback by adding the option –nc. This will cause the deploy command to show your program’s console output, by launching a netconsole listener.

Windows

    py -3 -m robotpy deploy --nc

macOS

    python3 -m robotpy deploy --nc

Linux

    python3 -m robotpy deploy --nc

Note

Viewing netconsole output requires the driver station software to be connected to your robot

Skipping Tests

In the event that the tests are failing but you want to upload the code anyway, you can skip them by adding the option –skip-tests.

Windows

    py -3 -m robotpy deploy --skip-tests

macOS

    python3 -m robotpy deploy --skip-tests

Linux

    python3 -m robotpy deploy --skip-tests