Skip to content
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
04adcbc
add sbc docker
GyuH13 Oct 21, 2025
41aa268
Merge branch 'main' of https://github.com/ROBOTIS-GIT/turtlebot3 into…
GyuH13 Oct 21, 2025
70feb3d
docker: add Dockerfile.sbc and update docker-compose.yml for turtlebot3
GyuH13 Oct 21, 2025
1f225cc
docker: remove old Dockerfile and docker-compose.yml, update Dockerfi…
GyuH13 Oct 21, 2025
ef4bd76
docker: additional packages
GyuH13 Oct 21, 2025
b397010
docker: add nano package to Dockerfile.sbc
GyuH13 Oct 21, 2025
e0efe4f
docker: reorganize package installation in Dockerfile.pc for clarity
GyuH13 Oct 21, 2025
d6375b2
add docker file
GyuH13 Oct 22, 2025
b5eec21
Add dockerfile and compose.yml
GyuH13 Oct 22, 2025
585ab3f
docker: remove outdated Dockerfiles and update image reference in doc…
GyuH13 Oct 22, 2025
d150e90
docker: comment out build section in multiple docker-compose files fo…
GyuH13 Oct 22, 2025
5131d08
fix volumn mapping error
GyuH13 Oct 23, 2025
9dd5b5a
Add container management scripts for Turtlebot3
GyuH13 Oct 23, 2025
62c205c
docker: remove redundant comment from udev rule setup in container sc…
GyuH13 Oct 23, 2025
cc66146
docker: comment out udev rule setup in container scripts to avoid con…
GyuH13 Oct 23, 2025
49c96c4
docker: comment out environment variable exports in Dockerfiles for c…
GyuH13 Oct 24, 2025
35576be
Bump
GyuH13 Oct 24, 2025
6f718a8
docker: Update Dockerfiles to include additional dependencies for ROS…
Woojin-Crive Nov 1, 2025
314b6a4
gitignore: Update .gitignore to include .DS_Store file exclusion
Woojin-Crive Nov 1, 2025
f0c3465
fix EOF
GyuH13 Nov 6, 2025
e0d05e1
add udev rule in container.sh pc version
GyuH13 Nov 12, 2025
5fd48d2
support docker-compose environment
GyuH13 Nov 12, 2025
c1cae49
unified pc and sbc
GyuH13 Nov 13, 2025
a37b7e3
change volumn mount path
GyuH13 Nov 13, 2025
e8d5765
add nav2-route install command
GyuH13 Nov 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions Dockerfile

This file was deleted.

41 changes: 41 additions & 0 deletions docker/humble/pc/Dockerfile.pc
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Use the base ROS2 humble image
FROM ros:humble-ros-base

# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
ENV COLCON_WS=/root/turtlebot3_ws

