luxonis / depthai-ros

Official ROS Driver for DepthAI Sensors.
MIT License
239 stars 173 forks source link

[BUG] {DepthAi Bridge CMakeFile cannot find tf2_geometry_msgs} #445

Closed Scoeerg closed 8 months ago

Scoeerg commented 8 months ago

DepthAi Bridge CMakeFile cannot find tf2_geometry_msgs

colcon build
Starting >>> depthai_ros_msgs
Starting >>> depthai_descriptions
Finished <<< depthai_descriptions [0.25s]                                                                  
Finished <<< depthai_ros_msgs [1.01s]                     
Starting >>> depthai_bridge
Starting >>> depthai_filters
Finished <<< depthai_filters [0.38s]                                                                   
--- stderr: depthai_bridge                             
~/ros_ws/src/depthai-ros/depthai_bridge/src/TFPublisher.cpp:19:10: fatal error: 
tf2_geometry_msgs/tf2_geometry_msgs/tf2_geometry_msgs.hpp: No such file or directory
19 | #include "tf2_geometry_msgs/tf2_geometry_msgs/tf2_geometry_msgs.hpp"

compilation terminated.
gmake[2]: *** [CMakeFiles/depthai_bridge.dir/build.make:146: CMakeFiles/depthai_bridge.dir/src/TFPublisher.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:137: CMakeFiles/depthai_bridge.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
---
Failed   <<< depthai_bridge [0.77s, exited with code 2]

Summary: 3 packages finished [2.53s]
  1 package failed: depthai_bridge
  1 package had stderr output: depthai_bridge
  3 packages not processed

Minimal Reproducible Example

Assume there is a Humble workspace (e.g. ~/ros_ws/ where ~/ros_ws/src exists), then

cd  ~/ros_ws/src
sudo sh ./installscript.sh

where installscript.sh is just a compact script to follow the github.com/luxonis/depthai-ros#install-from-source instructions

#!/bin/bash

## PREPARING
    #Setup Directory
    SourceDirectory="$(dirname "$0")"
    SourceDirectory_FullPath=$(cd "$(dirname ${SourceDirectory})" && pwd)/$(basename ${SourceDirectory})
    echo "Installing DepthAI ROS code into ${SourceDirectory_FullPath}"
    sudo git config --global --add safe.directory ${SourceDirectory}

## ROS2 Depth AI 
    # Pull Git Repository for the Depth AI 
            echo "Pulling and installing Depth AI ROS2 from https://github.com/luxonis/depthai-ros.git"
            sudo rm -r depthai-ros
            git clone humble https://github.com/luxonis/depthai-ros.git
            depthai_directory="$(readlink -f ${SourceDirectory_FullPath})/depthai-ros/"
            echo "depthai_Directory is $(readlink -f ${depthai_directory})"
            sudo chown -R ${SUDO_USER} ${depthai_directory}
    # Install Dependencies
            workspace_directory="$(readlink -f ${SourceDirectory_FullPath})/.."
            cd ${workspace_directory}
            rosdep install --from-paths src --ignore-src -r -y
            sudo apt install ros-humble-rtabmap-ros
            sudo apt install ros-humble-camera-info-manager
            sudo apt install ros-humble-vision-msgs
    # Prepare System UDEV Rules & install depth-Ai-Core
            echo "Installing Depth AI core library"
            echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="03e7", MODE="0666"' | sudo tee /etc/udev/rules.d/80-movidius.rules
            sudo udevadm control --reload-rules && sudo udevadm trigger
            mkdir tmp
            temp_directory="$(readlink -f ${SourceDirectory_FullPath})/tmp/"
            cd ${temp_directory}
            git clone --recursive https://github.com/luxonis/depthai-core.git --branch main
            cmake -Hdepthai-core -Bdepthai-core/build -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/usr/local
            cmake --build depthai-core/build --target install
            cd ..
            sudo rm -r ${temp_directory}

then

cd ~/ros_ws
colcon build

which results ins:

Starting >>> depthai_ros_msgs
Starting >>> depthai_descriptions
Finished <<< depthai_descriptions [0.25s]                                                                  
Finished <<< depthai_ros_msgs [0.99s]                     
Starting >>> depthai_bridge
Starting >>> depthai_filters                 
Finished <<< depthai_filters [0.32s]                                                                
--- stderr: depthai_bridge                             
~/ros_ws/src/depthai-ros/depthai_bridge/src/TFPublisher.cpp:19:10: fatal error: tf2_geometry_msgs/tf2_geometry_msgs/tf2_geometry_msgs.hpp: No such file or directory
   19 | #include "tf2_geometry_msgs/tf2_geometry_msgs/tf2_geometry_msgs.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [CMakeFiles/depthai_bridge.dir/build.make:146: CMakeFiles/depthai_bridge.dir/src/TFPublisher.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:137: CMakeFiles/depthai_bridge.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
---
Failed   <<< depthai_bridge [0.75s, exited with code 2]

Summary: 3 packages finished [2.48s]
  1 package failed: depthai_bridge
  1 package had stderr output: depthai_bridge
  3 packages not processed

Of course I made sure the tf2_geometry_msgs was installed, by

sudo apt install ros-humble-tf2-geometry-msgs

might as well add it to the install script. Already did the same with ros-humble-rtabmap-ros, ros-humble-camera-info-manager and ros-humble-vision-msgs which were not installed with rosdep for whatever reason.

Expected behavior Builds without Error.

Serafadam commented 8 months ago

Hi, I would guess that rosdep part is not working properly for some unknown reason, could you share the logs from that step? For source installation steps you can also refer to the Dockerfile

Scoeerg commented 8 months ago

Hi. By hand in ~/ros_ws/ rosdep install --from-paths src --ignore-src -r -y results in:

ERROR: your rosdep installation has not been initialized yet.  Please run:
    rosdep update

so I did rosdep update and repeated rosdep install --from-paths src --ignore-src -r -y which then:

executing command [sudo -H apt-get install -y ros-humble-xacro]
[sudo] password for user: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  dctrl-tools dkms gconf-service gconf-service-backend gconf2 gconf2-common libflashrom1 libftdi1-2 libgconf-2-4 libllvm13 libllvm13:i386 libnvidia-cfg1-515 libnvidia-common-515 libnvidia-compute-515 libnvidia-compute-515:i386 libnvidia-decode-515
  libnvidia-decode-515:i386 libnvidia-encode-515 libnvidia-encode-515:i386 libnvidia-extra-515 libnvidia-fbc1-515 libnvidia-fbc1-515:i386 libnvidia-gl-515 libnvidia-gl-515:i386 libvulkan1:i386 libwayland-client0:i386 mercurial mercurial-common
  mesa-vulkan-drivers:i386 nvidia-compute-utils-515 nvidia-kernel-common-515 nvidia-utils-515 python3-vcstool python3-vcstools ros-build-essential xserver-xorg-video-nvidia-515
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  ros-humble-xacro
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 36.8 kB of archives.
After this operation, 154 kB of additional disk space will be used.
Get:1 http://packages.ros.org/ros2/ubuntu jammy/main amd64 ros-humble-xacro amd64 2.0.8-1jammy.20230919.194745 [36.8 kB]
Fetched 36.8 kB in 0s (103 kB/s)            
Selecting previously unselected package ros-humble-xacro.
(Reading database ... 284119 files and directories currently installed.)
Preparing to unpack .../ros-humble-xacro_2.0.8-1jammy.20230919.194745_amd64.deb ...
Unpacking ros-humble-xacro (2.0.8-1jammy.20230919.194745) ...
Setting up ros-humble-xacro (2.0.8-1jammy.20230919.194745) ...
executing command [sudo -H apt-get install -y ros-humble-depthai]
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  dctrl-tools dkms gconf-service gconf-service-backend gconf2 gconf2-common libflashrom1 libftdi1-2 libgconf-2-4 libllvm13 libllvm13:i386 libnvidia-cfg1-515 libnvidia-common-515 libnvidia-compute-515 libnvidia-compute-515:i386 libnvidia-decode-515
  libnvidia-decode-515:i386 libnvidia-encode-515 libnvidia-encode-515:i386 libnvidia-extra-515 libnvidia-fbc1-515 libnvidia-fbc1-515:i386 libnvidia-gl-515 libnvidia-gl-515:i386 libvulkan1:i386 libwayland-client0:i386 mercurial mercurial-common
  mesa-vulkan-drivers:i386 nvidia-compute-utils-515 nvidia-kernel-common-515 nvidia-utils-515 python3-vcstool python3-vcstools ros-build-essential xserver-xorg-video-nvidia-515
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  ros-humble-depthai
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 10.5 MB of archives.
After this operation, 20.7 MB of additional disk space will be used.
Get:1 http://packages.ros.org/ros2/ubuntu jammy/main amd64 ros-humble-depthai amd64 2.22.0-1jammy.20230623.022440 [10.5 MB]
Fetched 10.5 MB in 9s (1,208 kB/s)                                                                                                                                                                                                                                         
Selecting previously unselected package ros-humble-depthai.
(Reading database ... 284159 files and directories currently installed.)
Preparing to unpack .../ros-humble-depthai_2.22.0-1jammy.20230623.022440_amd64.deb ...
Unpacking ros-humble-depthai (2.22.0-1jammy.20230623.022440) ...
Setting up ros-humble-depthai (2.22.0-1jammy.20230623.022440) ...
Processing triggers for libc-bin (2.35-0ubuntu3.4) ...
executing command [sudo -H apt-get install -y ros-humble-camera-calibration]
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  dctrl-tools dkms gconf-service gconf-service-backend gconf2 gconf2-common libflashrom1 libftdi1-2 libgconf-2-4 libllvm13 libllvm13:i386 libnvidia-cfg1-515 libnvidia-common-515 libnvidia-compute-515 libnvidia-compute-515:i386 libnvidia-decode-515
  libnvidia-decode-515:i386 libnvidia-encode-515 libnvidia-encode-515:i386 libnvidia-extra-515 libnvidia-fbc1-515 libnvidia-fbc1-515:i386 libnvidia-gl-515 libnvidia-gl-515:i386 libvulkan1:i386 libwayland-client0:i386 mercurial mercurial-common
  mesa-vulkan-drivers:i386 nvidia-compute-utils-515 nvidia-kernel-common-515 nvidia-utils-515 python3-vcstool python3-vcstools ros-build-essential xserver-xorg-video-nvidia-515
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  ros-humble-camera-calibration
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 53.9 kB of archives.
After this operation, 217 kB of additional disk space will be used.
Get:1 http://packages.ros.org/ros2/ubuntu jammy/main amd64 ros-humble-camera-calibration amd64 3.0.0-1jammy.20230919.224259 [53.9 kB]
Fetched 53.9 kB in 0s (127 kB/s)                         
Selecting previously unselected package ros-humble-camera-calibration.
(Reading database ... 284778 files and directories currently installed.)
Preparing to unpack .../ros-humble-camera-calibration_3.0.0-1jammy.20230919.224259_amd64.deb ...
Unpacking ros-humble-camera-calibration (3.0.0-1jammy.20230919.224259) ...
Setting up ros-humble-camera-calibration (3.0.0-1jammy.20230919.224259) ...
executing command [sudo -H apt-get install -y ros-humble-image-transport-plugins]
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  dctrl-tools dkms gconf-service gconf-service-backend gconf2 gconf2-common libflashrom1 libftdi1-2 libgconf-2-4 libllvm13 libllvm13:i386 libnvidia-cfg1-515 libnvidia-common-515 libnvidia-compute-515 libnvidia-compute-515:i386 libnvidia-decode-515
  libnvidia-decode-515:i386 libnvidia-encode-515 libnvidia-encode-515:i386 libnvidia-extra-515 libnvidia-fbc1-515 libnvidia-fbc1-515:i386 libnvidia-gl-515 libnvidia-gl-515:i386 libvulkan1:i386 libwayland-client0:i386 mercurial mercurial-common
  mesa-vulkan-drivers:i386 nvidia-compute-utils-515 nvidia-kernel-common-515 nvidia-utils-515 python3-vcstool python3-vcstools ros-build-essential xserver-xorg-video-nvidia-515
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  ros-humble-compressed-depth-image-transport ros-humble-compressed-image-transport ros-humble-theora-image-transport
The following NEW packages will be installed:
  ros-humble-compressed-depth-image-transport ros-humble-compressed-image-transport ros-humble-image-transport-plugins ros-humble-theora-image-transport
0 upgraded, 4 newly installed, 0 to remove and 2 not upgraded.
Need to get 470 kB of archives.
After this operation, 2,529 kB of additional disk space will be used.
Get:1 http://packages.ros.org/ros2/ubuntu jammy/main amd64 ros-humble-compressed-depth-image-transport amd64 2.5.0-2jammy.20230919.235032 [121 kB]
Get:2 http://packages.ros.org/ros2/ubuntu jammy/main amd64 ros-humble-compressed-image-transport amd64 2.5.0-2jammy.20230919.234425 [130 kB]
Get:3 http://packages.ros.org/ros2/ubuntu jammy/main amd64 ros-humble-theora-image-transport amd64 2.5.0-2jammy.20230919.230637 [212 kB]
Get:4 http://packages.ros.org/ros2/ubuntu jammy/main amd64 ros-humble-image-transport-plugins amd64 2.5.0-2jammy.20230919.235425 [6,508 B]
Fetched 470 kB in 2s (290 kB/s)                                
Selecting previously unselected package ros-humble-compressed-depth-image-transport.
(Reading database ... 284812 files and directories currently installed.)
Preparing to unpack .../ros-humble-compressed-depth-image-transport_2.5.0-2jammy.20230919.235032_amd64.deb ...
Unpacking ros-humble-compressed-depth-image-transport (2.5.0-2jammy.20230919.235032) ...
Selecting previously unselected package ros-humble-compressed-image-transport.
Preparing to unpack .../ros-humble-compressed-image-transport_2.5.0-2jammy.20230919.234425_amd64.deb ...
Unpacking ros-humble-compressed-image-transport (2.5.0-2jammy.20230919.234425) ...
Selecting previously unselected package ros-humble-theora-image-transport.
Preparing to unpack .../ros-humble-theora-image-transport_2.5.0-2jammy.20230919.230637_amd64.deb ...
Unpacking ros-humble-theora-image-transport (2.5.0-2jammy.20230919.230637) ...
Selecting previously unselected package ros-humble-image-transport-plugins.
Preparing to unpack .../ros-humble-image-transport-plugins_2.5.0-2jammy.20230919.235425_amd64.deb ...
Unpacking ros-humble-image-transport-plugins (2.5.0-2jammy.20230919.235425) ...
Setting up ros-humble-compressed-depth-image-transport (2.5.0-2jammy.20230919.235032) ...
Setting up ros-humble-compressed-image-transport (2.5.0-2jammy.20230919.234425) ...
Setting up ros-humble-theora-image-transport (2.5.0-2jammy.20230919.230637) ...
Setting up ros-humble-image-transport-plugins (2.5.0-2jammy.20230919.235425) ...
Processing triggers for libc-bin (2.35-0ubuntu3.4) ...
executing command [sudo -H apt-get install -y ros-humble-image-pipeline]
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  dctrl-tools dkms gconf-service gconf-service-backend gconf2 gconf2-common libflashrom1 libftdi1-2 libgconf-2-4 libllvm13 libllvm13:i386 libnvidia-cfg1-515 libnvidia-common-515 libnvidia-compute-515 libnvidia-compute-515:i386 libnvidia-decode-515
  libnvidia-decode-515:i386 libnvidia-encode-515 libnvidia-encode-515:i386 libnvidia-extra-515 libnvidia-fbc1-515 libnvidia-fbc1-515:i386 libnvidia-gl-515 libnvidia-gl-515:i386 libvulkan1:i386 libwayland-client0:i386 mercurial mercurial-common
  mesa-vulkan-drivers:i386 nvidia-compute-utils-515 nvidia-kernel-common-515 nvidia-utils-515 python3-vcstool python3-vcstools ros-build-essential xserver-xorg-video-nvidia-515
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  ros-humble-depth-image-proc ros-humble-image-proc ros-humble-image-publisher ros-humble-image-rotate ros-humble-image-view ros-humble-stereo-image-proc ros-humble-tracetools-image-pipeline
The following NEW packages will be installed:
  ros-humble-depth-image-proc ros-humble-image-pipeline ros-humble-image-proc ros-humble-image-publisher ros-humble-image-rotate ros-humble-image-view ros-humble-stereo-image-proc ros-humble-tracetools-image-pipeline
0 upgraded, 8 newly installed, 0 to remove and 2 not upgraded.
Need to get 1,013 kB of archives.
After this operation, 4,952 kB of additional disk space will be used.
Get:1 http://packages.ros.org/ros2/ubuntu jammy/main amd64 ros-humble-depth-image-proc amd64 3.0.0-1jammy.20230919.225606 [250 kB]
Get:2 http://packages.ros.org/ros2/ubuntu jammy/main amd64 ros-humble-tracetools-image-pipeline amd64 3.0.0-1jammy.20230919.200020 [14.0 kB]
Get:3 http://packages.ros.org/ros2/ubuntu jammy/main amd64 ros-humble-image-proc amd64 3.0.0-1jammy.20230919.225014 [80.5 kB]
Get:4 http://packages.ros.org/ros2/ubuntu jammy/main amd64 ros-humble-image-publisher amd64 3.0.0-1jammy.20230919.225021 [96.5 kB]
Get:5 http://packages.ros.org/ros2/ubuntu jammy/main amd64 ros-humble-image-rotate amd64 3.0.0-1jammy.20230919.225457 [63.7 kB]
Get:6 http://packages.ros.org/ros2/ubuntu jammy/main amd64 ros-humble-image-view amd64 3.0.0-1jammy.20230919.225021 [249 kB]
Get:7 http://packages.ros.org/ros2/ubuntu jammy/main amd64 ros-humble-stereo-image-proc amd64 3.0.0-1jammy.20230919.225809 [253 kB]
Get:8 http://packages.ros.org/ros2/ubuntu jammy/main amd64 ros-humble-image-pipeline amd64 3.0.0-1jammy.20230919.230533 [6,006 B]
Fetched 1,013 kB in 1s (790 kB/s)                     
Selecting previously unselected package ros-humble-depth-image-proc.
(Reading database ... 285002 files and directories currently installed.)
Preparing to unpack .../0-ros-humble-depth-image-proc_3.0.0-1jammy.20230919.225606_amd64.deb ...
Unpacking ros-humble-depth-image-proc (3.0.0-1jammy.20230919.225606) ...
Selecting previously unselected package ros-humble-tracetools-image-pipeline.
Preparing to unpack .../1-ros-humble-tracetools-image-pipeline_3.0.0-1jammy.20230919.200020_amd64.deb ...
Unpacking ros-humble-tracetools-image-pipeline (3.0.0-1jammy.20230919.200020) ...
Selecting previously unselected package ros-humble-image-proc.
Preparing to unpack .../2-ros-humble-image-proc_3.0.0-1jammy.20230919.225014_amd64.deb ...
Unpacking ros-humble-image-proc (3.0.0-1jammy.20230919.225014) ...
Selecting previously unselected package ros-humble-image-publisher.
Preparing to unpack .../3-ros-humble-image-publisher_3.0.0-1jammy.20230919.225021_amd64.deb ...
Unpacking ros-humble-image-publisher (3.0.0-1jammy.20230919.225021) ...
Selecting previously unselected package ros-humble-image-rotate.
Preparing to unpack .../4-ros-humble-image-rotate_3.0.0-1jammy.20230919.225457_amd64.deb ...
Unpacking ros-humble-image-rotate (3.0.0-1jammy.20230919.225457) ...
Selecting previously unselected package ros-humble-image-view.
Preparing to unpack .../5-ros-humble-image-view_3.0.0-1jammy.20230919.225021_amd64.deb ...
Unpacking ros-humble-image-view (3.0.0-1jammy.20230919.225021) ...
Selecting previously unselected package ros-humble-stereo-image-proc.
Preparing to unpack .../6-ros-humble-stereo-image-proc_3.0.0-1jammy.20230919.225809_amd64.deb ...
Unpacking ros-humble-stereo-image-proc (3.0.0-1jammy.20230919.225809) ...
Selecting previously unselected package ros-humble-image-pipeline.
Preparing to unpack .../7-ros-humble-image-pipeline_3.0.0-1jammy.20230919.230533_amd64.deb ...
Unpacking ros-humble-image-pipeline (3.0.0-1jammy.20230919.230533) ...
Setting up ros-humble-image-view (3.0.0-1jammy.20230919.225021) ...
Setting up ros-humble-image-publisher (3.0.0-1jammy.20230919.225021) ...
Setting up ros-humble-depth-image-proc (3.0.0-1jammy.20230919.225606) ...
Setting up ros-humble-tracetools-image-pipeline (3.0.0-1jammy.20230919.200020) ...
Setting up ros-humble-image-rotate (3.0.0-1jammy.20230919.225457) ...
Setting up ros-humble-image-proc (3.0.0-1jammy.20230919.225014) ...
Setting up ros-humble-stereo-image-proc (3.0.0-1jammy.20230919.225809) ...
Setting up ros-humble-image-pipeline (3.0.0-1jammy.20230919.230533) ...
executing command [sudo -H apt-get install -y ros-humble-foxglove-msgs]
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  dctrl-tools dkms gconf-service gconf-service-backend gconf2 gconf2-common libflashrom1 libftdi1-2 libgconf-2-4 libllvm13 libllvm13:i386 libnvidia-cfg1-515 libnvidia-common-515 libnvidia-compute-515 libnvidia-compute-515:i386 libnvidia-decode-515
  libnvidia-decode-515:i386 libnvidia-encode-515 libnvidia-encode-515:i386 libnvidia-extra-515 libnvidia-fbc1-515 libnvidia-fbc1-515:i386 libnvidia-gl-515 libnvidia-gl-515:i386 libvulkan1:i386 libwayland-client0:i386 mercurial mercurial-common
  mesa-vulkan-drivers:i386 nvidia-compute-utils-515 nvidia-kernel-common-515 nvidia-utils-515 python3-vcstool python3-vcstools ros-build-essential xserver-xorg-video-nvidia-515
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  ros-humble-foxglove-msgs
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 503 kB of archives.
After this operation, 8,228 kB of additional disk space will be used.
Get:1 http://packages.ros.org/ros2/ubuntu jammy/main amd64 ros-humble-foxglove-msgs amd64 2.2.0-1jammy.20230919.212927 [503 kB]
Fetched 503 kB in 1s (398 kB/s)                   
Selecting previously unselected package ros-humble-foxglove-msgs.
(Reading database ... 285313 files and directories currently installed.)
Preparing to unpack .../ros-humble-foxglove-msgs_2.2.0-1jammy.20230919.212927_amd64.deb ...
Unpacking ros-humble-foxglove-msgs (2.2.0-1jammy.20230919.212927) ...
Setting up ros-humble-foxglove-msgs (2.2.0-1jammy.20230919.212927) ...
Processing triggers for libc-bin (2.35-0ubuntu3.4) ...
executing command [sudo -H apt-get install -y ros-humble-rviz-imu-plugin]
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  dctrl-tools dkms gconf-service gconf-service-backend gconf2 gconf2-common libflashrom1 libftdi1-2 libgconf-2-4 libllvm13 libllvm13:i386 libnvidia-cfg1-515 libnvidia-common-515 libnvidia-compute-515 libnvidia-compute-515:i386 libnvidia-decode-515
  libnvidia-decode-515:i386 libnvidia-encode-515 libnvidia-encode-515:i386 libnvidia-extra-515 libnvidia-fbc1-515 libnvidia-fbc1-515:i386 libnvidia-gl-515 libnvidia-gl-515:i386 libvulkan1:i386 libwayland-client0:i386 mercurial mercurial-common
  mesa-vulkan-drivers:i386 nvidia-compute-utils-515 nvidia-kernel-common-515 nvidia-utils-515 python3-vcstool python3-vcstools ros-build-essential xserver-xorg-video-nvidia-515
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  ros-humble-rviz-imu-plugin
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 169 kB of archives.
After this operation, 935 kB of additional disk space will be used.
Get:1 http://packages.ros.org/ros2/ubuntu jammy/main amd64 ros-humble-rviz-imu-plugin amd64 2.1.3-1jammy.20230919.231840 [169 kB]
Fetched 169 kB in 1s (243 kB/s)                    
Selecting previously unselected package ros-humble-rviz-imu-plugin.
(Reading database ... 286499 files and directories currently installed.)
Preparing to unpack .../ros-humble-rviz-imu-plugin_2.1.3-1jammy.20230919.231840_amd64.deb ...
Unpacking ros-humble-rviz-imu-plugin (2.1.3-1jammy.20230919.231840) ...
Setting up ros-humble-rviz-imu-plugin (2.1.3-1jammy.20230919.231840) ...
executing command [sudo -H apt-get install -y ros-humble-depth-image-proc]
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
ros-humble-depth-image-proc is already the newest version (3.0.0-1jammy.20230919.225606).
ros-humble-depth-image-proc set to manually installed.
The following packages were automatically installed and are no longer required:
  dctrl-tools dkms gconf-service gconf-service-backend gconf2 gconf2-common libflashrom1 libftdi1-2 libgconf-2-4 libllvm13 libllvm13:i386 libnvidia-cfg1-515 libnvidia-common-515 libnvidia-compute-515 libnvidia-compute-515:i386 libnvidia-decode-515
  libnvidia-decode-515:i386 libnvidia-encode-515 libnvidia-encode-515:i386 libnvidia-extra-515 libnvidia-fbc1-515 libnvidia-fbc1-515:i386 libnvidia-gl-515 libnvidia-gl-515:i386 libvulkan1:i386 libwayland-client0:i386 mercurial mercurial-common
  mesa-vulkan-drivers:i386 nvidia-compute-utils-515 nvidia-kernel-common-515 nvidia-utils-515 python3-vcstool python3-vcstools ros-build-essential xserver-xorg-video-nvidia-515
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
#All required rosdeps installed successfully

which DID install some new packages (in order):

ros-humble-xacro

ros-humble-depthai

ros-humble-camera-calibration

ros-humble-compressed-depth-image-transport 
ros-humble-compressed-image-transport 
ros-humble-image-transport-plugins 
ros-humble-theora-image-transport

ros-humble-depth-image-proc 
ros-humble-image-proc 
ros-humble-image-publisher 
ros-humble-image-rotate 
ros-humble-image-view 
ros-humble-stereo-image-proc 
ros-humble-tracetools-image-pipeline
ros-humble-rviz-imu-plugin

ros-humble-foxglove-msgs

ros-humble-rviz-imu-plugin

but won't change the error.

Scoeerg commented 8 months ago

Update: I just checked /opt/ros/humble/include/tf2_geometry_msgs/tf2_geometry_msgs/tf2_geometry_msgs.hpp exists.

Scoeerg commented 8 months ago

Based on the docker-file (does essentially what I did), except it builds with the ros_ws/src/depthai-ros/build.sh, so did I:

sh ./src/depthai-ros/build.sh 
./src/depthai-ros/build.sh: 35: [: 0: unexpected operator
./src/depthai-ros/build.sh: 40: [: 0: unexpected operator
Build type: Release, Install_type: symlink-install
./src/depthai-ros/build.sh: 45: [: 1: unexpected operator
Parallel build
Starting >>> depthai_ros_msgs
Starting >>> depthai_descriptions
--- stderr: depthai_descriptions                                                                       
CMake Warning:
  Manually-specified variables were not used by the project:

    BUILD_SHARED_LIBS

---
Finished <<< depthai_descriptions [0.68s]
--- stderr: depthai_ros_msgs                             
failed to create symbolic link 'ros_ws/build/depthai_ros_msgs/ament_cmake_python/depthai_ros_msgs/depthai_ros_msgs' because existing path cannot be removed: Is a directory
gmake[2]: *** [CMakeFiles/ament_cmake_python_symlink_depthai_ros_msgs.dir/build.make:70: CMakeFiles/ament_cmake_python_symlink_depthai_ros_msgs] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:421: CMakeFiles/ament_cmake_python_symlink_depthai_ros_msgs.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
gmake: *** [Makefile:146: all] Error 2
---
Failed   <<< depthai_ros_msgs [2.02s, exited with code 2]

Summary: 1 package finished [2.78s]
  1 package failed: depthai_ros_msgs
  2 packages had stderr output: depthai_descriptions depthai_ros_msgs
  5 packages not processed

removed /build /install /log and ran colcon build again. works. Whatever this was...