Hi all,
I am trying to fix a compiling problem for a week now, without success. :(
Basically I am implementing this tutorial: http://wiki.ros.org/image_transport/Tutorials/PublishingImages
However, when I compile, I get the following errors:
In file included from /opt/ros/groovy/include/opencv2/opencv.hpp:47:0,
from /home/ruud/Dropbox/ros/catkin_workspace/src/test_package/include/node.h:14,
from /home/ruud/Dropbox/ros/catkin_workspace/src/test_package/src/node.cpp:1:
/opt/ros/groovy/include/opencv2/core/core.hpp:4126:9: error: expected identifier before ‘int’
/opt/ros/groovy/include/opencv2/core/core.hpp:4126:9: error: expected ‘}’ before ‘int’
/opt/ros/groovy/include/opencv2/core/core.hpp:4126:12: error: expected unqualified-id before ‘=’ token
/opt/ros/groovy/include/opencv2/core/core.hpp:4141:22: error: expected unqualified-id before ‘)’ token
/opt/ros/groovy/include/opencv2/core/core.hpp:4143:14: error: expected unqualified-id before ‘const’
/opt/ros/groovy/include/opencv2/core/core.hpp:4143:14: error: expected ‘)’ before ‘const’ ....
In the CMakeLists.txt I have added the following according to the tutorial:
find_package(OpenCV)
include_directories(${OpenCV_INCLUDE_DIRS})
target_link_libraries(node ${OpenCV_LIBRARIES})
In the package.xml I have added:
<build_depend>cv_bridge</build_depend>
<build_depend>image_transport</build_depend>
<run_depend>cv_bridge</run_depend>
<run_depend>image_transport</run_depend>
On the website here (http://wiki.ros.org/opencv2) I read OpenCV is deprecated under groovy and you need to install it as a third party library? However, why are there OpenCV packages installed under /opt/ros/groovy/include/opencv and /opt/ros/groovy/include/opencv2.
Very confusing! :)
Thanks, Ruud
Originally posted by Ruud on ROS Answers with karma: 212 on 2014-10-26
Post score: 0