Unable to build orb_slam2 with ROS2 humble and Ubuntu 22.04

asked 2023-06-25 23:11:53 -0500

Astronaut gravatar image

updated 2023-06-26 00:09:58 -0500

Hi

Im trying to use ORB_SLAM2 with Ubuntu 22.02 and ROS2 humble. Im using this ROS2 node wrapping the ORB_SLAM2 library ROS2 node wrapping the ORB_SLAM2 library. I have build old necessary dependencies

But Im not able to build. When try to use the docker with bash build.sh i got the following error

=> [internal] load build definition from Dockerfile                                                                                        0.1s
 => => transferring dockerfile: 2.20kB                                                                                                      0.0s
 => [internal] load .dockerignore                                                                                                           0.1s
 => => transferring context: 2B                                                                                                             0.0s
 => [internal] load metadata for docker.io/library/ubuntu:18.04                                                                             2.2s
 => [ 1/23] FROM docker.io/library/ubuntu:18.04@sha256:152dc042452c496007f07ca9127571cb9c29697f42acbfad72324b2bb2e43c98                     0.0s
 => [internal] load build context                                                                                                           0.0s
 => => transferring context: 106B                                                                                                           0.0s
 => CACHED [ 2/23] WORKDIR /root                                                                                                            0.0s
 => CACHED [ 3/23] COPY scripts /root/scripts                                                                                               0.0s
 => CACHED [ 4/23] RUN apt-get update && apt-get install -y     wget     curl     git     vim     nano     python-dev     python3-pip       0.0s
 => CACHED [ 5/23] WORKDIR /root                                                                                                            0.0s
 => CACHED [ 6/23] WORKDIR /root                                                                                                            0.0s
 => CACHED [ 7/23] RUN git clone https://github.com/raulmur/ORB_SLAM2.git                                                                   0.0s
 => CACHED [ 8/23] RUN apt-get install -y   libboost-system-dev                                                                             0.0s
 => CACHED [ 9/23] WORKDIR /root/ORB_SLAM2                                                                                                  0.0s
 => CACHED [10/23] RUN git apply /root/scripts/orbslam.patch                                                                                0.0s
 => CACHED [11/23] RUN chmod +x /root/scripts/build.sh                                                                                      0.0s
 => ERROR [12/23] RUN /bin/bash -c 'export LD_LIBRARY_PATH=~/Pangolin/build/src/:$LD_LIBRARY_PATH;   bash $HOME/scripts/build.sh'           3.0s
------                                                                                                                                           
 > [12/23] RUN /bin/bash -c 'export LD_LIBRARY_PATH=~/Pangolin/build/src/:$LD_LIBRARY_PATH;   bash $HOME/scripts/build.sh':                      
#0 1.043 Configuring and building Thirdparty/DBoW2 ...                                                                                           
#0 1.058 /root/scripts/build.sh: line 6: cmake: command not found
#0 1.066 make: *** No targets specified and no makefile found.  Stop.
#0 1.067 Configuring and building Thirdparty/g2o ...
#0 1.071 /root/scripts/build.sh: line 15: cmake: command not found
#0 1.076 make: *** No targets specified and no makefile found.  Stop.
#0 1.076 Uncompress vocabulary ...
#0 2.702 Configuring and building ORB_SLAM2 ...
#0 2.705 /root/scripts/build.sh: line 30: cmake: command not found
#0 2.706 make: *** No targets specified and no makefile found.  Stop.
#0 2.708 make: *** No rule to make target 'install'.  Stop.
------
Dockerfile:59
--------------------
  58 |     RUN chmod +x $HOME/scripts/build.sh
  59 | >>> RUN /bin/bash -c 'export LD_LIBRARY_PATH=~/Pangolin/build/src/:$LD_LIBRARY_PATH; \
  60 | >>>   bash $HOME/scripts/build.sh'
  61 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c /bin/bash -c 'export LD_LIBRARY_PATH=~/Pangolin/build/src/:$LD_LIBRARY_PATH;   bash $HOME/scripts/build.sh'" did not complete successfully: exit code: 2

Im wondering if this ros wrapper can work with ROS2 and bumble. IF not , which settings are need it and what dependencies required to run ORB_SLAM2 or ORB_SLAM3 with ros2 humble and Ubuntu 22.04?

edit retag flag offensive close merge delete