0
$\begingroup$

Rosanswers logo

I'm trying to get image_transport to work, but when I tried both roscreate-pkg and catkin_create_kpg, I always get the error along the lines of "the dependency opencv2 is missing". I used locate for opencv2 and found opencv2 under /usr/include. How do I get it working with ROS Indigo? Do I still need vision_opencv and all the other libopencv* packages like described in this page (http://wiki.ros.org/opencv2). Any help would be greatly appreciated.


Originally posted by K. Zeng on ROS Answers with karma: 23 on 2014-10-07

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Hope this helps


Originally posted by ct2034 with karma: 862 on 2014-10-07

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by K. Zeng on 2014-10-08:\

  1. Would something like the code below work?

    catkin_package( INCLUDE_DIRS include LIBRARIES image_mover CATKIN_DEPENDS cv_bridge image_transport DEPENDS system_lib opencv2 )

  2. I don't have a .cpp file in the package's src folder yet. Should I write that out first?

Comment by K. Zeng on 2014-10-08:
UPDATE: What I did in the above comment didn't work.

Comment by ct2034 on 2014-10-08:
What is not working? Which steps are you taking? What is the output of catkin_make?

Comment by K. Zeng on 2014-10-09:
Never mind. What I ended up doing was the following:

find_package(OpenCV REQUIRED)
find_package(catkin REQUIRED COMPONENTS
  cv_bridge
  image_transport
)

...

Comment by K. Zeng on 2014-10-09:
...

target_link_libraries(publisher ${OpenCV_LIBRARIES} ${catkin_LIBRARIES})
...
target_link_libraries(publisher ${OpenCV_LIBRARIES} ${catkin_LIBRARIES})
target_link_libraries(subscriber ${OpenCV_LIBRARIES} ${catkin_LIBRARIES})

I also removed opencv and opencv2 from package.xml.

Comment by dmngu9 on 2015-05-08:
hey, how did you setup opencv with ros indigo? i have a lot of problem with this. What did you put in you Cmakelist file and xml file

Comment by ct2034 on 2015-09-14:
I have not tested it under indigo, yet. Sorry

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.