Unable to build ROS python workspace on the RB5 drone
-
Hi,
I am working on a RB5 Drone. I had setup a Python ROS workspace (ROS Melodic) and it was working okay up until a few days ago.
I had to upgrade the SDK on the drone to the latest available. After that, I have been facing issues with building the workspace.
This is the error I am facing while running
catkin build
:rb5:~/python_ws$ catkin build obj_det /bin/sh: /home/root/python_ws/install/env.sh: Permission denied WARNING: Sourced environment from `/home/root/python_ws/install/env.sh` has no environment variables. Something is wrong. ---------------------------------------------------------------------------------------------------------- Profile: default Extending: [env] /home/root/catkin_ws/devel:/opt/ros/melodic Workspace: /home/root/python_ws ---------------------------------------------------------------------------------------------------------- Build Space: [exists] /home/root/python_ws/build Devel Space: [exists] /home/root/python_ws/devel Install Space: [exists] /home/root/python_ws/install Log Space: [exists] /home/root/python_ws/logs Source Space: [exists] /home/root/python_ws/src DESTDIR: [unused] None ---------------------------------------------------------------------------------------------------------- Devel Space Layout: linked Install Space Layout: merged ---------------------------------------------------------------------------------------------------------- Additional CMake Args: -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.6m -DPYTHON_LIBRARY=/usr/lib/aarch64-linux-gnu/libpython3.6m.so Additional Make Args: None Additional catkin Make Args: None Internal Make Job Server: True Cache Job Environments: False ---------------------------------------------------------------------------------------------------------- Whitelisted Packages: None Blacklisted Packages: None ---------------------------------------------------------------------------------------------------------- Workspace configuration appears valid. ---------------------------------------------------------------------------------------------------------- [build] Found '5' packages in 0.0 seconds. Starting >>> cv_bridge /bin/sh: /home/root/python_ws/install/env.sh: Permission denied WARNING: Sourced environment from `/home/root/python_ws/install/env.sh` has no environment variables. Something is wrong. _________________________________________________________________________________________________________ Errors << cv_bridge:check /home/root/python_ws/logs/cv_bridge/build.check.019.log CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:1626 (message): No header defined for python3; skipping header check Call Stack (most recent call first): CMakeLists.txt:11 (find_package) CMake Error at /home/root/python_ws/src/vision_opencv/cv_bridge/CMakeLists.txt:16 (find_package): Could not find a package configuration file provided by "OpenCV" (requested version 3) with any of the following names: OpenCVConfig.cmake opencv-config.cmake Add the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH or set "OpenCV_DIR" to a directory containing one of the above files. If "OpenCV" provides a separate development package or SDK, be sure it has been installed. make: *** [cmake_check_build_system] Error 1 cd /home/root/python_ws/build/cv_bridge; catkin build --get-env cv_bridge | catkin env -si /usr/bin/make cmake_check_build_system; cd - ......................................................................................................... Failed << cv_bridge:check [ Exited with code 2 ] Failed <<< cv_bridge [ 1.5 seconds ] Abandoned <<< obj_det [ Unrelated job failed ] [build] Summary: 0 of 2 packages succeeded. [build] Ignored: 3 packages were skipped or are blacklisted. [build] Warnings: None. [build] Abandoned: 1 packages were abandoned. [build] Failed: 1 packages failed. [build] Runtime: 1.6 seconds total.
I set this workspace up by following this tutorial on the web: https://medium.com/@beta_b0t/how-to-setup-ros-with-python-3-44a69ca36674
Any suggestions on what is going wrong here?
Thanks a lot!
-
@Prabhav-Gupta said in Unable to build ROS python workspace on the RB5 drone:
/bin/sh: /home/root/python_ws/install/env.sh: Permission denied
This error looks suspicious. Does that file exist? Does it have execute permissions set on it?
-
I had backed up my ROS workspace using
adb pull
before flashing the drone and usedadb 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 thesrc
(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):
Could not find a package configuration file provided by "OpenCV" (requested
version 3) with any of the following names:OpenCVConfig.cmake opencv-config.cmake
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!