Installing robotpy on Raspberry Pi

Hi Everyone,

Trying to install Robotpy on the raspberry pi but getting this error message:

src/_cscore.cpp:11:10: fatal error: opencv2/opencv.hpp: No such file or directory
#include <opencv2/opencv.hpp>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command ‘arm-linux-gnueabihf-gcc’ failed with exit status 1

I know this is related to not having OpenCV installed, I thought I did properly install it. Does anyone have the correct way to install opencv

I think you’re running into this issue. The standard Raspberry Pi OpenCV packages are OpenCV 4, which puts headers in a different location. For the FRCVision image, we build and install OpenCV 3, but the robotpy-cscore issue identifies workarounds to use OpenCV 4. Additionally, the upstream cscore source is now compatible with OpenCV 4, so I would expect robotpy-cscore to fix the issue at some point.