CMakeLists.txt and package.xml files of ros image to cv image conversion
I have successfully built a node that can convert ros images to cv images based on tutorial given here. I had the following lines in my CMakeLists.txt
:
find_package(OpenCV REQUIRED)
include_directories(
${catkin_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
)
target_link_libraries(roscv_conv_node
${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
)
and the following in the package.xml
:
<build_depend>OpenCV</build_depend>
<run_depend>OpenCV</run_depend>
The link given above says that opencv2 is to be added in package.xml. Out of curiosity, I removed all the above lines with the word OpenCV
in both CMakeLists.txt
and package.xml
. I ran the catkin_make to compile my node again. It ran successfully and the node works fine too. I think it shouldn't. How is it able to know that the package requires opencv?
Asked by skr_robo on 2016-08-10 12:17:30 UTC
Comments
are you sure you rebuild the package? please remove the build/devel/install directories to make extra sure and compile again.
Asked by Dimitri Schachmann on 2016-08-11 08:48:08 UTC
Yes, earlier, I had removed the folder
roscv_conv
(that's the name I gave for the package) in thebuild
directory and tried it. But it worked. Now that you mentioneddevel
, I removed every folder that saidroscv_conv
except the one insrc
. I didcatkin_make
. It worked.Asked by skr_robo on 2016-08-12 11:54:37 UTC
I am running this on ros Indigo in ubuntu 14.04 on a Jetson TX1.
Asked by skr_robo on 2016-08-12 12:00:58 UTC
I haven't removed image_transport and cv_bridge dependencies. Could this be because of that?
Asked by skr_robo on 2016-08-12 12:04:54 UTC
build
anddevel
directories and build everything from scratch. 2. You are using c++, right?Asked by Dimitri Schachmann on 2016-08-15 03:51:58 UTC
Yes, I am using c++. I will try this.
Asked by skr_robo on 2016-08-18 17:07:43 UTC