I had backed up my ROS workspace using adb pull before flashing the drone and used adb push to reinstate my workspace on the drone. This unfortunately changed up the file permissions for the folders within the workspace.
I was able to fix this by deleting (using rm -rf) all folders within my ROS workspace except the src (which contains the packages I was working on) and building the packages again.
I was then faced with the other CMake error visible above -
@Prabhav-Gupta said in Unable to build ROS python workspace on the RB5 drone:
CMake Error at /home/root/python_ws/src/vision_opencv/cv_bridge/CMakeLists.txt:16 (find_package):
OpenCVConfig.cmake opencv-config.cmake
Could not find a package configuration file provided by "OpenCV" (requested
version 3) with any of the following names:
I fixed this by building opencv from source on the drone (following this - https://docs.opencv.org/4.x/d7/d9f/tutorial_linux_install.html)
After installing opencv, the catrkin build did not return any errors at the time. I do need to check whether my ROS Nodes are working as expected or not. Will update here once I do the same.
Thank you for your time!