Python 3 for the FIRST Robotics Competition (FRC)

Robot integration testing is back!

We’re really happy to announce that py test will work once again (after upgrading to pyfrc 2022.1.0 or later)! For those who don’t remember, historically RobotPy would run a quick integration test on your code when you deploy it. It was quite useful for catching typos and other silly things that would be caught by a compiler in other languages.

Currently, we am not enabling tests on deploy by default until the stability of this feature is proven. We’ve tested it on many of our examples, so we’re reasonably confident that it isn’t entirely useless.

Please try this out and let me know if it works (or not) for your robot!

Known Issues

If you use REV robotics motor controllers, the test program may hang after tests complete. I’ve alerted the vendor but they still haven’t released a fix.

RobotPy 2022 now available

We’re happy to announce the release of RobotPy for 2022!

  • WPILib 2022.2.1 libraries with most features
  • Old commands (please stop using it!) and new commands
  • All supported vendors – CTRE, NavX, PWFusion, Rev, Romi

Everything is very lightly tested, and I’ve only tested the core WPILib stuff on a roboRIO. Try it out, find a bug, file an issue on github!

Later this season, we will bringing back pytest support for your robot! I’ve definitely missed it, and I think I have an approach that will work (want it to come sooner? Implement #3867 for me!).

The documentation and examples have not been updated yet. We would love your help doing that! Please.

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

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!