Skip OpenCV in ROS Kinetic install?
I'm trying to install ROS Kinetic on my Raspberry Pi 4 (4gb) running Rasbian Buster. It fails every time when it gets to installing OpenCV. Is there a way I skip OpenCV during the ROS install? The error I get is the following:
It's the same issue seen here: https://www.raspberrypi.org/forums/viewtopic.php?t=245432.
The error is:
^~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [modules/python3/CMakeFiles/opencv_python3.dir/build.make:63: modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:8425: modules/python3/CMakeFiles/opencv_python3.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
<== Failed to process package 'opencv3':
Command '['/opt/ros/kinetic/env.sh', 'make', '-j1']' returned non-zero exit status 2
Reproduce this error by running:
==> cd /home/pi/ros_catkin_ws/build_isolated/opencv3 && /opt/ros/kinetic/env.sh make -j1
Command failed, exiting.
Asked by cjk11091 on 2019-10-01 21:50:13 UTC
Answers
Hello,
For installing ROS on raspberry, you should follow this tutorial : http://wiki.ros.org/ROSberryPi/Installing%20ROS%20Kinetic%20on%20the%20Raspberry%20Pi
The main this to do is to use ROS-base or ROS-Comm (ros-kinetic-base or ros-kinetic-core) when installing ROS as it do not have any graphical dependencies : https://www.ros.org/reps/rep-0142.html#ros-core
Asked by lmathieu on 2019-10-02 02:43:59 UTC
Comments
That's exactly the installation guide I was using. I've tried multiple times and it fails at the OpenCV part which is why I would like to install without OpenCV if possible. It's the same issue seen here:
https://www.raspberrypi.org/forums/viewtopic.php?t=245432.
The error is:
^~~~~~~~~~~~~~~~~~~~~~~~~~ make[2]: *** [modules/python3/CMakeFiles/opencv_python3.dir/build.make:63: modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:8425: modules/python3/CMakeFiles/opencv_python3.dir/all] Error 2 make: *** [Makefile:163: all] Error 2 <== Failed to process package 'opencv3': Command '['/opt/ros/kinetic/env.sh', 'make', '-j1']' returned non-zero exit status 2
Reproduce this error by running: ==> cd /home/pi/ros_catkin_ws/build_isolated/opencv3 && /opt/ros/kinetic/env.sh make -j1
Command failed, exiting.
Asked by cjk11091 on 2019-10-02 21:27:49 UTC
Can you look at the output of the command cat *.rosinstall | grep opencv
in your ros_catkin_ws ? there should not be any mention of "opencv3" if you installed ros_comm.
If there is a opencv3 package mention, make sure to redo the step 3 of the installation by creating a new workspace and use :
rosinstall_generator ros_comm --rosdistro kinetic --deps --wet-only --tar > kinetic-ros_comm-wet.rosinstall
wstool init src kinetic-ros_comm-wet.rosinstall
If there is no opencv3 mention, you can try to delete the package ros_catkin_ws/src/opencv3 and ros_catkin_ws/src/vision_opencv, but it would be better to create a new workspace with a clean src/.
Asked by lmathieu on 2019-10-03 02:25:51 UTC
tl;dr Solution is https://github.com/opencv/opencv/issues/14856
If you follow the instruction to rebuild it (although you might need to cd /home/pi/ros_catkin_ws/build_isolated/opencv3/install - not just "/opencv3"), and if you make the terminal rollback long enough, you can see the actual error message, which is the same as that mentioned in the link above.
Asked by tonyc on 2019-10-25 00:11:07 UTC
Comments