Make ros to link against Opencv3
I have ros indigo and opencv 3.0.0 installed on my system and wanted to install object recognition kitchen with ork.rosinstall from their installation tutorial. I can't even compile the ork. Before, when I had opencv 2.4.8 everything was alright. I read somewhere that ros is linked against opencv 2.4 so I wonder if it is even possible to run it with opencv 3. While compiling ORK a get these errors, which I didn't get when I had 2.4.8 version of opencv. I could installed old version back but it doesn't seem as a good solution to me.
Base path: /home/tomas/ws
Source space: /home/tomas/ws/src
Build space: /home/tomas/ws/build
Devel space: /home/tomas/ws/devel
Install space: /home/tomas/ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/tomas/ws/build"
####
####
#### Running command: "make -j8 -l8" in "/home/tomas/ws/build"
####
[ 0%] Built target rosgraph_msgs_generate_messages_py
[ 1%] Built target openni_wrapper
[ 1%] Built target nav_msgs_generate_messages_cpp
[ 1%] Built target roscpp_generate_messages_lisp
[ 1%] [ 1%] [ 1%] Building CXX object ork_renderer/src/CMakeFiles/object_recognition_renderer_2d.dir/renderer2d.cpp.o
Building CXX object opencv_candidate/src/opencv_candidate/CMakeFiles/opencv_candidate.dir/datamatrix.cpp.o
Built target object_recognition_renderer_3d
[ 1%] Built target sensor_msgs_generate_messages_cpp
[ 1%] Built target sensor_msgs_generate_messages_lisp
[ 1%] Building CXX object ecto_image_pipeline/src/CMakeFiles/ecto_image_pipeline.dir/calibration.cpp.o
[ 1%] Built target sensor_msgs_generate_messages_py
[ 1%] Built target topic_tools_generate_messages_cpp
[ 4%] Built target ecto
[ 4%] Built target geometry_msgs_generate_messages_py
[ 4%] Built target geometry_msgs_generate_messages_cpp
[ 4%] [ 4%] Built target topic_tools_generate_messages_lisp
Building CXX object ecto_opencv/cells/cv_bp/opencv/CMakeFiles/opencv_boost_python.dir/cv_mat.cpp.o
[ 4%] [ 5%] Built target geometry_msgs_generate_messages_lisp
Building CXX object ecto_opencv/cells/cv_bp/opencv/CMakeFiles/opencv_boost_python.dir/cv_highgui.cpp.o
[ 5%] Built target roscpp_generate_messages_py
make[2]: *** No rule to make target `/usr/lib/x86_64-linux-gnu/libopencv_videostab.so.2.4.8', needed by `/home/tomas/ws/devel/lib/python2.7/dist-packages/ecto_opencv/cv_bp.so'. Stop.
make[2]: *** Waiting for unfinished jobs....
[ 5%] Building CXX object ecto_opencv/cells/cv_bp/opencv/CMakeFiles/opencv_boost_python.dir/highgui_defines.cpp.o
[ 5%] [ 5%] Built target rosgraph_msgs_generate_messages_lisp
Built target topic_tools_generate_messages_py
[ 5%] Built target actionlib_msgs_generate_messages_py
[ 5%] Built target std_msgs_generate_messages_lisp
[ 5%] Built target nav_msgs_generate_messages_py
[ 5%] Built target rosgraph_msgs_generate_messages_cpp
[ 5%] Built target std_msgs_generate_messages_cpp
[ 5%] Built target actionlib_msgs_generate_messages_lisp
[ 5%] Built target std_msgs_generate_messages_py
[ 5%] Built target nav_msgs_generate_messages_lisp
[ 5%] Built target actionlib_msgs_generate_messages_cpp
[ 5%] Built target roscpp_generate_messages_cpp
/home/tomas/ws/src/opencv_candidate/src/opencv_candidate/datamatrix.cpp:4:37: fatal error: opencv2/legacy/compat.hpp: No such file or directory
#include <opencv2/legacy/compat.hpp>
^
compilation terminated.
make[2]: *** [opencv_candidate/src/opencv_candidate/CMakeFiles/opencv_candidate.dir/datamatrix.cpp.o] Error 1
make[1]: *** [opencv_candidate/src/opencv_candidate/CMakeFiles/opencv_candidate.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** No rule to make target `/usr/lib/x86_64-linux-gnu/libopencv_videostab.so.2.4.8', needed by `/home/tomas/ws/devel/lib/python2.7/dist-packages/ecto_ros/ecto_ros_main.so'. Stop.
make[1]: *** [ecto_ros/src/CMakeFiles/ecto_ros_main_ectomodule.dir/all] Error 2
/home/tomas/ws/src/ork_renderer/src/renderer2d.cpp: In member function ‘virtual void Renderer2d::render(cv::Mat&, cv::Mat&, cv::Mat&, cv::Rect&) const ...