From 4b3b8758caf9fa7ad64d6e8ebf766d92a9447214 Mon Sep 17 00:00:00 2001 From: leddits Date: Fri, 18 Apr 2025 11:38:08 +0900 Subject: [PATCH 1/3] code debug --- docker/Dockerfile.base | 3 +++ scripts/run_dev.sh | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docker/Dockerfile.base b/docker/Dockerfile.base index 763484b0..d5d1c402 100644 --- a/docker/Dockerfile.base +++ b/docker/Dockerfile.base @@ -140,6 +140,7 @@ RUN --mount=type=cache,target=/var/cache/apt \ python3-opencv=4.5.4+dfsg-9ubuntu4 \ python3-scipy + # Downgrade to setuptools < 70.0.0 # https://github.com/pypa/setuptools/issues/4483 RUN python3 -m pip install -U \ @@ -151,6 +152,8 @@ RUN python3 -m pip install -U \ ninja \ wheel +RUN python3 -m pip install --upgrade pip setuptools wheel packaging + # Python3 PIP packages RUN python3 -m pip install -U \ argcomplete \ diff --git a/scripts/run_dev.sh b/scripts/run_dev.sh index 86f08e54..cddff867 100755 --- a/scripts/run_dev.sh +++ b/scripts/run_dev.sh @@ -240,7 +240,8 @@ if [[ -n $SSH_AUTH_SOCK ]]; then fi if [[ $PLATFORM == "aarch64" ]]; then - DOCKER_ARGS+=("-e NVIDIA_VISIBLE_DEVICES=nvidia.com/gpu=all,nvidia.com/pva=all") + # DOCKER_ARGS+=("-e NVIDIA_VISIBLE_DEVICES=nvidia.com/gpu=all,nvidia.com/pva=all") + DOCKER_ARGS+=("-e NVIDIA_VISIBLE_DEVICES=all") DOCKER_ARGS+=("-v /usr/bin/tegrastats:/usr/bin/tegrastats") DOCKER_ARGS+=("-v /tmp/:/tmp/") DOCKER_ARGS+=("-v /usr/lib/aarch64-linux-gnu/tegra:/usr/lib/aarch64-linux-gnu/tegra") From fcf8e720d2166d6d2666b08312d1715b8f54f9ed Mon Sep 17 00:00:00 2001 From: leddits Date: Fri, 18 Apr 2025 11:51:53 +0900 Subject: [PATCH 2/3] check --- scripts/run_dev.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/run_dev.sh b/scripts/run_dev.sh index cddff867..4597b301 100755 --- a/scripts/run_dev.sh +++ b/scripts/run_dev.sh @@ -146,6 +146,8 @@ fi # Check if all LFS files are in place in the repository where this script is running from. cd $ROOT + print_info $ROOT + git status git rev-parse &>/dev/null if [[ $? -eq 0 ]]; then LFS_FILES_STATUS=$(cd $ISAAC_ROS_DEV_DIR && git lfs ls-files | cut -d ' ' -f2) From f75a557e2e17ab51ab6dc63095294c6ef4357661 Mon Sep 17 00:00:00 2001 From: leddits Date: Tue, 22 Apr 2025 10:56:22 +0900 Subject: [PATCH 3/3] rtabmap_ros intetration --- docker/Dockerfile.base | 27 +++++++++++++++++++++++++++ scripts/run_dev.sh | 22 ++++++++++++++++++++-- 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile.base b/docker/Dockerfile.base index d5d1c402..7b62f77a 100644 --- a/docker/Dockerfile.base +++ b/docker/Dockerfile.base @@ -428,6 +428,33 @@ RUN apt-get install -y yasm && wget https://ffmpeg.org/releases/ffmpeg-4.4.2.tar FROM extended-${PLATFORM} AS base + + + + +# -------- RTAB-Map 설치 (core + ros2) -------- +WORKDIR /tmp + +RUN git clone https://github.com/introlab/rtabmap.git && \ + cd rtabmap && \ + git checkout master && \ + rm -rf build && mkdir build && cd build && \ + cmake .. \ + -DCMAKE_BUILD_TYPE=Release \ + -DWITH_CUDA=ON \ + -DWITH_OPENMP=ON \ + -DWITH_G2O=ON \ + -DWITH_PCL=ON && \ + make -j$(nproc) && make install && ldconfig && \ + cd /tmp && rm -rf rtabmap + +# rtabmap_ros (ROS 2 Humble용) – ros2 브랜치 사용 +RUN mkdir -p /workspaces/isaac_ros-dev/src && \ + git clone --depth=1 --branch ros2 https://github.com/introlab/rtabmap_ros.git /workspaces/isaac_ros-dev/src/rtabmap_ros + + + + # Install Ceres RUN git clone https://github.com/ceres-solver/ceres-solver.git && \ cd ceres-solver && \ diff --git a/scripts/run_dev.sh b/scripts/run_dev.sh index 4597b301..ba1aaab5 100755 --- a/scripts/run_dev.sh +++ b/scripts/run_dev.sh @@ -146,8 +146,6 @@ fi # Check if all LFS files are in place in the repository where this script is running from. cd $ROOT - print_info $ROOT - git status git rev-parse &>/dev/null if [[ $? -eq 0 ]]; then LFS_FILES_STATUS=$(cd $ISAAC_ROS_DEV_DIR && git lfs ls-files | cut -d ' ' -f2) @@ -194,6 +192,26 @@ if [ "$(docker ps -a --quiet --filter status=running --filter name=$CONTAINER_NA print_info "Attaching to running container: $CONTAINER_NAME" ISAAC_ROS_WS=$(docker exec $CONTAINER_NAME printenv ISAAC_ROS_WS) print_info "Docker workspace: $ISAAC_ROS_WS" + + + + + + # ✅ rtabmap_ros 자동 colcon 빌드 + docker exec -u admin $CONTAINER_NAME bash -c "\ + source /opt/ros/humble/setup.bash && \ + if [ -d /workspaces/isaac_ros-dev/src/rtabmap_ros ] && [ ! -d /workspaces/isaac_ros-dev/install/rtabmap_ros ]; then \ + echo '[INFO] rtabmap_ros detected. Building with colcon...'; \ + cd /workspaces/isaac_ros-dev && \ + colcon build --symlink-install --cmake-args -DWITH_CUDA=ON; \ + echo '[INFO] Build finished.'; \ + fi" + + + + + + docker exec -i -t -u admin --workdir $ISAAC_ROS_WS $CONTAINER_NAME /bin/bash $@ exit 0 fi