Install OpenCV3 under Indigo on Ubuntu 14.04
Hello,
I want to use a node for detecting markers that is depending on OpenCV3. Since ROS Indigo has only openCV2.4.8 preinstaleld the downloaded node fails on "catkin_make". I was searching for an easy way to install OpenVC3, but since i'm new to linux and ROS i wasn't able to install it.
Basically i guess this is what i need for my project:
http://sauravag.com/2015/03/how-to-tracking-aruco-marker-using-a-usb-webcam-and-ro/
Step 2:
git clone https://github.com/pal-robotics/aruco_ros.git
-> Cloning into 'aruco_ros'...
-> remote: Counting objects: 558, done.
-> remote: Total 558 (delta 0), reused 0 (delta 0), pack-reused 558
-> Receiving objects: 100% (558/558), 407.44 KiB | 0 bytes/s, done.
-> Resolving deltas: 100% (307/307), done.
-> Checking connectivity... done.
So far everything seems to be ok. The folder has been created and is also filled with lots of files. But than :
step 4:
catkin_make install
-> ...
-> (lots of lines without any error)
-> ...
-> CMake Error at aruco_ros/aruco/CMakeLists.txt:6 (find_package):
-> Could not find a configuration file for package "OpenCV" that is
-> compatible with requested version "3".
-> The following configuration files were considered but not accepted:
-> /usr/share/OpenCV/OpenCVConfig.cmake, version: 2.4.8
Tried to do an update (apt-get update) and tried again with same result. So i just tried the next tutorial here:
http://external-camera-tf.readthedocs...
But already the first line failes:
sudo apt-get install ros-indigo-opencv3
-> Reading package lists... Done
-> Building dependency tree
-> Reading state information... Done
-> E: Unable to locate package ros-indigo-opencv3
So it seems like there is no easy way to get OpenCV3 running under ROS Indigo with Ubuntu 14.04 (trusty), right? Or am i missing something? Because on other posts, people only complain about the problems after they installed the additional version like here and also here. So it must be possible to get it working (even if maybe not by an easy way)
Does anybody know how? Anybody reading this using OpenCV3 (maybe even with the marker detection) and is still knowing what steps has been done?
Thanks to everybody taking some time to read through this.
.
.
.
Update1: Ok, following the tutorial of the second link pavel92 suggested and a few dozens of hundreds of lines in the terminal later the installation seems to be complete. I saw a few warnings but no error at the end. As i now try to catkin_make i get something different:
/home/(username)/catkin_ws/src/aruco_ros/aruco/src/aruco/cvdrawingutils.cpp:172:82:
error: ‘CV_AA’ was not declared in this scope
cv::line(Image,imagePoints[i],imagePoints[i+4],Scalar(0,0,255,255),1,CV_AA);
this seems to be the case for: CV_AA (9x), CV_BGR2GRAY (1x) , assert (3x) (13x errors total)
At least for the first two they seem to be defines (?).
In the makefile (@: /home/(username)/catkin_ws/src/aruco_ros/aruco) all the suggestions by pavel92 are already included:
cmake_minimum_required(VERSION 2.8.3)
project(aruco)
find_package(catkin)
find_package(OpenCV 3 REQUIRED) <-----
catkin_package(
INCLUDE_DIRS include
LIBRARIES aruco
)
include_directories(
include
${catkin_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS} <-----
)
add_library ...