ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

how to link opencv coorect under hydro

asked 2014-09-29 09:46:04 -0500

pkohout gravatar image

updated 2014-10-01 09:29:15 -0500

Hi,

we are trying to run the prerealese test on our package. Locall all builds fine, but the jenkins server gehts the following error:

>  Could not find module
> FindOpenCV.cmake or a configuration
> file for package   OpenCV.
> 
>   Adjust CMAKE_MODULE_PATH to find
> FindOpenCV.cmake or set OpenCV_DIR to
> the   directory containing a CMake
> configuration file for OpenCV.  The
> file will   have one of the following
> names:
> 
>     OpenCVConfig.cmake
>     opencv-config.cmake

OpenCV2 is listenes as a dependency in the package.xml:

> <build_depend>opencv2</build_depend>  
> <run_depend>opencv2</run_depend>

And in the CMakeList.txt:

> find_package(OpenCV REQUIRED)
> include_directories(${OpenCV_INCLUDE_DIRS})
> target_link_libraries(map_merger
> ${OpenCV_LIBS} ${catkin_LIBRARIES} )

Local the OpenCVConfig.cmake file (which is missing on the jenkins) is located at:

ls /opt/ros/hydro/share/OpenCV/ -l
total 48
drwxr-xr-x 2 root root  4096 Sep 29 14:41 haarcascades
drwxr-xr-x 2 root root  4096 Sep 29 14:41 lbpcascades
-rw-r--r-- 1 root root 13500 Aug 19 19:45 OpenCVConfig.cmake
-rw-r--r-- 1 root root   376 Aug 19 19:45 OpenCVConfig-version.cmake
-rw-r--r-- 1 root root  2425 Aug 19 19:45 OpenCVModules.cmake
-rw-r--r-- 1 root root 13649 Aug 19 19:45 OpenCVModules-relwithdebinfo.cmake

Does somebody know how i link OpenCV correct ? Or how i could reproduce the Error on my local maschine ?

regards, Peter

EDIT 1:

After changing the dependencies i get the follwoing error:

> Traceback (most recent call last):  
> File
> "/home/rosbuild/hudson/workspace/prerelease-hydro-aau_multi_robot/ARCH_PARAM/amd64/UBUNTU_PARAM/precise/label/prerelease/jenkins_scripts/prerelease",
> line 43, in <module>
>     main()   File "/home/rosbuild/hudson/workspace/prerelease-hydro-aau_multi_robot/ARCH_PARAM/amd64/UBUNTU_PARAM/precise/label/prerelease/jenkins_scripts/prerelease",
> line 37, in main
>     build_in_workspace=options.build_in_workspace, sudo=options.sudo,
> no_chroot=options.no_chroot)   File
> "/home/rosbuild/hudson/workspace/prerelease-hydro-aau_multi_robot/ARCH_PARAM/amd64/UBUNTU_PARAM/precise/label/prerelease/jenkins_scripts/test_repositories.py",
> line 69, in test_repositories
>     sudo, no_chroot)   File "/home/rosbuild/hudson/workspace/prerelease-hydro-aau_multi_robot/ARCH_PARAM/amd64/UBUNTU_PARAM/precise/label/prerelease/jenkins_scripts/test_repositories.py",
> line 134, in _test_repositories
>     apt_get_install(repo_build_dependencies,
> rosdep_resolver, sudo)   File
> "/home/rosbuild/hudson/workspace/prerelease-hydro-aau_multi_robot/ARCH_PARAM/amd64/UBUNTU_PARAM/precise/label/prerelease/jenkins_scripts/common.py",
> line 28, in apt_get_install
>     pkgs = rosdep.to_aptlist(pkgs)   File
> "/home/rosbuild/hudson/workspace/prerelease-hydro-aau_multi_robot/ARCH_PARAM/amd64/UBUNTU_PARAM/precise/label/prerelease/jenkins_scripts/rosdep.py",
> line 44, in to_aptlist
>     for a in self.to_apt(r):   File "/home/rosbuild/hudson/workspace/prerelease-hydro-aau_multi_robot/ARCH_PARAM/amd64/UBUNTU_PARAM/precise/label/prerelease/jenkins_scripts/rosdep.py",
> line 57, in to_apt
>     return self.r2a[ros_entry] KeyError: 'libopencv-dev' I: Copying
> back the cached apt archive contents
> I: unmounting
> /var/cache/pbuilder/ccache filesystem
> I: unmounting
> /home/rosbuild/hudson/workspace/prerelease-hydro-aau_multi_robot/ARCH_PARAM/amd64/UBUNTU_PARAM/precise/label/prerelease
> filesystem I: unmounting
> /home/rosbuild filesystem I:
> unmounting dev/pts filesystem I:
> unmounting proc filesystem I: cleaning
> the build env  I: removing directory
> /var/cache/pbuilder/build//26131 and
> its subdirectories Build step 'Execute
> shell' marked build as failure
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2014-09-29 11:39:25 -0500

Dirk Thomas gravatar image

updated 2014-10-01 12:17:40 -0500

Change the dependencies in your package.xml file from opencv2 to libopencv-dev ( https://github.com/ros/rosdistro/blob... ).

Update: this is only the correct way for Indigo.

For Hydro you should keep your dependency on opencv2 ( https://github.com/ros/rosdistro/blob... ).

edit flag offensive delete link more

Comments

on https://github.com/ros/rosdistro/blob... is no entry for libopencv-dev for ubuntu 12.04. I now get a other error, see edit in the question. WHat do i have to do that it also works for Precise ?

pkohout gravatar image pkohout  ( 2014-10-01 09:28:30 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-09-29 09:46:04 -0500

Seen: 418 times

Last updated: Oct 01 '14