Ask Your Question
0

Something is wrong with "cv_bridge" when I rosmake "gencam_cu" package.

asked 2011-02-28 12:58:26 -0500

Yongqiang Gao gravatar image

updated 2011-03-02 17:18:04 -0500

There are 2 cameras in our project: bumblebee2 and Logitech quickcam C160. And then I want do my research use Logitech quickcam C160, while I can't install the device very well. And I reference to "http://www.ros.org/wiki/gencam_cu", which is said to combine the Logitech Quickcam using OpenCV and publishes image data.

And I command it with $ rosmake theora_image_transport, and it report a bug:

   /home/jason/stacks/vision_opencv/cv_bridge/src/cv_bridge.cpp: 
   At global scope:  /home/jason/stacks/vision_opencv/cv_bridge/src/cv_bridge.cpp:136: error: ISO C++ forbids declaration of ‘std_msgs’ with no type
  /home/jason/stacks/vision_opencv/cv_bridge/src/cv_bridge.cpp:136: error: expected ‘,’ or ‘...’ before ‘::’ token
  /home/jason/stacks/vision_opencv/cv_bridge/src/cv_bridge.cpp: In function ‘cv_bridge::CvImagePtr cv_bridge::toCvCopyImpl(const cv::Mat&, int)’:
  /home/jason/stacks/vision_opencv/cv_bridge/src/cv_bridge.cpp:144: error: ‘class cv_bridge::CvImage’ has no member named ‘header’
  /home/jason/stacks/vision_opencv/cv_bridge/src/cv_bridge.cpp:144: error: ‘src_header’ was not declared in this scope
  /home/jason/stacks/vision_opencv/cv_bridge/src/cv_bridge.cpp:147: error: ‘dst_encoding’ was not declared in this scope
  /home/jason/stacks/vision_opencv/cv_bridge/src/cv_bridge.cpp:147: error: ‘src_encoding’ was not declared in this scope
  /home/jason/stacks/vision_opencv/cv_bridge/src/cv_bridge.cpp: In member function ‘void cv_bridge::CvImage::toImageMsg(sensor_msgs::Image&) const’:
  /home/jason/stacks/vision_opencv/cv_bridge/src/cv_bridge.cpp:190: error: ‘header’ was not declared in this scope
  /home/jason/stacks/vision_opencv/cv_bridge/src/cv_bridge.cpp: In function ‘cv_bridge::CvImagePtr cv_bridge::toCvCopy(const sensor_msgs::Image&, const std::string&)’:
  /home/jason/stacks/vision_opencv/cv_bridge/src/cv_bridge.cpp:216: error: cannot convert ‘const roslib::Header_<std::allocator<void> >’ to ‘int’ for argument ‘2’ to ‘cv_bridge::CvImagePtr cv_bridge::toCvCopyImpl(const cv::Mat&, int)’
  /home/jason/stacks/vision_opencv/cv_bridge/src/cv_bridge.cpp: In function ‘cv_bridge::CvImageConstPtr cv_bridge::toCvShare(const sensor_msgs::Image&, const boost::shared_ptr<const void>&, const std::string&)’:
  /home/jason/stacks/vision_opencv/cv_bridge/src/cv_bridge.cpp:234: error: ‘class cv_bridge::CvImage’ has no member named ‘header’
  /home/jason/stacks/vision_opencv/cv_bridge/src/cv_bridge.cpp: In function ‘cv_bridge::CvImagePtr cv_bridge::cvtColor(const cv_bridge::CvImageConstPtr&, const std::string&)’:
  /home/jason/stacks/vision_opencv/cv_bridge/src/cv_bridge.cpp:246: error: ‘const class cv_bridge::CvImage’ has no member named ‘header’
  make[3]: *** [CMakeFiles/cv_bridge.dir/src/cv_bridge.o] Error 1
  make[3]: Leaving directory `/home/jason/stacks/vision_opencv/cv_bridge/build'
  make[2]: *** [CMakeFiles/cv_bridge.dir/all] Error 2
  make[2]: Leaving directory `/home/jason/stacks/vision_opencv/cv_bridge/build'
  make[1]: *** [all] Error 2
  make[1]: Leaving directory `/home/jason/stacks/vision_opencv/cv_bridge/build'
-------------------------------------------------------------------------------}
[ rosmake ] Output from build of package cv_bridge written to:
[ rosmake ]    /home/jason/.ros/rosmake/rosmake_output-20110301-105339/cv_bridge/build_output.log
[rosmake-1] Finished <<< cv_bridge [FAIL] [ 1.32 seconds ]                      
[ rosmake ] Halting due to failure in package cv_bridge. 

[ rosmake ] /home/jason/.ros/rosmake/rosmake_output-20110301-105339

Any one can help me?

PS: and i try anther package which include cv_bridge, but i find the same problems. They all report that :/home/jason/stacks/find_object/cv_bridge/include/cv_bridge/cv_bridge.h:62: error: ‘std_msgs’ has not been declared ... (more)

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted
0

answered 2011-02-28 22:27:38 -0500

sam gravatar image

Hi, Could you share experience with us how you solve this problem? If anyone who encounter this problem he will glade to see how you solve it,thanks~

edit flag offensive delete link more
1

answered 2011-03-01 19:00:43 -0500

Yongqiang Gao gravatar image

For my silly,. To connect Logitech Quickcam , can also use usb_cam package.

And for my question above, I did not solve it.and I have no idea about it.

edit flag offensive delete link more

Comments

please post how you solved the problem so that other users can gain from your experience.
mmwise gravatar image mmwise  ( 2011-03-02 10:28:53 -0500 )edit
So sorry, my point is to connect Logitech Quickam, and it will be sovled by using the "usb_cam" package. While for my question above, I didn't have no idea about it. So, I put this quetion aside.
Yongqiang Gao gravatar image Yongqiang Gao  ( 2011-03-02 11:17:43 -0500 )edit
0

answered 2011-03-05 23:54:23 -0500

Yongqiang Gao gravatar image

Hi, for this problem. it obviously is the versions problem of "cv_bridge". So I uninstall "Cturtle" and install "diamondback" as steps follow:

$ sudo apt-get remove ros-cturtle-ros

Then I follow the diamondback installation, while there also some steps after installing diamondback, like modify the ~/.bashrc

OK, best wishes

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-02-28 12:58:26 -0500

Seen: 705 times

Last updated: Mar 05 '11