0
$\begingroup$

Rosanswers logo

hello

I'm trying to install ROS on raspberry pi 4 with raspibian buster. I followed this tutorial:

Installing ROS Kinetic on the Raspberry Pi

I chose the option: "ROS-Comm: (recommended) ROS package, build, and communication libraries. No GUI tools."

No item 4.1 fui para o link:

http://wiki.ros.org/kinetic/Installation/Source

when I execute the command:

pi@raspberrypi:~/ros_catkin_ws $ sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release

i get the following error:

-- Could NOT find rosconsole (missing: rosconsole_DIR)
-- Could not find the required component 'rosconsole'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
CMake Error at /home/pi/ros_catkin_ws/install_isolated/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "rosconsole" with
  any of the following names:

    rosconsoleConfig.cmake
    rosconsole-config.cmake

  Add the installation prefix of "rosconsole" to CMAKE_PREFIX_PATH or set
  "rosconsole_DIR" to a directory containing one of the above files.  If
  "rosconsole" provides a separate development package or SDK, be sure it has
  been installed.
Call Stack (most recent call first):
  CMakeLists.txt:4 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/pi/ros_catkin_ws/build_isolated/pluginlib/CMakeFiles/CMakeOutput.log".
See also "/home/pi/ros_catkin_ws/build_isolated/pluginlib/CMakeFiles/CMakeError.log".
<== Failed to process package 'pluginlib':
  Command '['/home/pi/ros_catkin_ws/install_isolated/env.sh', 'cmake', '/home/pi/ros_catkin_ws/src/pluginlib', '-DCATKIN_DEVEL_PREFIX=/home/pi/ros_catkin_ws/devel_isolated/pluginlib', '-DCMAKE_INSTALL_PREFIX=/home/pi/ros_catkin_ws/install_isolated', '-DCMAKE_BUILD_TYPE=Release', '-G', 'Unix Makefiles']' returned non-zero exit status 1

Reproduce this error by running:
==> cd /home/pi/ros_catkin_ws/build_isolated/pluginlib && /home/pi/ros_catkin_ws/install_isolated/env.sh cmake /home/pi/ros_catkin_ws/src/pluginlib -DCATKIN_DEVEL_PREFIX=/home/pi/ros_catkin_ws/devel_isolated/pluginlib -DCMAKE_INSTALL_PREFIX=/home/pi/ros_catkin_ws/install_isolated -DCMAKE_BUILD_TYPE=Release -G 'Unix Makefiles'

Command failed, exiting.

any suggestion?


Originally posted by mateusguilherme on ROS Answers with karma: 125 on 2020-02-23

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Hello

I did a new installation of the raspbian buster and followed the manual again (ROSberryPiInstalling ROS Kinetic on the Raspberry Pi) . I installed the desktop version. This time I got the following error in this step:

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

error:

make[2]: *** [modules/python3/CMakeFiles/opencv_python3.dir/build.make:63: 
modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:8345: modules/python3/CMakeFiles/opencv_python3.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
<== Failed to process package 'opencv3':
Command '['/opt/ros/kinetic/env.sh', 'make', '-j4', '-l4']' returned non-zero exit status 2
Reproduce this error by running:
==> cd /home/pi/ros_catkin_ws/build_isolated/opencv3 && /opt/ros/kinetic/env.sh make -j4 -l4
Command failed, exiting.

Any suggestion?

solution:

Edit cv2.cpp:

change From :

char* str = PyString_AsString(obj);

to :

const char* str = PyString_AsString(obj);

according: https://github.com/opencv/opencv/issues/14856


Originally posted by mateusguilherme with karma: 125 on 2020-03-09

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by MichaelDUEE on 2020-03-10:
Please copy this answer to your question as an edit, because posting an updated error to answers is confusing. :)

Comment by Karax31 on 2020-03-10:
I ran into the same issue and seems to be an compatability issue with the arm architecture. In the official Github opencv Repo people suggested here to try cross-compilation. For me, it's only a last resort. Has anyone managed to compile opencv on an RPi 4 recently?

$\endgroup$

Your Answer

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