RobotPy experience in 2018

Hello everyone, Team 1076 here.

This year, we decided to experiment with RobotPy, as opposed to Java (or Java w/ Strongback). Our code for the 2018 year can be found at (note: this is somewhat messy near the end since we were at Worlds—forgive the commit names!)

Things we really liked:

  1. Ease of unit tests. Unlike WPILib, it is extremely easy to make unit tests due to the excellent builtin tests and simplicity of creating mock objects. This allowed us to use the WPILib components without writing a wrapper class like we had to in 2016 and 2017.

  2. Ease of set up and deployment. WPILib requires manually downloading and installing like 4 different libraries (the core WPILib library, an installer to install the JVM, the JVM itself, and the CTRE libraries for Talon motors) and none of them can be gotten via command line. This makes it really painful to move computers (which we had to do multiple times at competition due to a failure in our laptop’s Ethernet port!). Comparatively, RobotPy is incredibly simple to set up. Just download the libraries via pip and clone our repo via git and that’s basically it. Even installing and upgrading dependencies on the RoboRio is super simple and takes like 15 seconds to type on the command line.

  3. Network Tables. The pynetworktables2js module made developing an auton selector incredibly simple and worked much better than the SmartDashboard. Plus, the fact that it was browser based meant that we did not have to download anything new to run it! The provided templates also showcase the features of pynetworktables2js very well.

  4. Example code. The inclusion of working sample code made it so much easier to understand how to use RobotPy.

Other comments

  1. USB code deployment. This may not be a robotpy problem but we were unable to figure out how to deploy code via the USB port, which is odd since we can do this via Eclipse + WPILib plugin. This is a bit annoying since not every laptop we have has a USB port.

  2. Autonomous framework. The built in autonomous framework is a bit hard to understand, and we ended up building our own miniframework.

  3. Confusion on installing dependencies. It was somewhat hard to understand how to install the CTRE libraries onto the RoboRio since those were installed by an opkg rather than a pip library. We also accidentally installed the simulator multiple times by mistake since. Note that this does not apply anymore as it appears that the RobotPy documentation site now includes specific sections on installing the robotpy-ctre libraries.

Overall, we are very happy with RobotPy and are planning to use it next year!

Thanks for your feedback, I’m glad to hear you found RobotPy useful!

I’ve created github issues so we can track the installer issues you brought up:

Regarding #4, WPILibJ/WPILibC does have example code (and in fact many of the robotpy examples are based on those examples). I’m curious, were you aware of that or did you find it difficult to find them?

Regarding the autonomous framework, if you can create an issue on robotpy-docs mentioning what made it difficult to understand, perhaps we can fix the documentation and make it easier for others in the future.

Finally, one thing that’s noticeably missing from your list is robot simulation (which in my opinion is the strongest reason to use RobotPy). Were you aware that RobotPy has a simulator, or did you find it not useful?