Ask Your Question
3

Kinetic error: opencv2/core/core.hpp No such file or directory

asked 2017-03-27 04:02:34 -0500

Stoerakustik gravatar image

updated 2017-06-23 15:47:16 -0500

lucasw gravatar image

I am working with ROS kinetic on ubuntu 16.04

after a system update with Software-Updater i get an error while catkin_make-ing. worked like a charm before.

In file included from /home/alexander/git/human_detector/catkin_ws/src/human_detector/src/background.cpp:3:0: /opt/ros/kinetic/include/cv_bridge/cv_bridge.h:43:33: fatal error: opencv2/core/core.hpp: Datei oder Verzeichnis nicht gefunden (No such file or directory) compilation terminated.

get this for every file i included cv_bridge....

edit: i dont know if its important but i found the update history from that point in time when things stopped working

Start-Date: 2017-03-23  14:29:03
Commandline: aptdaemon role='role-commit-packages' sender=':1.153'
Install: libappstream4:amd64 (0.10.6-1~ubuntu16.04.2, automatic), libstemmer0d:amd64 (0+svn585-1, automatic)
Upgrade: ros-kinetic-interactive-markers:amd64 (1.11.3-0xenial-20170227-161835-0800, 1.11.3-0xenial-20170308-212223-0800), ros-kinetic-rqt-gui-py:amd64 (0.3.2-0xenial-20170227-152338-0800, 0.3.2-0xenial-20170308-221141-0800), ros-kinetic-opencv3:amd64 (3.2.0-2xenial-20170226-170515-0800, 3.2.0-4xenial-20170315-013656-0700), ros-kinetic-eigen-stl-containers:amd64 (0.1.6-0xenial-20170217-220112-0800, 0.1.8-0xenial-20170310-121851-0800), ros-kinetic-tf2-msgs:amd64 (0.5.15-0xenial-20170227-131925-0800, 0.5.15-0xenial-20170308-183301-0800), ros-kinetic-geometric-shapes:amd64 (0.5.2-0xenial-20170227-142025-0800, 0.5.2-0xenial-20170310-122242-0800), ros-kinetic-rospy:amd64 (1.12.7-0xenial-20170227-142222-0800, 1.12.7-0xenial-20170308-183940-0800), ros-kinetic-desktop:amd64 (1.3.0-0xenial-20170302-223605-0800, 1.3.0-0xenial-20170316-165147-0700), ros-kinetic-roslaunch:amd64 (1.12.7-0xenial-20170227-143335-0800, 1.12.7-0xenial-20170308-192730-0800), ros-kinetic-rqt-tf-tree:amd64 (0.5.6-0xenial-20170302-220927-0800, 0.5.6-0xenial-20170308-221819-0800), ros-kinetic-rqt-moveit:amd64 (0.5.6-0xenial-20170302-221012-0800, 0.5.6-0xenial-20170308-221859-0800), ros-kinetic-visualization-marker-tutorials:amd64 (0.10.1-0xenial-20170227-143139-0800, 0.10.1-0xenial-20170308-193413-0800), ros-kinetic-ros-base:amd64 (1.3.0-0xenial-20170227-160140-0800, 1.3.0-0xenial-20170308-211001-0800), ros-kinetic-roslisp:amd64 (1.9.20-0xenial-20170227-132204-0800, 1.9.20-0xenial-20170308-184833-0800), ros-kinetic-ros-comm:amd64 (1.12.7-0xenial-20170227-155832-0800, 1.12.7-0xenial-20170308-210535-0800), ros-kinetic-nodelet-topic-tools:amd64 (1.9.9-0xenial-20170227-155019-0800, 1.9.9-0xenial-20170308-195955-0800), ros-kinetic-ros-core:amd64 (1.3.0-0xenial-20170227-155952-0800, 1.3.0-0xenial-20170308-210730-0800), ros-kinetic-rqt-console:amd64 (0.4.7-0xenial-20170302-215342-0800, 0.4.7-0xenial-20170308-222005-0800), ros-kinetic-tf2-ros:amd64 (0.5.15-0xenial-20170227-160309-0800, 0.5.15-0xenial-20170308-210920-0800), ros-kinetic-rospy-tutorials:amd64 (0.7.1-0xenial-20170227-144304-0800, 0.7.1-0xenial-20170308-193605-0800), ros-kinetic-rqt-pose-view:amd64 (0.5.6-0xenial-20170302-221102-0800, 0.5.6-0xenial-20170308-221802-0800), ros-kinetic-diagnostic-common-diagnostics:amd64 (1.8.10-0xenial-20170227-163638-0800, 1.8.10-0xenial-20170308-214054-0800), ros-kinetic-rqt-logger-level:amd64 (0.4.7-0xenial-20170302-214359-0800, 0.4.7-0xenial-20170308-221845-0800), ros-kinetic-topic-tools:amd64 (1.12.7-0xenial-20170227-144325-0800, 1.12.7-0xenial-20170308-193558-0800), ros-kinetic-roslib:amd64 (1.13.5-0xenial-20170227-130826-0800, 1.13.5-0xenial-20170308-181854-0800), ros-kinetic-diagnostic-msgs:amd64 (1.12.5-0xenial-20170227-131424-0800, 1.12.5-0xenial-20170308-182759-0800), ros-kinetic-rosgraph-msgs:amd64 (1.11.2-0xenial-20170227-131933-0800, 1.11.2-0xenial-20170308-183114-0800), ros-kinetic-robot-model:amd64 (1.12.7-0xenial-20170227-163412-0800, 1.12.7-0xenial-20170310-123927-0800), ros-kinetic-roslz4:amd64 (1.12.7-0xenial-20170227-143629-0800, 1.12.7-0xenial-20170308-182349-0800), libc6-dbg:amd64 (2.23-0ubuntu6, 2.23-0ubuntu7), appstream:amd64 (0.9.4-1ubuntu2, 0.10.6-1~ubuntu16.04.2), libc6-dev:amd64 (2.23-0ubuntu6, 2.23-0ubuntu7), ros-kinetic-rosmsg:amd64 (1.12.7-0xenial-20170227-152432-0800, 1.12.7-0xenial-20170308-194441-0800), ros-kinetic-eigen-conversions:amd64 (1.11.8-0xenial-20170227-140332-0800, 1.11.8-0xenial-20170308-191208-0800), ros-kinetic-resource-retriever:amd64 (1.12.2-0xenial-20170227-141639-0800, 1.12.2-0xenial-20170308-184725-0800), ros-kinetic-rosservice:amd64 (1.12.7-0xenial-20170227-152738-0800, 1.12.7-0xenial-20170308-194759-0800), libwbclient0:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.3, 2:4.3.11+dfsg-0ubuntu0.16.04.5), ros-kinetic-joint-state-publisher:amd64 (1.12.7-0xenial-20170227-143026-0800, 1.12.7-0xenial-20170308-192419-0800), ros-kinetic-ros:amd64 (1.13.5-0xenial-20170227-140935-0800, 1.13.5-0xenial-20170308-190952-0800), ros-kinetic-kdl-parser:amd64 (1.12.7-0xenial-20170227-144926-0800, 1.12.7-0xenial-20170308-194201-0800), ros-kinetic-control-msgs:amd64 (1.4.0-0xenial-20170227-133229-0800, 1.4.0-0xenial-20170308-183651-0800), ros-kinetic-rviz-plugin-tutorials:amd64 (0.10.1-0xenial-20170227-203301-0800, 0.10.1-0xenial-20170309-010413-0800), ros-kinetic-bond:amd64 (1.7.18-0xenial-20170227-131410-0800, 1.7.18-0xenial-20170308-182743-0800), ros-kinetic-rosout:amd64 (1.12.7-0xenial-20170227-142920-0800, 1.12.7-0xenial-20170308-192416-0800), ros-kinetic-bondcpp:amd64 (1.7.18-0xenial-20170227-142154-0800, 1.7.18-0xenial-20170308-191846-0800), ros-kinetic-tf2:amd64 (0 ...
(more)
edit retag flag offensive close merge delete

Comments

Did you try this?

sudo apt-get dist-upgrade
angeltop gravatar imageangeltop ( 2017-03-27 04:07:11 -0500 )edit

yes i did, everything is up to date

this is a more or less brand new setup on my laptop - i installed everything last week (ubuntu ros and some things like dropbox and gitkraken) - cloned my repo and it worked, did the software update at some time and it stopped working.

Stoerakustik gravatar imageStoerakustik ( 2017-03-27 04:15:21 -0500 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2017-03-27 04:54:25 -0500

angeltop gravatar image

In the update history you have ros-kinetic-opencv3 I guess that now your ${OpenCV_INCLUDE_DIRS} points to opencv3 instead of opencv2

Add this line in your CMakeList.txt, in order to see if this gets the value that you want

message( STATUS "OpenCV Include Dir: " ${OpenCV_INCLUDE_DIRS} )

You can define the version of OpenCV that you prefer in the CMakeLists.txt.

Example:

find_package(OpenCV 2.4.8 EXACT REQUIRED)

I hope this helps

edit flag offensive delete link more

Comments

i added message( STATUS "OpenCV Include Dir: " ${OpenCV_INCLUDE_DIRS} ) and suddenly it works - shouldnt this only give me a feedback?

anyway it IS running by now - thank you good sir!

Stoerakustik gravatar imageStoerakustik ( 2017-03-27 05:10:18 -0500 )edit

the message should not fix it. It only prints a message in your console. If I were you I would clean my build and devel folders and try to link the correct libraries in my CMakeList

PS I am not using kinetic and I am a woman. Sorry not a sir...

Auf wiederhören!

angeltop gravatar imageangeltop ( 2017-03-27 05:26:09 -0500 )edit

I removed the message from my cmakelists again, cleared my build and devel and compiled again - still works.

" and try to link the correct libraries in my CMakeList" im going to do that anyway.

much thanks and auf wiederhören ;)

Stoerakustik gravatar imageStoerakustik ( 2017-03-27 05:41:59 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-03-27 04:02:34 -0500

Seen: 2,130 times

Last updated: Jun 23 '17