ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

cv_bridge install error on rpi rosindigo

asked 2016-01-23 07:37:44 -0500

g.sart gravatar image

hello!

sorry for my bad english.

im trying to get this tutorial: ANTDROID to work on my raspberry pi.

i followed the instructiones and it crashes istalling cv_bridge

also this tutorial: ROS on Raspberry Pi

and this tutorial: ROS on Debian

crashes everytime when i paste "vision_opencv" in "rosinstall_generator ros_comm --rosdistro indigo --deps --wet-only --exclude roslisp --tar > indigo-ros_comm-wet.rosinstall"

now im working on it about 3 weeks at any free minute i have. imgoing crazy.

i tied all commands and instructions abaud openCV, CV_Bridge and so on from the internet i found

it installs 73 packages from 101 packages and then crashes...

libconsole-bridge-dev and liblz4-dev are installed

i have tried a original rpi wheezy image and a image with preinstalled basic ros_comm

with the preinstalled ros image i can do: rosinstall_generator ros_comm --rosdistro indigo --deps --wet-only --exclude roslisp --tar > indigo-ros_comm-wet.rosinstall

and 48 from 48 operacion work perfectly

i tried tru ssh connection on windows / ubundtu and also with mouse and keyboard direct on the rpi

please, please give me a little step by step instruction to get this error with cv_bridge to work

here is the error text i get:

Processing catkin package: 'cv_bridge' ==> Building with env: '/opt/ros/indigo/env.sh' Makefile exists, skipping explicit cmake invocation... ==> make cmake_check_build_system in '/home/pi/ros_from_sources/build_isolated/cv_bridge' ==> make -j4 -l4 in '/home/pi/ros_from_sources/build_isolated/cv_bridge' [ 0%] [ 0%] Built target geometry_msgs_generate_messages_lisp Built target std_msgs_generate_messages_lisp [ 0%] [ 0%] Built target sensor_msgs_generate_messages_lisp Built target sensor_msgs_generate_messages_py [ 0%] [ 0%] Built target sensor_msgs_generate_messages_cpp Built target geometry_msgs_generate_messages_cpp [ 0%] [ 0%] Built target geometry_msgs_generate_messages_py Built target std_msgs_generate_messages_py [ 0%] Built target std_msgs_generate_messages_cpp [ 25%] Building CXX object src/CMakeFiles/cv_bridge.dir/cv_bridge.cpp.o In file included from /home/pi/ros_from_sources/src/vision_opencv/cv_bridge/src/cv_bridge.cpp:36:0: /home/pi/ros_from_sources/src/vision_opencv/cv_bridge/src/boost/endian/conversion.hpp:26:3: warning: scoped enums only available with -std=c++0x or -std=gnu++0x [enabled by default] /home/pi/ros_from_sources/src/vision_opencv/cv_bridge/src/boost/endian/conversion.hpp:329:72: error: wrong number of template arguments (1, should be 3) /home/pi/ros_from_sources/src/vision_opencv/cv_bridge/src/boost/endian/conversion.hpp:328:13: error: provided for 'template<boost::endian::order from,="" boost::endian::order="" to,="" class="" endianreversible=""> struct boost::endian::detail::value_converter' /home/pi/ros_from_sources/src/vision_opencv/cv_bridge/src/boost/endian/conversion.hpp:331:78: error: wrong number of template arguments (1, should be 3) /home/pi/ros_from_sources/src/vision_opencv/cv_bridge/src/boost/endian/conversion.hpp:328:13: error: provided for 'template<boost::endian::order from,="" boost::endian::order="" to,="" class="" endianreversible=""> struct boost::endian::detail::value_converter' /home/pi/ros_from_sources/src/vision_opencv/cv_bridge/src/boost/endian/conversion.hpp:333:75: error: wrong number of template arguments (1, should be 3) /home/pi/ros_from_sources/src/vision_opencv/cv_bridge/src/boost/endian/conversion.hpp:328:13: error: provided for 'template<boost::endian::order from,="" boost::endian::order="" to,="" class="" endianreversible=""> struct boost::endian::detail::value_converter' /home/pi/ros_from_sources/src/vision_opencv/cv_bridge/src/boost/endian/conversion.hpp:335:75: error: wrong number of template ... (more)

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-01-25 16:26:20 -0500

Mikisoft gravatar image

updated 2016-01-27 11:39:51 -0500

Wheezy has boost libraries 1.49, endian library is from version 1.58.

Working solution

use only if you are interfacing computers with little endian operating systems.

in file ~/ros_catkin_ws/src/vision_opencv/cv_bridge/src/cv_bridge.cpp make follow changes:

comment:

//#include "boost/endian/conversion.hpp"

comment:

