Hello,

I am having issues when I try to install DepthAi-Ros grom here : https://github.com/luxonis/depthai-ros.
I am working on a Ubuntu 20.04 and I am trying to install DepthAi-Ros for ROS1.

In the section "Install from source", during the "Setting up procedure", I am stuck at the 7th step "catkin_make_isolated".
During this intallation, it failed and kill the process with the following messages :
"make[2]: *** [CmakeFiles/Yolov4spatialnode.dir/build.make:63: CMakeFIles/yolov4spatialnode.dir/src/yolov4_spatialpublisher.cpp.o] Error 1
Make[1]: *** [CmakeFiles/MakeFiles2:253: CMakeFiles/yolov4_*spatial_node.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
<== Failed to process package 'depthai_examples':
Commande '[/home/<>/dai_ws/devel_isolated/depthai_bridge/env.sh', 'make', '-j4', '-l4']' returned non-zero exit status 2.

I am stuck here and can't launch any roslaunch dai_ws examples.
Thank in advance for any response.*

More precisely it failed at this step in the "catkin_make _isolated" :

Building CXX object CMakeFiles/yolov4spatial_node.dir/src/yolov_4spatialpublisher.cpp.o

Hi, could you post all build logs? Are you building on ARM64 or AMD64? Is this the latest Noetic commit?

    5 days later

    Luxonis-Adam

    I think it is the latest Noetic commit.

    I tried to save the build logs in a log file while retrying the installation with the command :
    $ catkin*_make*_isolated 2>&1|tee err.log (you can find the text at the end of my message as I can't attach txt or log files here).

    Am am building on a ARMv7 rev 10 (v7l) CPU i.e ARM32 bits.

    Logs during catkin*make*isolated :

    [ 16%] Built target depthai_filters_gencfg

    [ 16%] Built target rosgraph_msgs_generate_messages_cpp

    [ 16%] Built target sensor_msgs_generate_messages_cpp

    [ 16%] Built target vision_msgs_generate_messages_lisp

    [ 16%] Built target dynamic_reconfigure_gencfg

    [ 16%] Built target dynamic_reconfigure_generate_messages_nodejs

    [ 16%] Built target std_msgs_generate_messages_nodejs

    [ 16%] Built target sensor_msgs_generate_messages_eus

    [ 16%] Built target dynamic_reconfigure_generate_messages_lisp

    [ 16%] Built target rosgraph_msgs_generate_messages_eus

    [ 16%] Built target std_msgs_generate_messages_eus

    [ 16%] Built target dynamic_reconfigure_generate_messages_eus

    [ 16%] Built target std_msgs_generate_messages_lisp

    [ 16%] Built target geometry_msgs_generate_messages_cpp

    [ 16%] Built target roscpp_generate_messages_nodejs

    [ 16%] Built target dynamic_reconfigure_generate_messages_py

    [ 16%] Built target sensor_msgs_generate_messages_lisp

    [ 16%] Built target rosgraph_msgs_generate_messages_nodejs

    [ 16%] Built target roscpp_generate_messages_eus

    [ 16%] Built target std_msgs_generate_messages_cpp

    [ 16%] Built target rosgraph_msgs_generate_messages_py

    [ 16%] Built target geometry_msgs_generate_messages_py

    [ 16%] Built target rosgraph_msgs_generate_messages_lisp

    [ 16%] Built target sensor_msgs_generate_messages_py

    [ 16%] Built target roscpp_generate_messages_py

    [ 16%] Built target sensor_msgs_generate_messages_nodejs

    [ 16%] Built target geometry_msgs_generate_messages_eus

    [ 16%] Built target bond_generate_messages_cpp

    [ 16%] Built target geometry_msgs_generate_messages_nodejs

    [ 16%] Built target nodelet_generate_messages_nodejs

    [ 16%] Built target vision_msgs_generate_messages_py

    [ 16%] Built target vision_msgs_generate_messages_cpp

    [ 16%] Built target bond_generate_messages_py

    [ 16%] Built target roscpp_generate_messages_cpp

    [ 16%] Built target vision_msgs_generate_messages_eus

    [ 16%] Built target vision_msgs_generate_messages_nodejs

    [ 16%] Built target nodelet_generate_messages_cpp

    [ 16%] Built target nodelet_generate_messages_lisp

    [ 16%] Built target nodelet_generate_messages_eus

    [ 16%] Built target roscpp_generate_messages_lisp

    [ 16%] Built target nodelet_generate_messages_py

    [ 16%] Built target bond_generate_messages_lisp

    [ 16%] Built target dynamic_reconfigure_generate_messages_cpp

    [ 16%] Built target geometry_msgs_generate_messages_lisp

    [ 16%] Built target bond_generate_messages_nodejs

    [ 16%] Built target std_msgs_generate_messages_py

    [ 16%] Built target bond_generate_messages_eus

    [100%] Built target depthai_filters

    [ 0%] Built target _depthai_ros_msgs_generate_messages_check_deps_HandLandmarkArray

    [ 0%] Built target _depthai_ros_msgs_generate_messages_check_deps_SpatialDetectionArray

    [ 0%] Built target _depthai_ros_msgs_generate_messages_check_deps_SpatialDetection

    [ 0%] Built target geometry_msgs_generate_messages_eus

    [ 0%] Built target _depthai_ros_msgs_generate_messages_check_deps_HandLandmark

    [ 0%] Built target _depthai_ros_msgs_generate_messages_check_deps_TriggerNamed

    [ 0%] Built target vision_msgs_generate_messages_eus

    [ 0%] Built target std_msgs_generate_messages_eus

    [ 0%] Built target sensor_msgs_generate_messages_eus

    [ 0%] Built target _depthai_ros_msgs_generate_messages_check_deps_AutoFocusCtrl

    [ 0%] Built target geometry_msgs_generate_messages_py

    [ 0%] Built target std_msgs_generate_messages_py

    [ 0%] Built target sensor_msgs_generate_messages_py

    [ 0%] Built target vision_msgs_generate_messages_py

    [ 0%] Built target vision_msgs_generate_messages_nodejs

    [ 0%] Built target std_msgs_generate_messages_nodejs

    [ 0%] Built target sensor_msgs_generate_messages_nodejs

    [ 0%] Built target geometry_msgs_generate_messages_nodejs

    [ 0%] Built target geometry_msgs_generate_messages_lisp

    [ 0%] Built target std_msgs_generate_messages_lisp

    [ 0%] Built target vision_msgs_generate_messages_lisp

    [ 0%] Built target sensor_msgs_generate_messages_lisp

    [ 0%] Built target std_msgs_generate_messages_cpp

    [ 0%] Built target vision_msgs_generate_messages_cpp

    [ 0%] Built target geometry_msgs_generate_messages_cpp

    [ 0%] Built target sensor_msgs_generate_messages_cpp

    [ 0%] Built target _depthai_ros_msgs_generate_messages_check_deps_ImuWithMagneticField

    [ 0%] Built target _depthai_ros_msgs_generate_messages_check_deps_NormalizedImageCrop

    [ 20%] Built target depthai_ros_msgs_generate_messages_eus

    [ 39%] Built target depthai_ros_msgs_generate_messages_lisp

    [ 58%] Built target depthai_ros_msgs_generate_messages_cpp

    [ 76%] Built target depthai_ros_msgs_generate_messages_nodejs

    [100%] Built target depthai_ros_msgs_generate_messages_py

    [100%] Built target depthai_ros_msgs_generate_messages

    [ 0%] Built target roscpp_generate_messages_nodejs

    [ 0%] Built target stereo_msgs_generate_messages_lisp

    [ 0%] Built target stereo_msgs_generate_messages_eus

    [ 0%] Built target stereo_msgs_generate_messages_cpp

    [ 0%] Built target vision_msgs_generate_messages_nodejs

    [ 0%] Built target vision_msgs_generate_messages_eus

    [ 0%] Built target vision_msgs_generate_messages_cpp

    [ 0%] Built target depthai_ros_msgs_generate_messages_nodejs

    [ 0%] Built target depthai_ros_msgs_generate_messages_eus

    [ 0%] Built target depthai_ros_msgs_generate_messages_cpp

    [ 0%] Built target geometry_msgs_generate_messages_eus

    [ 0%] Built target sensor_msgs_generate_messages_lisp

    [ 0%] Built target vision_msgs_generate_messages_lisp

    [ 0%] Built target sensor_msgs_generate_messages_cpp

    [ 0%] Built target sensor_msgs_generate_messages_nodejs

    [ 0%] Built target roscpp_generate_messages_py

    [ 0%] Built target geometry_msgs_generate_messages_lisp

    [ 0%] Built target std_msgs_generate_messages_nodejs

    [ 0%] Built target sensor_msgs_generate_messages_eus

    [ 0%] Built target vision_msgs_generate_messages_py

    [ 0%] Built target geometry_msgs_generate_messages_nodejs

    [ 0%] Built target geometry_msgs_generate_messages_cpp

    [ 0%] Built target rosgraph_msgs_generate_messages_nodejs

    [ 0%] Built target roscpp_generate_messages_cpp

    [ 0%] Built target geometry_msgs_generate_messages_py

    [ 0%] Built target std_msgs_generate_messages_cpp

    [ 0%] Built target sensor_msgs_generate_messages_py

    [ 0%] Built target rosgraph_msgs_generate_messages_lisp

    [ 0%] Built target std_msgs_generate_messages_lisp

    [ 0%] Built target rosgraph_msgs_generate_messages_cpp

    [ 0%] Built target std_msgs_generate_messages_py

    [ 0%] Built target depthai_ros_msgs_generate_messages_py

    [ 0%] Built target roscpp_generate_messages_eus

    [ 0%] Built target roscpp_generate_messages_lisp

    [ 0%] Built target std_msgs_generate_messages_eus

    [ 0%] Built target rosgraph_msgs_generate_messages_eus

    [ 0%] Built target depthai_ros_msgs_generate_messages_lisp

    [ 0%] Built target rosgraph_msgs_generate_messages_py

    [ 0%] Built target stereo_msgs_generate_messages_nodejs

    [ 0%] Built target stereo_msgs_generate_messages_py

    [100%] Built target depthai_bridge

    [ 0%] Built target bond_generate_messages_nodejs

    [ 0%] Built target std_msgs_generate_messages_eus

    [ 0%] Built target roscpp_generate_messages_eus

    [ 0%] Built target depthai_ros_msgs_generate_messages_py

    [ 0%] Built target std_msgs_generate_messages_py

    [ 0%] Built target rosgraph_msgs_generate_messages_lisp

    [ 0%] Built target sensor_msgs_generate_messages_py

    [ 0%] Built target std_msgs_generate_messages_cpp

    [ 0%] Built target rosgraph_msgs_generate_messages_py

    [ 0%] Built target geometry_msgs_generate_messages_py

    [ 0%] Built target std_msgs_generate_messages_lisp

    [ 0%] Built target geometry_msgs_generate_messages_cpp

    [ 0%] Built target geometry_msgs_generate_messages_nodejs

    [ 0%] Built target nodelet_generate_messages_nodejs

    [ 0%] Built target vision_msgs_generate_messages_py

    [ 0%] Built target sensor_msgs_generate_messages_eus

    [ 0%] Built target std_msgs_generate_messages_nodejs

    [ 0%] Built target geometry_msgs_generate_messages_lisp

    [ 0%] Built target roscpp_generate_messages_py

    [ 0%] Built target sensor_msgs_generate_messages_nodejs

    [ 0%] Built target sensor_msgs_generate_messages_cpp

    [ 0%] Built target vision_msgs_generate_messages_lisp

    [ 0%] Built target rosgraph_msgs_generate_messages_nodejs

    [ 0%] Built target sensor_msgs_generate_messages_lisp

    [ 0%] Built target geometry_msgs_generate_messages_eus

    [ 0%] Built target bond_generate_messages_cpp

    [ 0%] Built target depthai_ros_msgs_generate_messages_cpp

    [ 0%] Built target depthai_ros_msgs_generate_messages_eus

    [ 0%] Built target rosgraph_msgs_generate_messages_cpp

    [ 0%] Built target depthai_ros_msgs_generate_messages_nodejs

    [ 0%] Built target vision_msgs_generate_messages_cpp

    [ 0%] Built target bond_generate_messages_py

    [ 0%] Built target roscpp_generate_messages_cpp

    [ 0%] Built target vision_msgs_generate_messages_eus

    [ 0%] Built target vision_msgs_generate_messages_nodejs

    [ 0%] Built target stereo_msgs_generate_messages_cpp

    [ 0%] Built target stereo_msgs_generate_messages_eus

    [ 0%] Built target stereo_msgs_generate_messages_lisp

    [ 0%] Built target stereo_msgs_generate_messages_nodejs

    [ 0%] Built target stereo_msgs_generate_messages_py

    [ 0%] Built target nodelet_generate_messages_lisp

    [ 0%] Built target nodelet_generate_messages_eus

    [ 0%] Built target roscpp_generate_messages_lisp

    [ 0%] Built target nodelet_generate_messages_py

    [ 0%] Built target depthai_ros_msgs_generate_messages_lisp

    [ 0%] Built target nodelet_generate_messages_cpp

    [ 0%] Built target bond_generate_messages_eus

    [ 0%] Built target bond_generate_messages_lisp

    [ 0%] Built target rosgraph_msgs_generate_messages_eus

    [ 0%] Built target roscpp_generate_messages_nodejs

    [ 6%] Building CXX object CMakeFiles/yolov4_spatial_node.dir/src/yolov4_spatial_publisher.cpp.o

    c++: fatal error: Killed signal terminated program cc1plus

    compilation terminated.

    make[2]: *** [CMakeFiles/yolov4_spatial_node.dir/build.make:63: CMakeFiles/yolov4_spatial_node.dir/src/yolov4_spatial_publisher.cpp.o] Error 1

    make[1]: *** [CMakeFiles/Makefile2:253: CMakeFiles/yolov4_spatial_node.dir/all] Error 2

    make: *** [Makefile:141: all] Error 2

    Base path: /home/swd_sk/dai_ws

    Source space: /home/swd_sk/dai_ws/src

    Build space: /home/swd_sk/dai_ws/build_isolated

    Devel space: /home/swd_sk/dai_ws/devel_isolated

    Install space: /home/swd_sk/dai_ws/install_isolated

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    ~~ traversing 7 packages in topological order:

    ~~ - depthai-ros

    ~~ - depthai_descriptions

    ~~ - depthai_filters

    ~~ - depthai_ros_msgs

    ~~ - depthai_bridge

    ~~ - depthai_examples

    ~~ - depthai_ros_driver

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    ==> Processing catkin package: 'depthai-ros'

    Makefile exists, skipping explicit cmake invocation...

    ==> make cmake_check_build_system in '/home/swd_sk/dai_ws/build_isolated/depthai-ros'

    ==> make -j4 -l4 in '/home/swd_sk/dai_ws/build_isolated/depthai-ros'

    <== Finished processing package [1 of 7]: 'depthai-ros'

    ==> Processing catkin package: 'depthai_descriptions'

    ==> Building with env: '/home/swd_sk/dai_ws/devel_isolated/depthai-ros/env.sh'

    Makefile exists, skipping explicit cmake invocation...

    ==> make cmake_check_build_system in '/home/swd_sk/dai_ws/build_isolated/depthai_descriptions'

    ==> make -j4 -l4 in '/home/swd_sk/dai_ws/build_isolated/depthai_descriptions'

    <== Finished processing package [2 of 7]: 'depthai_descriptions'

    ==> Processing catkin package: 'depthai_filters'

    ==> Building with env: '/home/swd_sk/dai_ws/devel_isolated/depthai_descriptions/env.sh'

    Makefile exists, skipping explicit cmake invocation...

    ==> make cmake_check_build_system in '/home/swd_sk/dai_ws/build_isolated/depthai_filters'

    ==> make -j4 -l4 in '/home/swd_sk/dai_ws/build_isolated/depthai_filters'

    <== Finished processing package [3 of 7]: 'depthai_filters'

    ==> Processing catkin package: 'depthai_ros_msgs'

    ==> Building with env: '/home/swd_sk/dai_ws/devel_isolated/depthai_filters/env.sh'

    Makefile exists, skipping explicit cmake invocation...

    ==> make cmake_check_build_system in '/home/swd_sk/dai_ws/build_isolated/depthai_ros_msgs'

    ==> make -j4 -l4 in '/home/swd_sk/dai_ws/build_isolated/depthai_ros_msgs'

    <== Finished processing package [4 of 7]: 'depthai_ros_msgs'

    ==> Processing catkin package: 'depthai_bridge'

    ==> Building with env: '/home/swd_sk/dai_ws/devel_isolated/depthai_ros_msgs/env.sh'

    Makefile exists, skipping explicit cmake invocation...

    ==> make cmake_check_build_system in '/home/swd_sk/dai_ws/build_isolated/depthai_bridge'

    ==> make -j4 -l4 in '/home/swd_sk/dai_ws/build_isolated/depthai_bridge'

    <== Finished processing package [5 of 7]: 'depthai_bridge'

    ==> Processing catkin package: 'depthai_examples'

    ==> Building with env: '/home/swd_sk/dai_ws/devel_isolated/depthai_bridge/env.sh'

    Makefile exists, skipping explicit cmake invocation...

    ==> make cmake_check_build_system in '/home/swd_sk/dai_ws/build_isolated/depthai_examples'

    ==> make -j4 -l4 in '/home/swd_sk/dai_ws/build_isolated/depthai_examples'

    <== Failed to process package 'depthai_examples':

    Command '['/home/swd_sk/dai_ws/devel_isolated/depthai_bridge/env.sh', 'make', '-j4', '-l4']' returned non-zero exit status 2.

    Reproduce this error by running:

    ==> cd /home/swd_sk/dai_ws/build_isolated/depthai_examples && /home/swd_sk/dai_ws/devel_isolated/depthai_bridge/env.sh make -j4 -l4

    Command failed, exiting.

    It seems your device runs of of resources during build process, could you try running catkin_make_isolated -l1 -j1 to limit load?

      Luxonis-Adam I tried to run catkin_make_isolated -l1 -j1 but if failed the same way as decribed before.

      How much RAM do you have? If the machine is too slow, I can recommend building a docker container on host targeted towards this architecture.

        Hi, thanks, it seems that it might be too little to build, are you able to increase your swap for building process? That might help here.

          Luxonis-Adam No I don't think we can increase the ram. is there any other way to proceed ? Can't I limit the ram usage for this operation ?

          Hi, in this case I recommend building docker image for desired architecture and deploying it on the device. We'll try to add armv7 docker image generation to the pipeline in next weeks.

            Luxonis-Adam Thank you for the advice.
            Do you think that if I can give more RAM to the device to complete this step it could work or it is not designed for the armv7 and will never complete the catkin_make_isolated ?

            [edit]: I tried it and it did not worked.

            I don't understand what the Docker will do in our case. Can I capture images with the camera and retrieve the video stream using a topic ros with the Docker?

            If the catkin_make_isolated can be installed with the armv7, what is the minimal hardware configuration to be able to complete the install ?
            As the other steps are already installed, is there a way to restart from 0 the "Setting up procedure" ?

            I am trying to search some new ideas to get the video stream from the camera without using depthai-ros is there any chances that the camera can be linked with the Ros package ipcamera_driver ? Can we setup an ip adress where we could get the stream on a website ?

            Hi @Antoine , sorry for the delay but I was away. When it comes to the docker setup - you can create a base image/container on host that you can deploy on your device, this mitigates build times/resource constraints, currently we support docker images for both AMD64 and ARM64 architectures.
            As for IP camera streams, you can check out MJPEG server demo

            5 days later

            Well thank you for all your reponds Adam,
            I appears that our hardware is not enought powerfull to handle the installation.
            Problem fixed, we will use a Virtual Machine.