0
$\begingroup$

Rosanswers logo

I want to change the version of opencv I am using to fix a problem I am having, or to at least rule out the version update as the problem cause. The problem is described here.

Downgrading the package using apt-get does not work because the package source is not available. I used the following commands to download an archived version(current version 3.3.1):

wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/3.3.0.zip unzip opencv_contrib.zip

The unzipped file is 'opencv-3.3.0'. Initially moved the unzipped file to the src directory of my catkin workspace and executed catkin_make from the top of the work space. The build exited with errors.

Next, I moved the file to the /opt/src/kinetic/include directory where opencv-3.3.1 was located. Then I changed the files cv_bridge-extras.cmake and cv_bridgeConfig.cmake in the directory /opt/ros/kinetic/share/cv_bridge/cmake/ to reflect the version information and location that I wanted. I executed catkin_make again. There were no errors but does not finish. It gets hung up at:

[ 93%] Building CXX object apriltags_ros/apriltags_ros/CMakeFiles/apriltag_detector_nodelet.dir/src/apriltag_detector_nodelet.cpp.o

After about 15 minutes I interrupt the build and the following output is produced:

^CTraceback (most recent call last):
File "/opt/ros/kinetic/bin/catkin_make", line 296, in sys.exit(main()) File "/opt/ros/kinetic/bin/catkin_make", line 240, in main> run_command(cmd, make_path) File "/opt/ros/kinetic/lib/python2.7/dist-packages/catkin/builder.py", line 239, in run_command proc.wait() File "/usr/lib/python2.7/subprocess.py", line 1392, in wait pid, sts = _eintr_retry_call(os.waitpid, self.pid, 0) File "/usr/lib/python2.7/subprocess.py", line 476, in _eintr_retry_call return func(*args)

KeyboardInterruptapriltags_ros/apriltags_ros/CMakeFiles/apriltag_detector_nodelet.dir/build.make:62: recipe for target 'apriltags_ros/apriltags_ros/CMakeFiles/apriltag_detector_nodelet.dir/src/apriltag_detector_nodelet.cpp.o' failed apriltags_ros/apriltags_ros/CMakeFiles/apriltag_detector_node.dir/build.make:62: recipe for target 'apriltags_ros/apriltags_ros/CMakeFiles/apriltag_detector_node.dir/src/apriltag_detector_node.cpp.o' failed make[2]: *** [apriltags_ros/apriltags_ros/CMakeFiles/apriltag_detector_node.dir/src/apriltag_detector_node.cpp.o] Interrupt make[2]: *** [apriltags_ros/apriltags_ros/CMakeFiles/apriltag_detector_nodelet.dir/src/apriltag_detector_nodelet.cpp.o] Interrupt

CMakeFiles/Makefile2:987: recipe for target 'apriltags_ros/apriltags_ros/CMakeFiles/apriltag_detector_node.dir/all' failed make[1]: *** [apriltags_ros/apriltags_ros/CMakeFiles/apriltag_detector_node.dir/all] Interrupt CMakeFiles/Makefile2:1968: recipe for target 'apriltags_ros/apriltags_ros/CMakeFiles/apriltag_detector_nodelet.dir/all' failed make[1]: *** [apriltags_ros/apriltags_ros/CMakeFiles/apriltag_detector_nodelet.dir/all] Interrupt Makefile:138: recipe for target 'all' failed make: *** [all] Interrupt


Originally posted by dpoiesz on ROS Answers with karma: 43 on 2018-01-18

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

If you want to use a different version of opencv you will have to build and compile it and install it into the right place. You should not be building anything inside /opt/ros That is designated as read only without super user privleges for a reason. If you are mucking around in there manually installing things.

Please review how to build and compile targets we have instructions for overlay workspaces at: http://wiki.ros.org/catkin/Tutorials/workspace_overlaying and you should be installing opencv into the install space as well. ANd making sure that you've setup the appropriate environment variables so that your custom version of opencv is on the path.


Originally posted by tfoote with karma: 58457 on 2019-03-05

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.