FAQ

Here you can find answers to some of the most frequently asked questions about RobotPy.

Installing and Running RobotPy

How do I install RobotPy?

See our getting started guide.

What version of Python do RobotPy projects use?

When running RobotPy on a FIRST Robot, our libraries/interpreters use Python 3. This means you should reference the Python 3.x documentation instead of the Python 2.x documentation.

  • RobotPy WPILib 2017 uses Python 3.6.0 on the RoboRIO. When using pyfrc or similar projects, you should use a Python 3.4 or newer interpreter.
  • RobotPy 2014.x is based on Python 3.2.5.

pynetworktables is compatible with Python 2.7 and 3.3 or newer

What happens when my code crashes?

An exception will be printed out to the console, and the Driver Station log may receive a message as well. It is highly recommended that you enable NetConsole for your robot, so you can see these messages.

Is WPILib available?

Of course! Just import wpilib. Class and function names are identical to the Java version. Check out the Python WPILib API Reference for more details.

Prior to 2015, the API matched the C++ version of WPILib.

Is Command-based programming available?

Of course! Check out the command package. There is also some python-specific documentation available.

Is there an easy way to test my code outside of the robot?

Glad you asked! Our pyfrc project has a built in lightweight robot simulator you can use to run your code, and also has builtin support for unit testing with py.test.

Is RobotPy compatible with the 2015+ FRCSim/Gazebo Robot Simulator

Sorta... it’s still a bit rough, but you can find more information at the robotpy-frcsim project.

Competition

Is RobotPy stable?

Yes! While it is not an officially supported language, teams have been using RobotPy since 2010. Most of the time when bugs are found, they are found in the underlying WPILib, instead of RobotPy itself.

Performance

Is RobotPy fast?

It’s fast enough.

We’ve not yet benchmarked it, but it’s almost certainly just as fast as Java for typical WPILib-using robot code. RobotPy uses the native C++ WPILib, and thus the only interpreted portions are your specific robot actions. If you have particularly performance sensitive code, you can write it in C++ and add SWIG wrappers to interface to it from Python (note, however, that this takes a fair amount of coding expertise).

RobotPy Development

Who created RobotPy?

RobotPy was created by Peter Johnson, programming mentor for FRC Team 294, Beach Cities Robotics. He was inspired by the Lua port for the cRIO created by Ross Light, FRC Team 973. Peter is a member of the FIRST WPILib team, and also created the ntcore and cscore libraries.

The current RobotPy maintainer is Dustin Spicuzza.

How can I help?

RobotPy is an open project that all members of the FIRST community can easily and quickly contribute to. If you find a bug, or have an idea that you think others can use:

  • Test and report any issues you find.
  • Port and test a useful library.
  • Write a Python module and share it with others (and contribute it to the robotpy-wpilib-utilities package!)