Skip to content

Conversation

@GyuH13
Copy link
Member

@GyuH13 GyuH13 commented Oct 23, 2025

CHANGED

Dockerfiles, docker-compose.yml, and container.sh files for Humble and Jazzy versions have been added.

NOTE

  • This container environment can be used on both PC and SBC without distinction.

In docker folder :

  • Pull docker image and create container
./container.sh start 
  • Enter the container
./container.sh enter 

Copilot AI review requested due to automatic review settings October 23, 2025 00:26
@github-project-automation github-project-automation bot moved this to 🌱 Todo in Platform Oct 23, 2025
@GyuH13 GyuH13 self-assigned this Oct 23, 2025
@gemini-code-assist
Copy link

Summary of Changes

Hello @GyuH13, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the Dockerization strategy for TurtleBot3 by introducing a structured and modular approach. It now provides dedicated Dockerfiles and Docker Compose configurations tailored for both ROS2 Humble and Jazzy distributions, as well as optimized setups for PC and Single Board Computer environments. This change aims to improve the flexibility, maintainability, and robustness of development and deployment workflows for TurtleBot3 users, ensuring that each platform and ROS version benefits from a purpose-built and efficient Docker image.

Highlights

  • Refactored Docker Setup: The previous monolithic Dockerfile has been replaced with a modular structure, providing distinct Dockerfiles and Docker Compose configurations for different ROS2 distributions and target platforms.
  • ROS2 Distribution Support: Dedicated Docker environments are now available for both ROS2 Humble and Jazzy distributions, ensuring compatibility and optimized setups for each version.
  • Platform-Specific Configurations: Separate Dockerfiles and Docker Compose files have been introduced for PC (Personal Computer) and SBC (Single Board Computer) deployments, allowing for tailored package installations and resource management.
  • Streamlined Package Management: Package installations within the Dockerfiles have been optimized, leveraging ROS apt packages where possible and explicitly managing dependencies for each platform.
  • Enhanced User Experience: The new Docker images include pre-configured bash aliases (e.g., 'cb' for colcon build) and environment variables (ROS_DOMAIN_ID, TURTLEBOT3_MODEL, LDS_MODEL) for convenience.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces standardized Docker support for TurtleBot3 across PC and single-board computer (SBC) configurations for both ROS2 Humble and Jazzy distributions. The changes replace a single monolithic Dockerfile with organized, distribution-specific Docker configurations.

Key Changes:

  • Created separate Dockerfiles and docker-compose configurations for PC and SBC deployments across Humble and Jazzy distributions
  • Standardized container configurations with consistent security and resource settings
  • Removed the legacy root-level Dockerfile in favor of the organized structure

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
docker/jazzy/sbc/docker-compose.yml New compose file for Jazzy SBC deployment with standardized container settings
docker/jazzy/sbc/Dockerfile.sbc New Dockerfile for Jazzy SBC with LiDAR drivers and minimal dependencies
docker/jazzy/pc/docker-compose.yml Updated compose file for Jazzy PC, standardizing settings and volume mounts
docker/jazzy/pc/Dockerfile.pc New Dockerfile for Jazzy PC with desktop, navigation, and cartographer packages
docker/humble/sbc/docker-compose.yml New compose file for Humble SBC deployment with standardized container settings
docker/humble/sbc/Dockerfile.sbc New Dockerfile for Humble SBC with LiDAR drivers and minimal dependencies
docker/humble/pc/docker-compose.yml New compose file for Humble PC deployment with standardized container settings
docker/humble/pc/Dockerfile.pc New Dockerfile for Humble PC with desktop, navigation, and cartographer packages
Dockerfile Removed legacy root-level Dockerfile replaced by organized structure

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines 38 to 39
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.
Comment on lines 38 to 39
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.
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request significantly improves the Docker setup by providing dedicated Dockerfiles and docker-compose files for both PC and SBC platforms across Humble and Jazzy ROS distributions. This modular approach is a great step towards better maintainability. The changes correctly leverage pre-built binaries for dependencies, which is more efficient than building from source. My review includes several suggestions to further enhance the setup, focusing on security by reducing container privileges, improving usability by setting default environment variables, and optimizing the Docker images for SBCs.

- /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.

- /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.

- /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.

- /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.

Comment on lines 38 to 39
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

Comment on lines 29 to 34
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

Comment on lines 44 to 45
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

Comment on lines 38 to 39
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

Comment on lines 29 to 34
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

Comment on lines 44 to 45
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

Signed-off-by: Hyungyu Kim <[email protected]>
Signed-off-by: Hyungyu Kim <[email protected]>
@GyuH13 GyuH13 changed the title Support Dockerfile for pc and sbc Support Dockerfile Nov 13, 2025
Copy link
Member

@sunghowoo sunghowoo left a comment

Choose a reason for hiding this comment

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

LGTM. With Docker in place, dependency problems should be much easier to manage now. Nice work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🌱 Todo

Development

Successfully merging this pull request may close these issues.

4 participants