Closed vamsikalagaturu closed 2 years ago
replace ${CMAKE_INSTALL_PREFIX}/../cv_bridge/include
with $ENV{COLCON_PREFIX_PATH}/cv_bridge/include
so that you only need to build once. I guess the install directory for mir_object_recognition
doesn't exist during the first build, so the CMAKE_INSTALL_PREFIX
points to a non-existent directory.
The cv_bridge import issues are no longer occuring with the latest builds, and therefore closing the issue.
When used cv_bridge as
#include "cv_bridge/cv_bridge/cv_bridge.h"
in the package, it is throwing an error:This is because, the
cv_bridge_export.h
is present in the pathcv_bridge/cv_bridge/cv_bridge_export.h
and the inlcude incv_bridge.h
is referring tocv_bridge/cv_bridge_export.h
A workaround for this issue:
ros-rolling-cv-bridge
package from the system.cv_bridge
into local system and checkout to ros2 branch.cv_bridge/CMakeLists.txt
frominstall(DIRECTORY include/ DESTINATION include/${PROJECT_NAME})
toinstall(DIRECTORY include/ DESTINATION include/)
cv_bridge/src/CMakeLists.txt
fromDESTINATION include/${PROJECT_NAME}/${PROJECT_NAME})
toDESTINATION include/${PROJECT_NAME}/)
cv_bridge
install/cv_bridge/include/cv_bridge/cv_bridge.h
rather thaninstall/cv_bridge/include/cv_bridge/cv_bridge/cv_bridge.h
#include "cv_bridge/cv_bridge.h
Simultaneously, created the issue in ros-perception/vision_opencv: https://github.com/ros-perception/vision_opencv/issues/435
If the colcon build is not finding the local package, but searching in /opt/ros/version/ for cv_bridge:
${CMAKE_INSTALL_PREFIX}/../cv_bridge/include
intoinclude_directories
in your package CMAKELISTS