Python 3 for the FIRST Robotics Competition (FRC)

robotpy-build is now semiwrap

robotpy-build was created in 2020 to automate large portions of the work required to maintain and build the wrappers that RobotPy creates over the WPILib C++ libraries. semiwrap is a rewrite of that project, incorporating five years of lessons learned while maintaining over a dozen different projects wrapping hundreds of C++ classes and functions.

This rewrite is intended to be used more broadly for autogenerating pybind11 wrappers around C++ code, not just for RobotPy. It is built around hatchling and the meson build system, I encourage you to take a look!

RobotPy 2025 Beta is now available

There is no updated documentation at this time. To install the beta release, you can do pip install robotpy==2025.0.0b1. See our normal documentation for installation, deployment, etc – most things haven’t changed.

  • NavX and phoenix6 vendor libraries are available at this time

If you’re interested in helping with RobotPy, there’s lots to do and we’d love your help!

RobotPy 2024 is now available

This is the first year that Python has been an officially supported language! Lots of changes this year.

  • The biggest change is instead of python robot.py XXX, you run python -m robotpy XXX
  • The installation process will be much smoother! Just run python -m robotpy sync and python -m robotpy deploy in a directory with your robot code and everything will get downloaded and installed on the rio.
  • commands2 is not available yet, but hopefully soon

I am still working on updating the robotpy documentation site, but lots of documentation has been done on frc-docs! See https://github.com/wpilibsuite/frc-docs/pull/2501 for new documentation on defining requirements, deploy, and more.


Note that there is a 2024-compatible version of robotpy-commands-v2 available, it’s just marked as a beta release at this time because it’s incomplete and I’m not comfortable saying that it’s good to go. If you want to use it, you can set up the following pyproject.toml next to your robot.py:

#
# Use this configuration file to control what RobotPy packages are installed
# on your RoboRIO
#

[tool.robotpy]

# Version of robotpy this project depends on
robotpy_version = "2024.1.1.1"

# Which extra RobotPy components should be installed
# -> equivalent to `pip install robotpy[extra1, ...]
robotpy_extras = [
    # "all"
    # "apriltag"
    # "commands2"
    # "cscore"
    # "navx"
    # "pathplannerlib"
    # "phoenix5"
    # "phoenix6"
    # "playingwithfusion"
    # "rev"
    # "romi"
    # "sim"
]

# Other pip packages to install
requires = [
    "robotpy-commands-v2==2024.0.0b4"
]

After that, run python -m robotpy sync and it should download/install commands v2 + the kickoff release.

RobotPy 2024 Beta 3 is now available

Python will be an official FRC language for 2024, and this is our first beta release for the season. We’ve done a lot of work on infrastructure related to RobotPy, and hopefully it will be simpler to maintain in the future.

There is no updated documentation at this time. To install the beta release, you can do pip install robotpy==2024.0.0b3. See our normal documentation for installation, deployment, etc – most things haven’t changed.

  • Development has moved to a monorepo called mostrobotpy
  • Most WPILib 2024.0.0 beta 3 features are available
    • NT4 structured binding support is not implemented
    • Python 3.8 and 3.9 support is broken, oops
  • The commands implementation is now pure python thanks to @TheTripleV, please try it out and report bugs
    • .. there are a lot of bugs
    • .. there is a lot missing – see https://github.com/robotpy/robotpy-commands-v2/issues/28
    • Do you love commands and love writing python? It would be great to have more people contribute to this.
  • REV and NavX vendors are available
    • CTRE is managing their own releases this year, and I believe it will be available soon
  • Our examples repository has a 2024-beta branch

RobotPy 2023 is now available

We’re happy to announce the release of RobotPy for 2023! Just pip3 install robotpy and you’re off and running! Well, read the install guide.

  • All WPILib 2023.1.1 features are available
  • Commands v1 is gone (yay) but Commands v2 is available
  • CTRE, PWFusion, REV vendors are available
  • robotpy-cscore has wheels now for desktop platforms, which makes it much easier to install
  • robotpy-apriltag is a thing now, check it out
  • pyntcore no longer requires pynetworktables and replaces it. Lots of API changes here because of NT4
  • Our examples repository has a lot more examples! Thanks especially to @BerkeSinanYetkin and @mrguisamuel

Python is not an official FRC language yet, but we are working with the WPILib team to make it official in 2024. See https://wpilib.org/blog/bringing-python-to-frc for the announcement.

Thanks to everyone who contributed to this release!