Skip to content

Commit

Permalink
Fixed #135. Fixed opencv include dir order.
Browse files Browse the repository at this point in the history
  • Loading branch information
matlabbe committed Dec 11, 2022
1 parent 7534264 commit b0b5d24
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ ELSE()
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
CATKIN_DEPENDS cv_bridge roscpp rospy sensor_msgs std_msgs image_transport message_filters tf message_runtime
DEPENDS OpenCV
)

###########
Expand Down
10 changes: 4 additions & 6 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,6 @@ SET(INCLUDE_DIRS
${CMAKE_CURRENT_BINARY_DIR} # for qt ui generated in binary dir
${ZLIB_INCLUDE_DIRS}
)
IF(CATKIN_BUILD)
SET(INCLUDE_DIRS
${INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
)
ENDIF(CATKIN_BUILD)

IF(QT4_FOUND)
INCLUDE(${QT_USE_FILE})
Expand Down Expand Up @@ -140,6 +134,10 @@ ENDIF(TORCH_FOUND)
#include files
INCLUDE_DIRECTORIES(${INCLUDE_DIRS})

IF(CATKIN_BUILD)
INCLUDE_DIRECTORIES(SYSTEM ${catkin_INCLUDE_DIRS})
ENDIF(CATKIN_BUILD)

# create a library from the source files
ADD_LIBRARY(find_object ${SRC_FILES})
# Linking with Qt libraries
Expand Down
2 changes: 1 addition & 1 deletion src/ros/find_object_2d_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ int main(int argc, char** argv)
QCoreApplication app(argc, argv);

// connect stuff:
QObject::connect(camera, SIGNAL(imageReceived(const cv::Mat &, const find_object::Header &, const cv::Mat &, float)), findObjectROS, SLOT(detect(const cv::Mat &, const QString &, double, const cv::Mat &, float)));
QObject::connect(camera, SIGNAL(imageReceived(const cv::Mat &, const find_object::Header &, const cv::Mat &, float)), findObjectROS, SLOT(detect(const cv::Mat &, const find_object::Header &, const cv::Mat &, float)));

//loop
camera->start();
Expand Down

0 comments on commit b0b5d24

Please sign in to comment.