From 26a151fe513c13ee12459a4e4259b6a2bfcf2dd6 Mon Sep 17 00:00:00 2001 From: anirudha-dg Date: Mon, 2 Mar 2026 16:18:03 +0530 Subject: [PATCH 1/5] x86 3dLoc patch --- ROS2/AMD64x86/humble_cuda/aptPkgs.list | 3 ++- ROS2/AMD64x86/wheelchair2_base_cuda/Dockerfile | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ROS2/AMD64x86/humble_cuda/aptPkgs.list b/ROS2/AMD64x86/humble_cuda/aptPkgs.list index d7c24d2..5ebafd9 100644 --- a/ROS2/AMD64x86/humble_cuda/aptPkgs.list +++ b/ROS2/AMD64x86/humble_cuda/aptPkgs.list @@ -27,4 +27,5 @@ tzdata v4l-utils vim wget -xterm \ No newline at end of file +xterm +libeigen3-dev \ No newline at end of file diff --git a/ROS2/AMD64x86/wheelchair2_base_cuda/Dockerfile b/ROS2/AMD64x86/wheelchair2_base_cuda/Dockerfile index 055e175..ae1fdfe 100644 --- a/ROS2/AMD64x86/wheelchair2_base_cuda/Dockerfile +++ b/ROS2/AMD64x86/wheelchair2_base_cuda/Dockerfile @@ -31,6 +31,7 @@ RUN cd Livox-SDK2 \ && cmake .. && make -j \ && sudo make install -j4 + COPY rosPkgs.list /tmp/rosPkgs.list RUN sudo apt-get update \ && sudo apt-get -y install --no-install-recommends $(cat /tmp/rosPkgs.list) \ @@ -41,6 +42,16 @@ RUN sudo apt-get update \ && pip3 install $(cat /tmp/pythonPkgs.list) \ && sudo rm -rf /var/lib/apt/lists/* +# 3D-BBS +WORKDIR /home/container_user +RUN git clone https://github.com/KOKIAOKI/3d_bbs.git --recursive --depth 1 +RUN cd 3d_bbs \ + && mkdir build && cd build \ + && cmake .. -DCMAKE_BUILD_TYPE=Release && make -j \ + && sudo make install \ + && cd /home/container_user \ + && rm -rf 3d_bbs + #Install Miniconda # RUN mkdir -p ~/miniconda3 && \ # wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh && \ From 894d98fb3ee703a6c53c6c90e89c8a95aae88e59 Mon Sep 17 00:00:00 2001 From: anirudha-dg Date: Mon, 2 Mar 2026 16:52:21 +0530 Subject: [PATCH 2/5] Jetson v5.1 --- ROS2/Jetson/humble_jetson/Dockerfile | 39 +++++++++++++++++++++------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/ROS2/Jetson/humble_jetson/Dockerfile b/ROS2/Jetson/humble_jetson/Dockerfile index 3e396af..4516dfc 100644 --- a/ROS2/Jetson/humble_jetson/Dockerfile +++ b/ROS2/Jetson/humble_jetson/Dockerfile @@ -3,7 +3,7 @@ FROM nvcr.io/nvidia/l4t-jetpack:r36.2.0 # basic args ARG ROS_DISTRO=humble ARG USERNAME=container_user -ARG USER_UID=1000 +ARG USER_UID=1002 ARG USER_GID=$USER_UID # Add metadata labels @@ -47,18 +47,37 @@ RUN curl -L -s -o /tmp/ros2-apt-source.deb https://github.com/ros-infrastructure && rm -rf /var/lib/apt/lists/* # install packages -COPY aptPkgs.list /tmp/aptPkgs.list -RUN apt-get update && apt-get install -q -y --no-install-recommends \ - $(cat /tmp/aptPkgs.list) \ - ros-$ROS_DISTRO-desktop \ - && rm -rf /var/lib/apt/lists/* - -# Create non root user with sudo privilege +# COPY aptPkgs.list /tmp/aptPkgs.list +# RUN apt-get update && apt-get install -q -y --no-install-recommends \ +# $(cat /tmp/aptPkgs.list) \ +# ros-$ROS_DISTRO-desktop \ +# && rm -rf /var/lib/apt/lists/* + +# # Create non root user with sudo privilege +# RUN groupadd --gid $USER_GID $USERNAME \ +# && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ +# && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ +# && chmod 0440 /etc/sudoers.d/$USERNAME +# USER $USERNAME + +USER root +RUN EXISTING_RENDER_GROUP=$(getent group 104 | cut -d: -f1) && \ + if [ ! -z "$EXISTING_RENDER_GROUP" ] && [ "$EXISTING_RENDER_GROUP" != "render" ]; then \ + groupmod -g 9904 "$EXISTING_RENDER_GROUP"; \ + fi && \ + groupmod -g 44 video || true && \ + groupmod -g 104 render || true + +# 3. Create the user ONCE with the correct IDs RUN groupadd --gid $USER_GID $USERNAME \ && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ - && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ + && usermod -aG sudo,video,render,i2c $USERNAME \ + && echo "$USERNAME ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/$USERNAME \ && chmod 0440 /etc/sudoers.d/$USERNAME -USER $USERNAME + +# 4. Set ownership (if files were copied as root previously) +RUN chown -R $USER_UID:$USER_GID /home/$USERNAME + # setup entrypoint COPY ./ros_entrypoint.sh / From 25ea12209013962011ad88c615469461402eb372 Mon Sep 17 00:00:00 2001 From: anirudha-dg Date: Mon, 2 Mar 2026 17:00:59 +0530 Subject: [PATCH 3/5] jetson 3dbbs --- ROS2/Jetson/humble_jetson/aptPkgs.list | 3 ++- ROS2/Jetson/wheelchair2_base_jetson/Dockerfile | 13 ++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ROS2/Jetson/humble_jetson/aptPkgs.list b/ROS2/Jetson/humble_jetson/aptPkgs.list index d7c24d2..5ebafd9 100644 --- a/ROS2/Jetson/humble_jetson/aptPkgs.list +++ b/ROS2/Jetson/humble_jetson/aptPkgs.list @@ -27,4 +27,5 @@ tzdata v4l-utils vim wget -xterm \ No newline at end of file +xterm +libeigen3-dev \ No newline at end of file diff --git a/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile b/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile index 0de8e53..50618c9 100644 --- a/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile +++ b/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/smart-wheelchair-rrc/humble_jetson:v5.0 +FROM ghcr.io/smart-wheelchair-rrc/humble_jetson:dev5.1 ARG USERNAME=container_user @@ -42,6 +42,17 @@ RUN sudo apt-get update \ && pip3 install $(cat /tmp/pythonPkgs.list) \ && sudo rm -rf /var/lib/apt/lists/* + +#3D-BBS +WORKDIR /home/container_user +RUN git clone https://github.com/KOKIAOKI/3d_bbs.git --recursive --depth 1 +RUN cd 3d_bbs \ + && mkdir build && cd build \ + && cmake .. -DCMAKE_BUILD_TYPE=Release && make -j \ + && sudo make install \ + && cd /home/container_user \ + && rm -rf 3d_bbs + #Install Miniconda # RUN mkdir -p ~/miniconda3 && \ # wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh && \ From b1d5770e36f582070fb546612c1549e08a5f818c Mon Sep 17 00:00:00 2001 From: anirudha-dg Date: Mon, 2 Mar 2026 17:24:05 +0530 Subject: [PATCH 4/5] uid gid change --- ROS2/Jetson/humble_jetson/Dockerfile | 50 ++++++++++++++++------------ 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/ROS2/Jetson/humble_jetson/Dockerfile b/ROS2/Jetson/humble_jetson/Dockerfile index 4516dfc..70f20d9 100644 --- a/ROS2/Jetson/humble_jetson/Dockerfile +++ b/ROS2/Jetson/humble_jetson/Dockerfile @@ -47,20 +47,16 @@ RUN curl -L -s -o /tmp/ros2-apt-source.deb https://github.com/ros-infrastructure && rm -rf /var/lib/apt/lists/* # install packages -# COPY aptPkgs.list /tmp/aptPkgs.list -# RUN apt-get update && apt-get install -q -y --no-install-recommends \ -# $(cat /tmp/aptPkgs.list) \ -# ros-$ROS_DISTRO-desktop \ -# && rm -rf /var/lib/apt/lists/* - -# # Create non root user with sudo privilege -# RUN groupadd --gid $USER_GID $USERNAME \ -# && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ -# && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ -# && chmod 0440 /etc/sudoers.d/$USERNAME -# USER $USERNAME +COPY aptPkgs.list /tmp/aptPkgs.list +RUN apt-get update && apt-get install -q -y --no-install-recommends \ + $(cat /tmp/aptPkgs.list) \ + ros-$ROS_DISTRO-desktop \ + && rm -rf /var/lib/apt/lists/* +# Perform all root-level system modifications first USER root + +# 1. Resolve GID conflicts for Jetson hardware groups (video=44, render=104) RUN EXISTING_RENDER_GROUP=$(getent group 104 | cut -d: -f1) && \ if [ ! -z "$EXISTING_RENDER_GROUP" ] && [ "$EXISTING_RENDER_GROUP" != "render" ]; then \ groupmod -g 9904 "$EXISTING_RENDER_GROUP"; \ @@ -68,22 +64,32 @@ RUN EXISTING_RENDER_GROUP=$(getent group 104 | cut -d: -f1) && \ groupmod -g 44 video || true && \ groupmod -g 104 render || true -# 3. Create the user ONCE with the correct IDs -RUN groupadd --gid $USER_GID $USERNAME \ - && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ - && usermod -aG sudo,video,render,i2c $USERNAME \ - && echo "$USERNAME ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/$USERNAME \ - && chmod 0440 /etc/sudoers.d/$USERNAME - -# 4. Set ownership (if files were copied as root previously) -RUN chown -R $USER_UID:$USER_GID /home/$USERNAME - +# 2. Robust User Creation: Check if name/UID/GID exists before creating +RUN if getent passwd $USERNAME; then \ + usermod -u $USER_UID $USERNAME && \ + groupmod -g $USER_GID $USERNAME || true; \ + else \ + # Evict GID 1002 if it's taken by a system group (like 'nvidia') + EXISTING_VAL_GROUP=$(getent group $USER_GID | cut -d: -f1); \ + if [ ! -z "$EXISTING_VAL_GROUP" ]; then groupmod -g 9992 "$EXISTING_VAL_GROUP"; fi; \ + groupadd --gid $USER_GID $USERNAME && \ + useradd --uid $USER_UID --gid $USER_GID -m $USERNAME; \ + fi && \ + # Grant sudo and hardware access + usermod -aG sudo,video,render,i2c $USERNAME && \ + echo "$USERNAME ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/$USERNAME && \ + chmod 0440 /etc/sudoers.d/$USERNAME # setup entrypoint COPY ./ros_entrypoint.sh / ENTRYPOINT ["/ros_entrypoint.sh"] +ENV NVIDIA_VISIBLE_DEVICES=all +ENV NVIDIA_DRIVER_CAPABILITIES=all + +USER $USERNAME + # bootstrap rosdep RUN sudo rosdep init && \ rosdep update --rosdistro $ROS_DISTRO From c1282951e5a6d633993f9101ac55e08e0dd682b1 Mon Sep 17 00:00:00 2001 From: anirudha-dg Date: Mon, 2 Mar 2026 18:39:31 +0530 Subject: [PATCH 5/5] tag changed --- ROS2/Jetson/wheelchair2_base_jetson/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile b/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile index 50618c9..f8ff2d2 100644 --- a/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile +++ b/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/smart-wheelchair-rrc/humble_jetson:dev5.1 +FROM ghcr.io/smart-wheelchair-rrc/humble_jetson:dev5.1.2 ARG USERNAME=container_user