ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Building OpenCV from source for ROS

asked 2019-07-01 15:29:53 -0600

mogumbo gravatar image

updated 2019-07-01 19:58:59 -0600

130s gravatar image

I'm in need of a newer version or OpenCV than is provided by my Ubuntu repo. Is there a version or fork of OpenCV that contains a package.xml so it can be compiled as part of a ROS workspace? Seems like that would be more convenient than compiling a local version.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-07-01 20:02:23 -0600

130s gravatar image

updated 2019-07-01 20:04:32 -0600

May or may not be an answer but this doesn't fit into comment section so posting as an answer.

Building opencv from source for ROS is documented on this section on its wiki page, which seems to cover not just building from source but mixed with how to make binary packages out of built artifact IINM. I haven't tried the whole steps by myself, but I'd say go through the steps in that section up to the following line, then start building:

44 echo "install(FILES package.xml DESTINATION share/opencv3)" >> ./CMakeLists.txt
edit flag offensive delete link more



Thanks 130s. I had stopped looking at that page about 24 hours ago because I found the instructions confusing and it all looked pretty outdated. I just took another stab at it, changing the OpenCV version to 2.4.6 and using opencv3-release's package.xml for lunar because there isn't one for melodic.

All that gets me a package that compiles in my workspace. Yay! Problem solved.

Unfortunately, now I'm stuck on a different problem: not all libraries link against my local OpenCV. I get the exact same problem now building OpenCV in my workspace. Ug.

mogumbo gravatar image mogumbo  ( 2019-07-02 13:16:59 -0600 )edit

Question Tools



Asked: 2019-07-01 15:29:53 -0600

Seen: 591 times

Last updated: Jul 01 '19