0
$\begingroup$

Rosanswers logo

I am trying to build some libfreenect drivers (for the kinect) and I do a rosmake and it fails in cv_bridge complaining about some image formats (e.g., CV_YUV2RGB_UYVY, see below for more).

  • RaspberryPi (ARM)
  • Raspbian Linux - Debian for RaspberryPi
  • OpenCV 2.3 installed
  • ROS fuerte

What am I doing wrong??

[kevin@raspberrypi freenect_stack]$ CC="distcc arm-unknown-linux-gnueabi-gcc" CXX="distcc arm-unknown-linux-gnueabi-g++" rosmake freenect_stack [ rosmake ] rosmake starting...
[ rosmake ] Packages requested are: ['freenect_stack']
[ rosmake ] Logging to directory /home/kevin/.ros/rosmake/rosmake_output-20121103-133147
[ rosmake ] Expanded args ['freenect_stack'] to: ['freenect_camera', 'freenect_launch', 'libfreenect']
[rosmake-0] Starting >>> roslang [ make ]
[rosmake-0] Finished <<< roslang No Makefile in package roslang
[rosmake-0] Starting >>> rospy [ make ]
[rosmake-0] Finished <<< rospy No Makefile in package rospy
[rosmake-0] Starting >>> roscpp [ make ]
[rosmake-0] Finished <<< roscpp No Makefile in package roscpp
[rosmake-0] Starting >>> rosservice [ make ]
[rosmake-0] Finished <<< rosservice No Makefile in package rosservice
[rosmake-0] Starting >>> dynamic_reconfigure [ make ]
[rosmake-0] Finished <<< dynamic_reconfigure [PASS] [ 45.26 seconds ]
[rosmake-0] Starting >>> geometry_msgs [ make ]
[rosmake-0] Finished <<< geometry_msgs No Makefile in package geometry_msgs
[rosmake-0] Starting >>> sensor_msgs [ make ]
[rosmake-0] Finished <<< sensor_msgs No Makefile in package sensor_msgs
[rosmake-0] Starting >>> rosbuild [ make ]
[rosmake-0] Finished <<< rosbuild No Makefile in package rosbuild
[rosmake-0] Starting >>> roslib [ make ]
[rosmake-0] Finished <<< roslib No Makefile in package roslib
[rosmake-0] Starting >>> rosconsole [ make ]
[rosmake-0] Finished <<< rosconsole No Makefile in package rosconsole
[rosmake-0] Starting >>> pluginlib [ make ]
[rosmake-0] Finished <<< pluginlib [PASS] [ 17.47 seconds ]
[rosmake-0] Starting >>> message_filters [ make ]
[rosmake-0] Finished <<< message_filters No Makefile in package message_filters
[rosmake-0] Starting >>> image_transport [ make ]
[rosmake-0] Finished <<< image_transport [PASS] [ 17.48 seconds ]
[rosmake-0] Starting >>> polled_camera [ make ]
[rosmake-0] Finished <<< polled_camera [PASS] [ 15.69 seconds ]
[rosmake-0] Starting >>> common_rosdeps [ make ]
[rosmake-0] Finished <<< common_rosdeps [PASS] [ 2.14 seconds ]
[rosmake-0] Starting >>> camera_calibration_parsers [ make ]
[rosmake-0] Finished <<< camera_calibration_parsers [PASS] [ 14.33 seconds ]
[rosmake-0] Starting >>> opencv2 [ make ]
[rosmake-0] Finished <<< opencv2 [PASS] [ 0.09 seconds ]
[rosmake-0] Starting >>> cv_bridge [ make ]
[ rosmake ] Last 40 lines_bridge: 49.9 sec ] [ 1 Active 17/50 Complete ] {------------------------------------------------------------------------------- [rosbuild] Including /opt/ros/fuerte/share/roscpp/rosbuild/roscpp.cmake -- Configuring done -- Generating done CMake Warning: Manually-specified variables were not used by the project:

  CMAKE_TOOLCHAIN_FILE

-- Build files have been written to: /home/kevin/ros/vision_opencv/cv_bridge/build cd build && make -l1 make[1]: Entering directory /home/kevin/ros/vision_opencv/cv_bridge/build' make[2]: Entering directory /home/kevin/ros/vision_opencv/cv_bridge/build' make[3]: Entering directory /home/kevin/ros/vision_opencv/cv_bridge/build' make[3]: Leaving directory /home/kevin/ros/vision_opencv/cv_bridge/build' [ 0%] Built target rospack_genmsg_libexe make[3]: Entering directory /home/kevin/ros/vision_opencv/cv_bridge/build' make[3]: Leaving directory /home/kevin/ros/vision_opencv/cv_bridge/build' [ 0%] Built target rosbuild_precompile make[3]: Entering directory /home/kevin/ros/vision_opencv/cv_bridge/build' make[3]: Leaving directory /home/kevin/ros/vision_opencv/cv_bridge/build' make[3]: Entering directory /home/kevin/ros/vision_opencv/cv_bridge/build' [100%] Building CXX object CMakeFiles/cv_bridge.dir/src/cv_bridge.o distcc[7294] ERROR: compile /home/kevin/ros/vision_opencv/cv_bridge/src/cv_bridge.cpp on arch failed distcc[7294] (dcc_build_somewhere) Warning: remote compilation of '/home/kevin/ros/vision_opencv/cv_bridge/src/cv_bridge.cpp' failed, retrying locally distcc[7294] Warning: failed to distribute /home/kevin/ros/vision_opencv/cv_bridge/src/cv_bridge.cpp to arch, running locally instead /home/kevin/ros/vision_opencv/cv_bridge/src/cv_bridge.cpp: In function ‘std::map<std::pair<cv_bridge::Format, cv_bridge::Format>, std::vector<int> > cv_bridge::getConversionCodes()’: /home/kevin/ros/vision_opencv/cv_bridge/src/cv_bridge.cpp:179:47: error: ‘CV_YUV2GRAY_UYVY’ was not declared in this scope /home/kevin/ros/vision_opencv/cv_bridge/src/cv_bridge.cpp:180:46: error: ‘CV_YUV2RGB_UYVY’ was not declared in this scope /home/kevin/ros/vision_opencv/cv_bridge/src/cv_bridge.cpp:181:46: error: ‘CV_YUV2BGR_UYVY’ was not declared in this scope /home/kevin/ros/vision_opencv/cv_bridge/src/cv_bridge.cpp:182:47: error: ‘CV_YUV2RGBA_UYVY’ was not declared in this scope /home/kevin/ros/vision_opencv/cv_bridge/src/cv_bridge.cpp:183:47: error: ‘CV_YUV2BGRA_UYVY’ was not declared in this scope distcc[7294] ERROR: compile /home/kevin/ros/vision_opencv/cv_bridge/src/cv_bridge.cpp on localhost failed make[3]: *** [CMakeFiles/cv_bridge.dir/src/cv_bridge.o] Error 1 make[3]: Leaving directory /home/kevin/ros/vision_opencv/cv_bridge/build' make[2]: *** [CMakeFiles/cv_bridge.dir/all] Error 2 make[2]: Leaving directory /home/kevin/ros/vision_opencv/cv_bridge/build' make[1]: *** [all] Error 2 make[1]: Leaving directory /home/kevin/ros/vision_opencv/cv_bridge/build'

[ rosmake ] Output from build of package cv_bridge written to: [ rosmake ] /home/kevin/.ros/rosmake/rosmake_output-20121103-133147/cv_bridge/build_output.log [rosmake-0] Finished <<< cv_bridge [FAIL] [ 49.97 seconds ]
[ rosmake ] Halting due to failure in package cv_bridge. [ rosmake ] Waiting for other threads to complete.
[ rosmake ] Results:
[ rosmake ] Built 18 packages with 1 failures.
[ rosmake ] Summary output to directory
[ rosmake ] /home/kevin/.ros/rosmake/rosmake_output-20121103-133147


Originally posted by Kevin on ROS Answers with karma: 2962 on 2012-11-03

Post score: 3

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

It just happened to me as well and I thought I would share the solution.

Your OpenCV version is too old. You probably downloaded opencv using the prebuilt binaries which will not work. You will need to compile from source.


Originally posted by kalectro with karma: 1554 on 2013-02-04

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by prarobo on 2013-05-28:
I am also having error with installing cv_bridge on raspbian. About installing opencv from source, are you referring to vision_opencv that comes with ros or the opencv from debian repositories?

Comment by kalectro on 2013-05-29:
back then there was no openCV debian ;) You should use the debian package now and everything should work without problems

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.