# Install the required packages in a single layer and clean up afterwards
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ros-${ROS_DISTRO}-desktop \
python3-colcon-common-extensions \
git \
nano \
ros-${ROS_DISTRO}-cartographer \
ros-${ROS_DISTRO}-cartographer-ros \
ros-${ROS_DISTRO}-navigation2 \
ros-${ROS_DISTRO}-nav2-bringup \
ros-${ROS_DISTRO}-turtlebot3-msgs \
ros-${ROS_DISTRO}-dynamixel-sdk \
ros-${ROS_DISTRO}-xacro \
&& rm -rf /var/lib/apt/lists/*

WORKDIR ${COLCON_WS}

RUN mkdir -p ${COLCON_WS}/src && \
cd ${COLCON_WS}/src && \
git clone -b humble https://github.com/ROBOTIS-GIT/turtlebot3.git

RUN bash -c "source /opt/ros/${ROS_DISTRO}/setup.bash && \
cd ${COLCON_WS} && \
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release"

RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> ~/.bashrc && \
echo "source ${COLCON_WS}/install/setup.bash" >> ~/.bashrc && \
echo "alias cb='colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release'" >> ~/.bashrc && \
echo "export ROS_DOMAIN_ID=30 # TURTLEBOT3" >> ~/.bashrc && \
echo "export TURTLEBOT3_MODEL= # burger, waffle, waffle_pi" >> ~/.bashrc && \
echo "export LDS_MODEL= # LDS-01, LDS-02, LDS-03" >> ~/.bashrc
Copy link

Copilot AI Oct 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The environment variables TURTLEBOT3_MODEL and LDS_MODEL are exported with empty values. This requires users to manually edit ~/.bashrc after container startup. Consider either removing these exports or providing sensible defaults (e.g., 'burger' for TURTLEBOT3_MODEL and 'LDS-01' for LDS_MODEL) to improve the out-of-box experience.

Suggested change
echo "export TURTLEBOT3_MODEL= # burger, waffle, waffle_pi" >> ~/.bashrc && \
echo "export LDS_MODEL= # LDS-01, LDS-02, LDS-03" >> ~/.bashrc
echo "export TURTLEBOT3_MODEL=burger # burger, waffle, waffle_pi" >> ~/.bashrc && \
echo "export LDS_MODEL=LDS-01 # LDS-01, LDS-02, LDS-03" >> ~/.bashrc

Copilot uses AI. Check for mistakes.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Exporting TURTLEBOT3_MODEL and LDS_MODEL with empty values can lead to runtime errors if scripts expect them to be set. It's more robust and user-friendly to provide sensible defaults. Users can still override them if needed.

    echo "export TURTLEBOT3_MODEL=burger # burger, waffle, waffle_pi" >> ~/.bashrc && \
    echo "export LDS_MODEL=LDS-01 # LDS-01, LDS-02, LDS-03" >> ~/.bashrc


CMD ["bash"]
30 changes: 30 additions & 0 deletions docker/humble/pc/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
services:
turtlebot3:
container_name: turtlebot3
image: robotis/turtlebot3:humble-pc-latest
# build:
# context: .
# dockerfile: Dockerfile.pc
tty: true
restart: unless-stopped
cap_add:
- SYS_NICE
ulimits:
rtprio: 99
rttime: -1
memlock: 8428281856
network_mode: host
ipc: host
pid: host
environment:
- DISPLAY=${DISPLAY}
- QT_X11_NO_MITSHM=1
volumes:
- /dev:/dev
- /dev/shm:/dev/shm
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- /tmp/.docker.xauth:/tmp/.docker.xauth:rw
- ./workspace:/workspace
- ../../../:/root/turtlebot3_ws/src/turtlebot3
privileged: true
command: bash
47 changes: 47 additions & 0 deletions docker/humble/sbc/Dockerfile.sbc
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Use the base ROS2 humble image
FROM ros:humble-ros-base

# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
ENV COLCON_WS=/root/turtlebot3_ws

# Install the required packages in a single layer and clean up afterwards
RUN apt-get update && \
apt-get install -y --no-install-recommends \
python3-argcomplete \
python3-colcon-common-extensions \
libboost-system-dev \
build-essential \
libudev-dev \
udev \
git \
nano \
ros-${ROS_DISTRO}-turtlebot3-msgs \
ros-${ROS_DISTRO}-dynamixel-sdk \
ros-${ROS_DISTRO}-xacro \
ros-${ROS_DISTRO}-hls-lfcd-lds-driver \
ros-${ROS_DISTRO}-ld08-driver \
ros-${ROS_DISTRO}-coin-d4-driver \
&& rm -rf /var/lib/apt/lists/*

WORKDIR ${COLCON_WS}

RUN mkdir -p ${COLCON_WS}/src && \
cd ${COLCON_WS}/src && \
git clone -b humble https://github.com/ROBOTIS-GIT/turtlebot3.git

RUN cd ${COLCON_WS}/src/turtlebot3 && \
rm -rf turtlebot3_cartographer turtlebot3_navigation2

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

These two RUN instructions can be combined into a single layer. This is a Docker best practice that helps to reduce the final image size and the number of layers, which is especially beneficial for resource-constrained SBCs.

RUN mkdir -p ${COLCON_WS}/src && \
    cd ${COLCON_WS}/src && \
    git clone -b humble https://github.com/ROBOTIS-GIT/turtlebot3.git && \
    cd turtlebot3 && \
    rm -rf turtlebot3_cartographer turtlebot3_navigation2


RUN bash -c "source /opt/ros/${ROS_DISTRO}/setup.bash && \
cd ${COLCON_WS} && \
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release"

RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> ~/.bashrc && \
echo "source ${COLCON_WS}/install/setup.bash" >> ~/.bashrc && \
echo "alias cb='colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release'" >> ~/.bashrc && \
echo "export ROS_DOMAIN_ID=30 # TURTLEBOT3" >> ~/.bashrc && \
echo "export TURTLEBOT3_MODEL= # burger, waffle, waffle_pi" >> ~/.bashrc && \
echo "export LDS_MODEL= # LDS-01, LDS-02, LDS-03" >> ~/.bashrc

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Exporting TURTLEBOT3_MODEL and LDS_MODEL with empty values can lead to runtime errors if scripts expect them to be set. It's more robust and user-friendly to provide sensible defaults. Users can still override them if needed.

    echo "export TURTLEBOT3_MODEL=burger # burger, waffle, waffle_pi" >> ~/.bashrc && \
    echo "export LDS_MODEL=LDS-01 # LDS-01, LDS-02, LDS-03" >> ~/.bashrc


CMD ["bash"]
30 changes: 30 additions & 0 deletions docker/humble/sbc/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
services:
turtlebot3:
container_name: turtlebot3
image: robotis/turtlebot3:humble-sbc-latest
# build:
# context: .
# dockerfile: Dockerfile.sbc
tty: true
restart: unless-stopped
cap_add:
- SYS_NICE
ulimits:
rtprio: 99
rttime: -1
memlock: 8428281856
network_mode: host
ipc: host
pid: host
environment:
- DISPLAY=${DISPLAY}
- QT_X11_NO_MITSHM=1
volumes:
- /dev:/dev
- /dev/shm:/dev/shm
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- /tmp/.docker.xauth:/tmp/.docker.xauth:rw
- ./workspace:/workspace
- ../../../:/root/turtlebot3_ws/src/turtlebot3
privileged: true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Using privileged: true gives the container full root access to the host machine, which poses a significant security risk. It's highly recommended to avoid this. Instead, consider granting only the necessary capabilities via cap_add and mapping specific devices (e.g., /dev/ttyUSB0) using the devices key. This follows the principle of least privilege.

command: bash
41 changes: 41 additions & 0 deletions docker/jazzy/pc/Dockerfile.pc
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Use the base ROS2 jazzy image
FROM ros:jazzy-ros-base

# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
ENV COLCON_WS=/root/turtlebot3_ws

# Install the required packages in a single layer and clean up afterwards
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ros-${ROS_DISTRO}-desktop \
python3-colcon-common-extensions \
git \
nano \
ros-${ROS_DISTRO}-cartographer \
ros-${ROS_DISTRO}-cartographer-ros \
ros-${ROS_DISTRO}-navigation2 \
ros-${ROS_DISTRO}-nav2-bringup \
ros-${ROS_DISTRO}-turtlebot3-msgs \
ros-${ROS_DISTRO}-dynamixel-sdk \
ros-${ROS_DISTRO}-xacro \
&& rm -rf /var/lib/apt/lists/*

WORKDIR ${COLCON_WS}

RUN mkdir -p ${COLCON_WS}/src && \
cd ${COLCON_WS}/src && \
git clone -b jazzy https://github.com/ROBOTIS-GIT/turtlebot3.git

RUN bash -c "source /opt/ros/${ROS_DISTRO}/setup.bash && \
cd ${COLCON_WS} && \
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release"

RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> ~/.bashrc && \
echo "source ${COLCON_WS}/install/setup.bash" >> ~/.bashrc && \
echo "alias cb='colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release'" >> ~/.bashrc && \
echo "export ROS_DOMAIN_ID=30 # TURTLEBOT3" >> ~/.bashrc && \
echo "export TURTLEBOT3_MODEL= # burger, waffle, waffle_pi" >> ~/.bashrc && \
echo "export LDS_MODEL= # LDS-01, LDS-02, LDS-03" >> ~/.bashrc
Copy link

Copilot AI Oct 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The environment variables TURTLEBOT3_MODEL and LDS_MODEL are exported with empty values. This requires users to manually edit ~/.bashrc after container startup. Consider either removing these exports or providing sensible defaults (e.g., 'burger' for TURTLEBOT3_MODEL and 'LDS-01' for LDS_MODEL) to improve the out-of-box experience.

Suggested change
echo "export TURTLEBOT3_MODEL= # burger, waffle, waffle_pi" >> ~/.bashrc && \
echo "export LDS_MODEL= # LDS-01, LDS-02, LDS-03" >> ~/.bashrc
echo "export TURTLEBOT3_MODEL=burger # burger, waffle, waffle_pi" >> ~/.bashrc && \
echo "export LDS_MODEL=LDS-01 # LDS-01, LDS-02, LDS-03" >> ~/.bashrc

Copilot uses AI. Check for mistakes.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Exporting TURTLEBOT3_MODEL and LDS_MODEL with empty values can lead to runtime errors if scripts expect them to be set. It's more robust and user-friendly to provide sensible defaults. Users can still override them if needed.

    echo "export TURTLEBOT3_MODEL=burger # burger, waffle, waffle_pi" >> ~/.bashrc && \
    echo "export LDS_MODEL=LDS-01 # LDS-01, LDS-02, LDS-03" >> ~/.bashrc


CMD ["bash"]
18 changes: 11 additions & 7 deletions docker-compose.yml → docker/jazzy/pc/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
services:
ros2:
build:
context: .
dockerfile: Dockerfile
turtlebot3:
container_name: turtlebot3
image: robotis/turtlebot3:jazzy-pc-latest
# build:
# context: .
# dockerfile: Dockerfile.pc
tty: true
restart: always
restart: unless-stopped
cap_add:
- SYS_NICE
ulimits:
rtprio: 99
rttime: -1
memlock: 8428281856
network_mode: host
ipc: host
pid: host
environment:
- DISPLAY=${DISPLAY}
- QT_X11_NO_MITSHM=1
- ROS_DOMAIN_ID=30
volumes:
- /dev:/dev
- ./workspace:/workspace
- /dev/shm:/dev/shm
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- /tmp/.docker.xauth:/tmp/.docker.xauth:rw
- ./workspace:/workspace
- ../../../:/root/turtlebot3_ws/src/turtlebot3
privileged: true
command: bash
47 changes: 47 additions & 0 deletions docker/jazzy/sbc/Dockerfile.sbc
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Use the base ROS2 jazzy image
FROM ros:jazzy-ros-base

# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
ENV COLCON_WS=/root/turtlebot3_ws

# Install the required packages in a single layer and clean up afterwards
RUN apt-get update && \
apt-get install -y --no-install-recommends \
python3-argcomplete \
python3-colcon-common-extensions \
libboost-system-dev \
build-essential \
libudev-dev \
udev \
git \
nano \
ros-${ROS_DISTRO}-turtlebot3-msgs \
ros-${ROS_DISTRO}-dynamixel-sdk \
ros-${ROS_DISTRO}-xacro \
ros-${ROS_DISTRO}-hls-lfcd-lds-driver \
ros-${ROS_DISTRO}-ld08-driver \
ros-${ROS_DISTRO}-coin-d4-driver \
&& rm -rf /var/lib/apt/lists/*

WORKDIR ${COLCON_WS}

RUN mkdir -p ${COLCON_WS}/src && \
cd ${COLCON_WS}/src && \
git clone -b jazzy https://github.com/ROBOTIS-GIT/turtlebot3.git

RUN cd ${COLCON_WS}/src/turtlebot3 && \
rm -rf turtlebot3_cartographer turtlebot3_navigation2

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

These two RUN instructions can be combined into a single layer. This is a Docker best practice that helps to reduce the final image size and the number of layers, which is especially beneficial for resource-constrained SBCs.

RUN mkdir -p ${COLCON_WS}/src && \
    cd ${COLCON_WS}/src && \
    git clone -b jazzy https://github.com/ROBOTIS-GIT/turtlebot3.git && \
    cd turtlebot3 && \
    rm -rf turtlebot3_cartographer turtlebot3_navigation2


RUN bash -c "source /opt/ros/${ROS_DISTRO}/setup.bash && \
cd ${COLCON_WS} && \
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release"

RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> ~/.bashrc && \
echo "source ${COLCON_WS}/install/setup.bash" >> ~/.bashrc && \
echo "alias cb='colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release'" >> ~/.bashrc && \
echo "export ROS_DOMAIN_ID=30 # TURTLEBOT3" >> ~/.bashrc && \
echo "export TURTLEBOT3_MODEL= # burger, waffle, waffle_pi" >> ~/.bashrc && \
echo "export LDS_MODEL= # LDS-01, LDS-02, LDS-03" >> ~/.bashrc

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Exporting TURTLEBOT3_MODEL and LDS_MODEL with empty values can lead to runtime errors if scripts expect them to be set. It's more robust and user-friendly to provide sensible defaults. Users can still override them if needed.

    echo "export TURTLEBOT3_MODEL=burger # burger, waffle, waffle_pi" >> ~/.bashrc && \
    echo "export LDS_MODEL=LDS-01 # LDS-01, LDS-02, LDS-03" >> ~/.bashrc


CMD ["bash"]
30 changes: 30 additions & 0 deletions docker/jazzy/sbc/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
services:
turtlebot3:
container_name: turtlebot3
image: robotis/turtlebot3:jazzy-sbc-latest
# build:
# context: .
# dockerfile: Dockerfile.sbc
tty: true
restart: unless-stopped
cap_add:
- SYS_NICE
ulimits:
rtprio: 99
rttime: -1
memlock: 8428281856
network_mode: host
ipc: host
pid: host
environment:
- DISPLAY=${DISPLAY}
- QT_X11_NO_MITSHM=1
volumes:
- /dev:/dev
- /dev/shm:/dev/shm
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- /tmp/.docker.xauth:/tmp/.docker.xauth:rw
- ./workspace:/workspace
- ../../../:/root/turtlebot3_ws/src/turtlebot3
privileged: true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Using privileged: true gives the container full root access to the host machine, which poses a significant security risk. It's highly recommended to avoid this. Instead, consider granting only the necessary capabilities via cap_add and mapping specific devices (e.g., /dev/ttyUSB0) using the devices key. This follows the principle of least privilege.

command: bash
Loading