机器人 Grasp Pose Detection (GPD) 添加OpenCV需要注意的问题

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/flyfish1986/article/details/85791714

机器人 Grasp Pose Detection (GPD) 添加OpenCV需要注意的问题

flyfish

CMakeFiles/gpd_get_grasps.dir/src/interface/get_grasps.cpp.o:在函数‘cv::operator<<(std::ostream&, cv::Mat const&) [clone .constprop.575]’中:
get_grasps.cpp:(.text+0x17f):对‘cv::Formatter::get(int)’未定义的引用
CMakeFiles/gpd_get_grasps.dir/src/interface/get_grasps.cpp.o:在函数‘detect_grasps_callback(gpd::GraspConfigList_<std::allocator<void> > const&)’中:
get_grasps.cpp:(.text+0x75f):对‘cv::Mat::eye(int, int, int)’未定义的引用
get_grasps.cpp:(.text+0x83a):对‘cv::Mat::ones(int, int, int)’未定义的引用
get_grasps.cpp:(.text+0x959):对‘cv::operator*(cv::Mat const&, double)’未定义的引用
get_grasps.cpp:(.text+0xa96):对‘cv::operator+(cv::Mat const&, cv::Scalar_<double> const&)’未定义的引用
get_grasps.cpp:(.text+0xac8):对‘cv::operator+(cv::Mat const&, cv::Scalar_<double> const&)’未定义的引用
get_grasps.cpp:(.text+0xaf0):对‘cv::MatExpr::mul(cv::MatExpr const&, double) const’未定义的引用
get_grasps.cpp:(.text+0xc07):对‘cv::operator*(cv::Mat const&, cv::Mat const&)’未定义的引用
CMakeFiles/gpd_get_grasps.dir/src/interface/get_grasps.cpp.o:在函数‘cvflann::anyimpl::big_any_policy<cv::String>::static_delete(void**)’中:
get_grasps.cpp:(.text._ZN7cvflann7anyimpl14big_any_policyIN2cv6StringEE13static_deleteEPPv[_ZN7cvflann7anyimpl14big_any_policyIN2cv6StringEE13static_deleteEPPv]+0x15):对‘cv::String::deallocate()’未定义的引用
CMakeFiles/gpd_get_grasps.dir/src/interface/get_grasps.cpp.o:在函数‘cvflann::anyimpl::big_any_policy<cv::String>::move(void* const*, void**)’中:
get_grasps.cpp:(.text._ZN7cvflann7anyimpl14big_any_policyIN2cv6StringEE4moveEPKPvPS5_[_ZN7cvflann7anyimpl14big_any_policyIN2cv6StringEE4moveEPKPvPS5_]+0x10):对‘cv::String::deallocate()’未定义的引用
get_grasps.cpp:(.text._ZN7cvflann7anyimpl14big_any_policyIN2cv6StringEE4moveEPKPvPS5_[_ZN7cvflann7anyimpl14big_any_policyIN2cv6StringEE4moveEPKPvPS5_]+0x24):对‘cv::String::deallocate()’未定义的引用
CMakeFiles/gpd_get_grasps.dir/src/interface/get_grasps.cpp.o:在函数‘cv::Mat::~Mat()’中:
get_grasps.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x15):对‘cv::Mat::deallocate()’未定义的引用
get_grasps.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x71):对‘cv::fastFree(void*)’未定义的引用
CMakeFiles/gpd_get_grasps.dir/src/interface/get_grasps.cpp.o:在函数‘cv::MatExpr::~MatExpr()’中:
get_grasps.cpp:(.text._ZN2cv7MatExprD2Ev[_ZN2cv7MatExprD5Ev]+0x1f):对‘cv::Mat::deallocate()’未定义的引用
get_grasps.cpp:(.text._ZN2cv7MatExprD2Ev[_ZN2cv7MatExprD5Ev]+0x99):对‘cv::fastFree(void*)’未定义的引用
get_grasps.cpp:(.text._ZN2cv7MatExprD2Ev[_ZN2cv7MatExprD5Ev]+0xb5):对‘cv::Mat::deallocate()’未定义的引用
get_grasps.cpp:(.text._ZN2cv7MatExprD2Ev[_ZN2cv7MatExprD5Ev]+0x126):对‘cv::fastFree(void*)’未定义的引用
get_grasps.cpp:(.text._ZN2cv7MatExprD2Ev[_ZN2cv7MatExprD5Ev]+0x13f):对‘cv::Mat::deallocate()’未定义的引用
get_grasps.cpp:(.text._ZN2cv7MatExprD2Ev[_ZN2cv7MatExprD5Ev]+0x1a1):对‘cv::fastFree(void*)’未定义的引用
collect2: error: ld returned 1 exit status
gpd/CMakeFiles/gpd_get_grasps.dir/build.make:356: recipe for target '/home/pumpkinking/catkin_ws/devel/lib/gpd/get_grasps' failed
make[2]: *** [/home/pumpkinking/catkin_ws/devel/lib/gpd/get_grasps] Error 1
CMakeFiles/Makefile2:1371: recipe for target 'gpd/CMakeFiles/gpd_get_grasps.dir/all' failed
make[1]: *** [gpd/CMakeFiles/gpd_get_grasps.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j4 -l4" failed
pumpkinking@pumpkinkingpc:~/catkin_ws$ 

不仅仅要添加头文件 还要更改 CMakeList
CMakeList 增加OpenCV的lib
target_link_libraries(${PROJECT_NAME}_get_grasps
${catkin_LIBRARIES}
${PCL_LIBRARIES}
${OpenCV_LIBRARIES})

猜你喜欢

转载自blog.csdn.net/flyfish1986/article/details/85791714
今日推荐