Is it possible to run robot code on a raspberry Pi? #7866
-
My team has limited resources, and we want to put together some off-season robots. RoboRio 1s are getting hard to find, and RoboRio 2s aren't desireable for other reasons. Raspberry Pis are much more available and less expensive. Is there a set of documentation for deploying to a raspberry Pi? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
What are you looking to accomplish by deploying to a Pi instead of just running in simulation? The Pi has limited I/O and we don't have an implementation to access it. But to answer your question, no, deploying to a Pi is currently not supported. We do distribute WPILib installers for aarch64 that can be installed on a Pi (so you could run the full IDE including simulation), but treating a Pi like a robot isn't supported. The other way Pi's can be used with WPILib is via the Romi, but in that case, we don't deploy code to the Pi, we run in simulation on the desktop and talk to a separate service running on the Romi that talks to the various motors/sensors. |
Beta Was this translation helpful? Give feedback.
-
WPILib doesn't have support for deploying to a Raspberry Pi directly. However, it does support Hardware Abstraction Layer (HAL) simulation extensions, so someone could write one for a Radpberry Pi. https://github.com/wpilibsuite/allwpilib/tree/main/simulation There is a web socket extension where the software runs on the PC and sends data to a websocket client. This is what the Romi does, which does use Raspbrerry Pi as the web socket client. The XRP uses a different more efficient data transfer mechanism since the processor in the RP2350 is significantly less powerful then a Raspberry Pi. However, neither of those are appropriate for full size robots due to safety, but using the Romi or XRP hardware is a great way to get a full WPILib programming experience with alternate hardware. |
Beta Was this translation helpful? Give feedback.
What are you looking to accomplish by deploying to a Pi instead of just running in simulation? The Pi has limited I/O and we don't have an implementation to access it. But to answer your question, no, deploying to a Pi is currently not supported. We do distribute WPILib installers for aarch64 that can be installed on a Pi (so you could run the full IDE including simulation), but treating a Pi like a robot isn't supported. The other way Pi's can be used with WPILib is via the Romi, but in that case, we don't deploy code to the Pi, we run in simulation on the desktop and talk to a separate service running on the Romi that talks to the various motors/sensors.