//if ((boost::endian::order::native == boost::endian::order::big && source.is_bigendian) ||
//    (boost::endian::order::native == boost::endian::order::little && !source.is_bigendian) ||
//    byte_depth == 1)
    return mat;

change:

ros_image.is_bigendian = 0;//(boost::endian::order::native == boost::endian::order::big);

partially comment and change:

if ((!encoding.empty() && source.encoding != encoding))// || (source.is_bigendian &&
    //(boost::endian::order::native != boost::endian::order::big)))
return toCvCopy(source, encoding);
edit flag offensive delete link more
0

answered 2016-01-26 15:12:11 -0500

g.sart gravatar image

updated 2016-01-27 11:10:59 -0500

Thanks Mikisoft!

installation of cv_bridge was working for the first time! but now other packages like diagnostic_aggregates wont work and crashes with boost errors. now i try a clean wheezy installation and try to fist of all installing libboost 1.59

here is what i try to do:

my setup: raspberry pi 2 b v 1.1 32gb sdcard raspbian wheezy 2015-05-05-0

i followed these instructiones:

First boot on your raspberry

Once you are connecting to your raspberry you must prepare it.

$ sudo raspi-config You could:

Expand filesystem. Change your password. Set up language and regional settion

ROS indigo

Installing ROS in raspbian

Prerequisites

Setup ROS Repositories

$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu wheezy main" > /etc/apt/sources.list.d/ros-latest.list' $ wget https://raw.githubusercontent.com/ros... -O - | sudo apt-key add -

Now, make sure your Debian package index is up-to-date:

$ sudo apt-get update $ sudo apt-get upgrade

Install bootstrap dependencies

$ sudo apt-get install python-setuptools $ sudo easy_install pip $ sudo pip install -U rosdep rosinstall_generator wstool rosinstall

Initializing rosdep

$ sudo rosdep init $ rosdep update

Create a catkin Workspace

In order to build the core packages, you will need a catkin workspace. Create one now:

$ mkdir ~/ros_catkin_ws $ cd ~/ros_catkin_ws

$ rosinstall_generator ros_comm diagnostics joystick_drivers robot_upstart bond_core dynamic_reconfigure nodelet_core rosserial class_loader image_common vision_opencv image_transport_plugins --rosdistro indigo --deps --wet-only --exclude roslisp --tar > indigo-antdroid-wet.rosinstall $ wstool init -j8 src indigo-antdroid-wet.rosinstall

Dependencies not available in the Raspbian stable branch

We need install libconsole-bridge-dev and liblz4-dev for Ros_Comm: These packages can be built from source in a new directory (Also install checkinstall and cmake):

$ mkdir ~/ros_catkin_ws/external_src $ sudo apt-get install checkinstall cmake $ sudo sh -c 'echo "deb-src http://mirrordirector.raspbian.org/ra... testing main contrib non-free rpi" >> /etc/apt/sources.list' $ sudo apt-get update libconsole-bridge-dev:

$ cd ~/ros_catkin_ws/external_src $ sudo apt-get build-dep console-bridge $ apt-get source -b console-bridge $ sudo dpkg -i libconsole-bridge0.2.deb libconsole-bridge-dev_.deb

liblz4-dev: Install with the following: Install with the following:

$ cd ~/ros_catkin_ws/external_src $ wget http://archive.raspbian.org/raspbian/... $ wget http://archive.raspbian.org/raspbian/... $ sudo dpkg -i liblz4-1_0.0~r122-2_armhf.deb liblz4-dev_0.0~r122-2_armhf.deb

Resolving Dependencies with rosdep

The remaining dependencies should be resolved by running rosdep:

$ cd ~/ros_catkin_ws $ rosdep install --from-paths src --ignore-src --rosdistro indigo -y -r --os=debian:wheezy

Invoke catkin_make_isolated:

$ sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros

Now ROS should be installed! Remember to source the new installation:

$ echo 'source /opt/ros/indigo/setup.bash' >> ~/.bashrc Then you must reboot or execute:

$ source /opt/ros/indigo/setup.bash

edit flag offensive delete link more

Comments

thanks Mikisoft.

clean wheezy install and first install libboost 1.59 cant get it to work.

i try clean install, then follow this tutorial: AntDroid

and then try your "new"solution withoud your "first" solution, right?

g.sart gravatar image g.sart  ( 2016-01-27 10:36:13 -0500 )edit

yes, the first solution is dead-end. with second solution is everithing OK.

Mikisoft gravatar image Mikisoft  ( 2016-01-27 11:29:31 -0500 )edit

Question Tools

Stats

Asked: 2016-01-23 07:37:44 -0500

Seen: 1,311 times

Last updated: Jan 27 '16