Python 3 for the FIRST Robotics Competition (FRC)

RobotPy Commands V2 now available

Sorry for the wait, this was definitely a particularly challenging project to take on! Installation is similar to installing other things this year:

pip3 install -U robotpy[commands2]

Or on Windows:

py -3 -m pip install -U robotpy[commands2]

I’ve done some limited testing on it and it seems to work, but please try it out and let me know if you run into issues!

RobotPy 2021 now available

We’re happy to announce the release of RobotPy for 2021. We’ve continued cleaning up the mess we started last year, and things should hopefully be much smoother.

  • WPILib 2021.2.1 libraries included
  • All packages now ship with type hints which enable autocomplete in vscode when using the Python or pylance extensions
  • Upgraded pybind11 support no longer crashes when you forget to call super().__init__
  • New meta package – pip install robotpy will now bring in all robotpy packages, and there are various ‘extra’ specifiers that allow installation of other packages also. See robotpy-meta for details

The documentation and examples have not been updated yet. Soon?

The roborio installation process has been a huge pain as robotpy has grown, and this year’s installer is significantly better than what we’ve had in the past. Better error handling, single cache, we’ve gotten rid of the opkg stuff, and everything uses pip now.

First install python:

robotpy-installer download-python
robotpy-installer install-python

Then use ‘download’ and ‘install’ to download python packages from pypi and the RobotPy server and install them on the roborio. The package names are exactly the same names that you would install locally on your computer with pip. In particular, you can use the new meta package to download everything:

robotpy-installer download robotpy[all]
robotpy-installer install robotpy[all]

Unfortunately, there are some issues with the RoboRIO installer at the moment when using the ‘robotpy’ meta package. Hopefully will be able to address that tomorrow.

Thanks so much to @auscompgeek and @TheTripleV for their help getting this season’s release out.

Initial RobotPy 2020 pieces available

Initial RobotPy for RoboRIO is out! Same features as yesterday, but they all work now. pyfrc and the robotpy-installer have been updated (thanks to Nick of team 5654 for that!). Still no OSX support, someone needs to step up and make that work.

I’ve pushed pyfrc as a beta release, so you have to pass the --pre flag to pip.

py -m pip install --pre pyfrc

Additionally, the RobotPy RoboRIO installer is no longer a standalone download, but it is installed as part of pyfrc.

Using it is mostly the same as before:

py -m robotpy-installer download-robotpy
py -m robotpy-installer install-robotpy

There’s still work to be done, join us on gitter to help finish it up!

Initial RobotPy 2020 pieces available

Non-roborio builds of some core robotpy pieces are now available for installation from pypi! If you’re on Windows and have Python 3.6-3.8, you can do this to try it out:

py -m pip install -U wpilib robotpy-halsim-gui robotpy-wpilib-utilities

It’s best to do this in a clean virtualenv for now – you will need to uninstall pyfrc as it will conflict with the new sim. Once you have it installed, you can:

py sim

Please give it a try and let us know what breaks. There’s still a lot missing, but it’s coming soon:

  • commands
  • SendableChooser
  • Shuffleboard
  • Some new 2020 features

Tomorrow night I’ll push a roborio release, pyfrc/installer updates, and hopefully some 3rd party vendor packages.

RobotPy 2020 availability

Maintaining pure python bindings is a significant amount of work, and as WPILib gains more features and as more and more third party vendors join FRC, it becomes harder to provide support for those features and third party devices. To reduce the amount of work required to maintain RobotPy in the long term, this year we’re moving back to a WPILibC wrapper (which is what we were doing pre-2015).

In the long term, there are lots of benefits to this approach:

  • I anticipate that python programs on the RoboRIO will have higher performance
  • We will be able to support more third party vendors with minimal effort
  • RobotPy will be less effort to maintain for our limited development team

Unfortunately in the short term, the wrappers are not ready yet. My current goal is to have RobotPy 2020 available by the end of the weekend.

RobotPy is a community project and only exists because FRC community members contribute! If you’d like to help out, join us at!

In the meantime, you really should be working on strategy for your team right now anyways! If you do need to do some prototyping, RobotPy 2019 still works great in simulation and on hardware (with the 2019 image).