Error in CameraNode and StereoNode
Hi
I'm using ROS Indigo on Fedora 22.
I paste the ueye folder on my catkin workspace (/home/doliveira/catkin_ws/src/), but when I run catkin_make on catkin_ws I get the follow error on files CameraNode.cpp and StereoNode.cpp.
/home/doliveira/catkin_ws/src/ueye/src/CameraNode.cpp: In member function ‘sensor_msgs::ImagePtr ueye::CameraNode::processFrame(IplImage*, sensor_msgs::CameraInfoPtr&)’: /home/doliveira/catkin_ws/src/ueye/src/CameraNode.cpp:368:20: error: no match for ‘operator=’ (operand types are ‘cv::Mat’ and ‘IplImage* {aka _IplImage*}’) converter_.image = frame; ^ In file included from /usr/local/include/opencv2/core/mat.hpp:3396:0, from /usr/local/include/opencv2/core.hpp:59, from /usr/local/include/opencv2/core/core.hpp:48, from /home/doliveira/catkin_ws/src/vision_opencv-indigo/cv_bridge/include/cv_bridge/cv_bridge.h:42, from /home/doliveira/catkin_ws/src/ueye/include/ueye/CameraNode.h:44, from /home/doliveira/catkin_ws/src/ueye/src/CameraNode.cpp:35: /usr/local/include/opencv2/core/mat.inl.hpp:560:6: note: candidate: cv::Mat& cv::Mat::operator=(const cv::Mat&) Mat& Mat::operator = (const Mat& m) ^ /usr/local/include/opencv2/core/mat.inl.hpp:560:6: note: no known conversion for argument 1 from ‘IplImage* {aka _IplImage*}’ to ‘const cv::Mat&’ In file included from /usr/local/include/opencv2/core/mat.hpp:3396:0, from /usr/local/include/opencv2/core.hpp:59, from /usr/local/include/opencv2/core/core.hpp:48, from /home/doliveira/catkin_ws/src/vision_opencv-indigo/cv_bridge/include/cv_bridge/cv_bridge.h:42, from /home/doliveira/catkin_ws/src/ueye/include/ueye/CameraNode.h:44, from /home/doliveira/catkin_ws/src/ueye/src/CameraNode.cpp:35: /usr/local/include/opencv2/core/mat.inl.hpp:2878:6: note: candidate: cv::Mat& cv::Mat::operator=(const cv::MatExpr&) Mat& Mat::operator = (const MatExpr& e) ^ /usr/local/include/opencv2/core/mat.inl.hpp:2878:6: note: no known conversion for argument 1 from ‘IplImage* {aka _IplImage*}’ to ‘const cv::MatExpr&’ In file included from /usr/local/include/opencv2/core.hpp:59:0, from /usr/local/include/opencv2/core/core.hpp:48, from /home/doliveira/catkin_ws/src/vision_opencv-indigo/cv_bridge/include/cv_bridge/cv_bridge.h:42, from /home/doliveira/catkin_ws/src/ueye/include/ueye/CameraNode.h:44, from /home/doliveira/catkin_ws/src/ueye/src/CameraNode.cpp:35: /usr/local/include/opencv2/core/mat.hpp:1102:10: note: candidate: cv::Mat& cv::Mat::operator=(const Scalar&) Mat& operator = (const Scalar& s); ^ /usr/local/include/opencv2/core/mat.hpp:1102:10: note: no known conversion for argument 1 from ‘IplImage* {aka _IplImage*}’ to ‘const Scalar& {aka const cv::Scalar_<double>&}’ ueye/CMakeFiles/ueye_nodelets.dir/build.make:110: recipe for target 'ueye/CMakeFiles/ueye_nodelets.dir/src/CameraNode.cpp.o' failed make[2]: *** [ueye/CMakeFiles/ueye_nodelets.dir/src/CameraNode.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... [ 82%] Built target beginner_tutorials_generate_messages /home/doliveira/catkin_ws/src/ueye/src/StereoNode.cpp: In member function ‘sensor_msgs::ImagePtr ueye::StereoNode::processFrame(IplImage*, ueye::Camera&, cv_bridge::CvImage&, sensor_msgs::CameraInfoPtr&, sensor_msgs::CameraInfo&)’: /home/doliveira/catkin_ws/src/ueye/src/StereoNode.cpp:465:19: error: no match for ‘operator=’ (operand types are ‘cv::Mat’ and ‘IplImage* {aka _IplImage*}’) converter.image = frame; ^ In file included from /usr/local/include/opencv2/core/mat.hpp:3396:0, from /usr/local/include/opencv2/core.hpp:59, from /usr/local/include/opencv2/core/core.hpp:48, from /home/doliveira/catkin_ws/src/vision_opencv-indigo/cv_bridge/include/cv_bridge/cv_bridge.h:42, from /home/doliveira/catkin_ws/src/ueye/include/ueye/CameraNode.h:44, from /home/doliveira/catkin_ws/src/ueye/include/ueye/StereoNode.h:38, from /home/doliveira/catkin_ws/src/ueye/src/StereoNode.cpp:35: /usr/local/include/opencv2/core/mat.inl.hpp:560:6: note: candidate: cv::Mat& cv::Mat::operator=(const cv::Mat&) Mat& Mat::operator = (const Mat& m) ^ /usr/local/include/opencv2/core/mat.inl.hpp:560:6: note: no known conversion for argument 1 from ‘IplImage* {aka _IplImage*}’ to ‘const cv::Mat&’ In file included from /usr/local/include/opencv2/core/mat.hpp:3396:0, from /usr/local/include/opencv2/core.hpp:59, from /usr/local/include/opencv2/core/core.hpp:48, from /home/doliveira/catkin_ws/src/vision_opencv-indigo/cv_bridge/include/cv_bridge/cv_bridge.h:42, from /home/doliveira/catkin_ws/src/ueye/include/ueye/CameraNode.h:44, from /home/doliveira/catkin_ws/src/ueye/include/ueye/StereoNode.h:38, from /home/doliveira/catkin_ws/src/ueye/src/StereoNode.cpp:35: /usr/local/include/opencv2/core/mat.inl.hpp:2878:6: note: candidate: cv::Mat& cv::Mat::operator=(const cv::MatExpr&) Mat& Mat::operator = (const MatExpr& e) ^ /usr/local/include/opencv2/core/mat.inl.hpp:2878:6: note: no known conversion for argument 1 from ‘IplImage* {aka _IplImage*}’ to ‘const cv::MatExpr&’ In file included from /usr/local/include/opencv2/core.hpp:59:0, from /usr/local/include/opencv2/core/core.hpp:48, from /home/doliveira/catkin_ws/src/vision_opencv-indigo/cv_bridge/include/cv_bridge/cv_bridge.h:42, from /home/doliveira/catkin_ws/src/ueye/include/ueye/CameraNode.h:44, from /home/doliveira/catkin_ws/src/ueye/include/ueye/StereoNode.h:38, from /home/doliveira/catkin_ws/src/ueye/src/StereoNode.cpp:35: /usr/local/include/opencv2/core/mat.hpp:1102:10: note: candidate: cv::Mat& cv::Mat::operator=(const Scalar&) Mat& operator = (const Scalar& s); ^ /usr/local/include/opencv2/core/mat.hpp:1102:10: note: no known conversion for argument 1 from ‘IplImage* {aka _IplImage*}’ to ‘const Scalar& {aka const cv::Scalar_<double>&}’ ueye/CMakeFiles/ueye_nodelets.dir/build.make:158: recipe for target 'ueye/CMakeFiles/ueye_nodelets.dir/src/StereoNode.cpp.o' failed make[2]: *** [ueye/CMakeFiles/ueye_nodelets.dir/src/StereoNode.cpp.o] Error 1 CMakeFiles/Makefile2:5154: recipe for target 'ueye/CMakeFiles/ueye_nodelets.dir/all' failed make[1]: *** [ueye/CMakeFiles/ueye_nodelets.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 91%] Built target opencv_apps Makefile:138: recipe for target 'all' failed make: *** [all] Error 2
I'm missing some packaged or step?
Thank you
Comments (9)
-
repo owner -
reporter Hi I'm usign OpenCV 3
#define CV_VERSION_MAJOR 3 #define CV_VERSION_MINOR 0 #define CV_VERSION_REVISION 0 #define CV_VERSION_STATUS ""
-
repo owner This driver uses OpenCV 2, but I just removed the OpenCV dependency in e8ce94b. Try the devel branch.
I will merge with default when you verify these changes. I don't have a camera to test with right now.
-
reporter Hi
With that branch I can compile the catkin workspace.
I run
$ rosrun ueye camera [ WARN] [1447167052.474431018]: Loaded uEye SDK 4.61.3. Expecting 4.60.5. [ INFO] [1447167052.579870428]: Found 1 uEye camera. [ INFO] [1447167056.556749477]: Opened camera UI306xCP-C 4102853470 [ WARN] [1447167056.563229470]: Failed to load intrinsics for camera from file
and the topics are created
$ rostopic list /camera/parameter_descriptions /camera/parameter_updates /camera_info /image_raw /image_raw/compressed /image_raw/compressed/parameter_descriptions /image_raw/compressed/parameter_updates /image_raw/compressedDepth /image_raw/compressedDepth/parameter_descriptions /image_raw/compressedDepth/parameter_updates /image_raw/theora /image_raw/theora/parameter_descriptions /image_raw/theora/parameter_updates /rosout /rosout_agg
But when I try to read some topic, like
$ rosrun image_view image_view image:=/image_raw or $ rostopic echo /image_raw
I get an error
[ INFO] [1447167130.349648235]: Started video stream. camera: /usr/include/boost/smart_ptr/shared_ptr.hpp:648: typename boost::detail::sp_member_access<T>::type boost::shared_ptr<T>::operator->() const [with T = sensor_msgs::Image_<std::allocator<void> >; typename boost::detail::sp_member_access<T>::type = sensor_msgs::Image_<std::allocator<void> >*]: Assertion `px != 0' failed. Aborted (core dumped)
The camera works with the ueyedemo, so I think isn't a driver problem, but I'm not sure.
-
repo owner Fixed with e4e9003. Tested this time.
-
reporter With the
$ rosrun image_view image_view image:=/image_raw [ INFO] [1447243220.750161560]: Using transport "raw" Segmentation fault (core dumped)
I tried to do a rosbag but it didn't work and I get another error
rosbag record -a [ INFO] [1447243352.670019883]: Recording to 2015-11-11-12-02-32.bag. [ WARN] [1447243352.670345276]: Less than 5 x 1G of space free on disk with 2015-11-11-12-02-32.bag.active. [ INFO] [1447243352.670742535]: Subscribing to /image_raw/theora/parameter_descriptions [ INFO] [1447243352.677264908]: Subscribing to /image_raw [ INFO] [1447243352.683815916]: Subscribing to /image_raw/theora [ INFO] [1447243352.690610601]: Subscribing to /rosout [ INFO] [1447243352.699814125]: Subscribing to /image_raw/compressedDepth/parameter_updates [ INFO] [1447243352.706561598]: Subscribing to /rosout_agg [ INFO] [1447243352.713056313]: Subscribing to /image_raw/compressed [ INFO] [1447243352.719971126]: Subscribing to /image_raw/compressedDepth [ INFO] [1447243352.726756383]: Subscribing to /image_raw/compressedDepth/parameter_descriptions [ INFO] [1447243352.734937705]: Subscribing to /camera/parameter_descriptions [ INFO] [1447243352.742368997]: Subscribing to /image_raw/theora/parameter_updates [ INFO] [1447243352.748682124]: Subscribing to /camera_info [ INFO] [1447243352.755232503]: Subscribing to /image_raw/compressed/parameter_descriptions [ INFO] [1447243352.764437983]: Subscribing to /camera/parameter_updates [ INFO] [1447243352.771634258]: Subscribing to /image_raw/compressed/parameter_updates
[ INFO] [1447243353.012314130]: Started video stream. [ERROR] [1447243353.256397317]: Compressed Depth Image Transport - Compression requires single-channel 32bit-floating point or 16bit raw depth images (input format is: bgr8). Segmentation fault (core dumped)
Should I use remove OpenCV3 and install the OpenCV2?
-
repo owner ROS uses OpenCV2. I you have problems with OpenCV or Fedora and not the ueye package, ROS Answers is the place to go for help.
-
reporter Ok Thank you for your time
-
repo owner - changed status to resolved
- Log in to comment
What version of OpenCV are you using? It should be in opencv2/core/version.hpp