hey guys, i have problems with using opencv in ros. i followed the cv_bridge tutorial but when catkin_make. it gives me strange error. How did you setup Cmakelist file and package.xml? How to add dependency for opencv2 . The tutorial is not clear on this > "CMakeFiles/color.dir/src/color.cpp.o:> In function> `ImageConverter::ImageConverter()':> color.cpp:(.text._ZN14ImageConverterC2Ev[_ZN14ImageConverterC5Ev]+0x8f):> undefined reference to> `image_transport::ImageTransport::ImageTransport(ros::NodeHandle> const&)'> color.cpp:(.text._ZN14ImageConverterC2Ev[_ZN14ImageConverterC5Ev]+0x375):> undefined reference to> `image_transport::ImageTransport::advertise(std::string> const&, unsigned int, bool)'> color.cpp:(.text._ZN14ImageConverterC2Ev[_ZN14ImageConverterC5Ev]+0x584):> undefined reference to> `image_transport::ImageTransport::~ImageTransport()'> CMakeFiles/color.dir/src/color.cpp.o:> In function> `ImageConverter::~ImageConverter()':> color.cpp:(.text._ZN14ImageConverterD2Ev[_ZN14ImageConverterD5Ev]+0x49):> undefined reference to> `image_transport::ImageTransport::~ImageTransport()'> color.cpp:(.text._ZN14ImageConverterD2Ev[_ZN14ImageConverterD5Ev]+0x9a):> undefined reference to> `image_transport::ImageTransport::~ImageTransport()'> CMakeFiles/color.dir/src/color.cpp.o:> In function> `ImageConverter::imageCb(boost::shared_ptr>> const> const&)':> color.cpp:(.text._ZN14ImageConverter7imageCbERKN5boost10shared_ptrIKN11sensor_msgs6Image_ISaIvEEEEE[_ZN14ImageConverter7imageCbERKN5boost10shared_ptrIKN11sensor_msgs6Image_ISaIvEEEEE]+0x3f):> undefined reference to> `cv_bridge::toCvCopy(boost::shared_ptr>> const> const&, std::string const&)'> color.cpp:(.text._ZN14ImageConverter7imageCbERKN5boost10shared_ptrIKN11sensor_msgs6Image_ISaIvEEEEE[_ZN14ImageConverter7imageCbERKN5boost10shared_ptrIKN11sensor_msgs6Image_ISaIvEEEEE]+0x187):> undefined reference to> `cv_bridge::CvImage::toImageMsg()> const'> color.cpp:(.text._ZN14ImageConverter7imageCbERKN5boost10shared_ptrIKN11sensor_msgs6Image_ISaIvEEEEE[_ZN14ImageConverter7imageCbERKN5boost10shared_ptrIKN11sensor_msgs6Image_ISaIvEEEEE]+0x1ba):> undefined reference to> `image_transport::Publisher::publish(boost::shared_ptr>> const> const&) const'> CMakeFiles/color.dir/src/color.cpp.o:> In function> `image_transport::Subscriber> image_transport::ImageTransport::subscribe(std::string> const&, unsigned int, void> (ImageConverter::*)(boost::shared_ptr>> const> const&), ImageConverter*, image_transport::TransportHints> const&)':> color.cpp:(.text._ZN15image_transport14ImageTransport9subscribeI14ImageConverterEENS_10SubscriberERKSsjMT_FvRKN5boost10shared_ptrIKN11sensor_msgs6Image_ISaIvEEEEEEPS6_RKNS_14TransportHintsE[_ZN15image_transport14ImageTransport9subscribeI14ImageConverterEENS_10SubscriberERKSsjMT_FvRKN5boost10shared_ptrIKN11sensor_msgs6Image_ISaIvEEEEEEPS6_RKNS_14TransportHintsE]+0xa4):> undefined reference to> `image_transport::ImageTransport::subscribe(std::string> const&, unsigned int,> boost::function (boost::shared_ptr>> const> const&)> const&, boost::shared_ptr const&,> image_transport::TransportHints> const&)'> collect2: error: ld returned 1 exit status> make[2]: *** [/home/dmngu9/fyp_ws/devel/lib/color_tracking/color]> Error 1> make[1]: *** [color_tracking/CMakeFiles/color.dir/all]> Error 2> make: *** [all] Error 2> Invoking "make -j4 -l4" failed> "
↧
Trending Articles
More Pages to Explore .....