先设定好rosnode需要的opencv版本
set(OpenCV_DIR /usr/local/opencv2.4.13.1/share/OpenCV)
find_package(OpenCV 2.4.13.1 REQUIRED)
在target_link_libraries前一句添加:
find_package(catkin REQUIRED COMPONENTS
roscpp
cv_bridge
std_msgs
sensor_msgs
nav_msgs
message_filters
tf
dynamic_reconfigure
)