From 18bac72b5827fd0bdf1bf60883188d489eab4282 Mon Sep 17 00:00:00 2001 From: Kalana Ratnayake Date: Thu, 5 Feb 2026 13:13:00 +1100 Subject: [PATCH 1/5] reduces the size of dockerfiles --- .../turtlebot4-discovery-jazzy-dev.yml | 68 ++++++++++++++ .../workflows/turtlebot4-rviz-jazzy-dev.yml | 66 ++++++++++++++ .../turtlebot4-simulation-jazzy-dev.yml | 68 ++++++++++++++ .../turtlebot4-workspace-jazzy-dev.yml | 68 ++++++++++++++ turtlebot4-discovery/Dockerfile | 30 +++---- turtlebot4-rviz/Dockerfile | 56 +++++------- turtlebot4-simulation/Dockerfile | 89 ++++++++----------- turtlebot4-workspace/Dockerfile | 39 ++------ turtlebot4-workspace/launch-terminal.sh | 11 +-- 9 files changed, 347 insertions(+), 148 deletions(-) create mode 100644 .github/workflows/turtlebot4-discovery-jazzy-dev.yml create mode 100644 .github/workflows/turtlebot4-rviz-jazzy-dev.yml create mode 100644 .github/workflows/turtlebot4-simulation-jazzy-dev.yml create mode 100644 .github/workflows/turtlebot4-workspace-jazzy-dev.yml diff --git a/.github/workflows/turtlebot4-discovery-jazzy-dev.yml b/.github/workflows/turtlebot4-discovery-jazzy-dev.yml new file mode 100644 index 0000000..eea2319 --- /dev/null +++ b/.github/workflows/turtlebot4-discovery-jazzy-dev.yml @@ -0,0 +1,68 @@ +name: Turtlebot4 Discovery Jazzy Build + +on: + workflow_dispatch: + + push: + branches: + - develop + paths: + - turtlebot4-discovery/** + - .github/workflows/turtlebot4-discovery-jazzy-dev.yml + + pull_request: + branches: + - develop + paths: + - turtlebot4-discovery/** + - .github/workflows/turtlebot4-discovery-jazzy-dev.yml + + +env: + REGISTRY: ghcr.io + OWNER: collaborativeroboticslab + IMAGE_NAME: turtlebot4-discovery + +# https://docs.github.com/en/actions/using-jobs/using-concurrency +concurrency: + # only cancel in-progress jobs or runs for the current workflow - matches against branch & tags + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + + build-and-push-image: + runs-on: ubuntu-latest + + permissions: + contents: write + packages: write + + steps: + - name: Remove unnecessary files + run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + + - name: Check out the repository + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to the Container registry + run: | + docker login --username ${{ env.OWNER }} --password ${{ secrets.ACCESS_TOKEN }} ghcr.io + + - name: Build and Push + uses: docker/build-push-action@v5 + with: + context: ./turtlebot4-discovery + file: turtlebot4-discovery/Dockerfile + platforms: linux/amd64 + push: true + tags: | + ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ env.IMAGE_NAME }}:dev \ No newline at end of file diff --git a/.github/workflows/turtlebot4-rviz-jazzy-dev.yml b/.github/workflows/turtlebot4-rviz-jazzy-dev.yml new file mode 100644 index 0000000..06f5087 --- /dev/null +++ b/.github/workflows/turtlebot4-rviz-jazzy-dev.yml @@ -0,0 +1,66 @@ +name: Turtlebot4 Rviz Jazzy Build + +on: + workflow_dispatch: + + push: + branches: + - develop + paths: + - turtlebot4-rviz/** + - .github/workflows/turtlebot4-rviz-jazzy-dev.yml + + pull_request: + branches: + - develop + paths: + - turtlebot4-rviz/** + - .github/workflows/turtlebot4-rviz-jazzy-dev.yml + +env: + REGISTRY: ghcr.io + OWNER: collaborativeroboticslab + IMAGE_NAME: turtlebot4-rviz + +# https://docs.github.com/en/actions/using-jobs/using-concurrency +concurrency: + # only cancel in-progress jobs or runs for the current workflow - matches against branch & tags + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + + permissions: + contents: write + packages: write + + steps: + - name: Remove unnecessary files + run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + + - name: Check out the repository + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to the Container registry + run: | + docker login --username ${{ env.OWNER }} --password ${{ secrets.ACCESS_TOKEN }} ghcr.io + + - name: Build and Push + uses: docker/build-push-action@v5 + with: + context: ./turtlebot4-rviz + file: turtlebot4-rviz/Dockerfile + platforms: linux/amd64 + push: true + tags: | + ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ env.IMAGE_NAME }}:dev diff --git a/.github/workflows/turtlebot4-simulation-jazzy-dev.yml b/.github/workflows/turtlebot4-simulation-jazzy-dev.yml new file mode 100644 index 0000000..fb529f0 --- /dev/null +++ b/.github/workflows/turtlebot4-simulation-jazzy-dev.yml @@ -0,0 +1,68 @@ +name: Turtlebot4 GZ Simulation Jazzy Build + +on: + workflow_dispatch: + + push: + branches: + - develop + paths: + - turtlebot4-simulation/** + - .github/workflows/turtlebot4-simulation-jazzy-dev.yml + + pull_request: + branches: + - develop + paths: + - turtlebot4-simulation/** + - .github/workflows/turtlebot4-simulation-jazzy-dev.yml + + +env: + REGISTRY: ghcr.io + OWNER: collaborativeroboticslab + IMAGE_NAME: turtlebot4-simulation + +# https://docs.github.com/en/actions/using-jobs/using-concurrency +concurrency: + # only cancel in-progress jobs or runs for the current workflow - matches against branch & tags + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + + build-and-push-image: + runs-on: ubuntu-latest + + permissions: + contents: write + packages: write + + steps: + - name: Remove unnecessary files + run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + + - name: Check out the repository + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to the Container registry + run: | + docker login --username ${{ env.OWNER }} --password ${{ secrets.ACCESS_TOKEN }} ghcr.io + + - name: Build and Push + uses: docker/build-push-action@v5 + with: + context: . + file: turtlebot4-simulation/Dockerfile + platforms: linux/amd64 + push: true + tags: | + ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ env.IMAGE_NAME }}:dev \ No newline at end of file diff --git a/.github/workflows/turtlebot4-workspace-jazzy-dev.yml b/.github/workflows/turtlebot4-workspace-jazzy-dev.yml new file mode 100644 index 0000000..b3bc930 --- /dev/null +++ b/.github/workflows/turtlebot4-workspace-jazzy-dev.yml @@ -0,0 +1,68 @@ +name: Turtlebot4 Workspace Jazzy Build + +on: + workflow_dispatch: + + push: + branches: + - develop + paths: + - turtlebot4-workspace/** + - .github/workflows/turtlebot4-workspace-jazzy-dev.yml + + pull_request: + branches: + - develop + paths: + - turtlebot4-workspace/** + - .github/workflows/turtlebot4-workspace-jazzy-dev.yml + + +env: + REGISTRY: ghcr.io + OWNER: collaborativeroboticslab + IMAGE_NAME: turtlebot4-workspace + +# https://docs.github.com/en/actions/using-jobs/using-concurrency +concurrency: + # only cancel in-progress jobs or runs for the current workflow - matches against branch & tags + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + + build-and-push-image: + runs-on: ubuntu-latest + + permissions: + contents: write + packages: write + + steps: + - name: Remove unnecessary files + run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + + - name: Check out the repository + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to the Container registry + run: | + docker login --username ${{ env.OWNER }} --password ${{ secrets.ACCESS_TOKEN }} ghcr.io + + - name: Build and Push + uses: docker/build-push-action@v5 + with: + context: ./turtlebot4-workspace + file: turtlebot4-workspace/Dockerfile + platforms: linux/amd64 + push: true + tags: | + ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ env.IMAGE_NAME }}:dev \ No newline at end of file diff --git a/turtlebot4-discovery/Dockerfile b/turtlebot4-discovery/Dockerfile index f0439b4..fb56093 100644 --- a/turtlebot4-discovery/Dockerfile +++ b/turtlebot4-discovery/Dockerfile @@ -1,27 +1,21 @@ FROM ros:jazzy -# Install dependencies - -RUN apt update && \ - apt install -y --no-install-recommends ros-jazzy-rmw-fastrtps-cpp - -# Clean up -RUN apt-get clean && rm -rf /var/lib/apt/lists/* - -# Set environment variables -ENV RMW_IMPLEMENTATION=rmw_fastrtps_cpp -ENV ROS_DOMAIN_ID=0 -ENV SERVER_ID=0 -ENV SERVER_IP=127.0.0.1 -ENV SERVER_PORT=11811 +ENV DEBIAN_FRONTEND=noninteractive \ + RMW_IMPLEMENTATION=rmw_fastrtps_cpp \ + ROS_DOMAIN_ID=0 \ + SERVER_ID=0 \ + SERVER_IP=127.0.0.1 \ + SERVER_PORT=11811 + +# Install only the needed RMW implementation and clean up in one layer +RUN apt-get update && \ + apt-get install -y --no-install-recommends ros-jazzy-rmw-fastrtps-cpp && \ + rm -rf /var/lib/apt/lists/* # Expose Fast DDS Discovery Server UDP port (optional if server runs here) EXPOSE ${SERVER_PORT}/udp -# Copy entrypoint script -COPY ros_entrypoint.sh ros_entrypoint.sh - -# Ensure entrypoint is executable and used +COPY ros_entrypoint.sh /ros_entrypoint.sh RUN chmod +x /ros_entrypoint.sh ENTRYPOINT ["/ros_entrypoint.sh"] diff --git a/turtlebot4-rviz/Dockerfile b/turtlebot4-rviz/Dockerfile index 7a5a382..08047dc 100644 --- a/turtlebot4-rviz/Dockerfile +++ b/turtlebot4-rviz/Dockerfile @@ -1,44 +1,28 @@ FROM ros:jazzy +FROM ros:jazzy -# Install dependencies - -RUN apt update && \ - apt install -y --no-install-recommends ros-jazzy-turtlebot4-description \ - ros-jazzy-turtlebot4-msgs \ - ros-jazzy-turtlebot4-navigation \ - ros-jazzy-turtlebot4-node \ - ros-jazzy-turtlebot4-desktop \ - ros-jazzy-rmw-fastrtps-cpp \ - ros-jazzy-navigation2 \ - ros-jazzy-nav2-bringup \ - ros-jazzy-slam-toolbox - -# Install x11 apps dependencies +ENV DEBIAN_FRONTEND=noninteractive \ + RMW_IMPLEMENTATION=rmw_fastrtps_cpp \ + ROS_DOMAIN_ID=0 \ + ROS_DISCOVERY_SERVER=127.0.0.1:11811 \ + QT_X11_NO_MITSHM=1 +# Install only required ROS packages; rely on their GUI deps RUN apt-get update && \ - apt-get install -y --no-install-recommends libx11-6 \ - libxext6 \ - libxrender1 \ - libxtst6 \ - libxi6 \ - libgtk-3-0 \ - x11-xserver-utils \ - ffmpeg \ - libsm6 \ - unzip \ - findutils - -# Clean up -RUN apt-get clean && rm -rf /var/lib/apt/lists/* - -# Set environment variables -ENV RMW_IMPLEMENTATION=rmw_fastrtps_cpp -ENV ROS_DOMAIN_ID=0 -ENV ROS_DISCOVERY_SERVER=127.0.0.1:11811 + apt-get install -y --no-install-recommends \ + ros-jazzy-turtlebot4-description \ + ros-jazzy-turtlebot4-msgs \ + ros-jazzy-turtlebot4-navigation \ + ros-jazzy-turtlebot4-node \ + ros-jazzy-turtlebot4-desktop \ + ros-jazzy-rmw-fastrtps-cpp \ + ros-jazzy-navigation2 \ + ros-jazzy-nav2-bringup \ + ros-jazzy-slam-toolbox && \ + rm -rf /var/lib/apt/lists/* # Copy entrypoint script -COPY ros_entrypoint.sh ros_entrypoint.sh - +COPY ros_entrypoint.sh /ros_entrypoint.sh RUN chmod +x /ros_entrypoint.sh -ENTRYPOINT [ "/ros_entrypoint.sh" ] \ No newline at end of file +ENTRYPOINT ["/ros_entrypoint.sh"] \ No newline at end of file diff --git a/turtlebot4-simulation/Dockerfile b/turtlebot4-simulation/Dockerfile index 9015585..3434596 100644 --- a/turtlebot4-simulation/Dockerfile +++ b/turtlebot4-simulation/Dockerfile @@ -1,69 +1,52 @@ -FROM ros:jazzy AS base +FROM ros:jazzy -# Install dependencies +ENV DEBIAN_FRONTEND=noninteractive \ + WORKSPACE_ROOT=/turtle_ws \ + RMW_IMPLEMENTATION=rmw_fastrtps_cpp \ + ROS_DOMAIN_ID=0 \ + ROS_DISCOVERY_SERVER=127.0.0.1:11811 \ + QT_X11_NO_MITSHM=1 -RUN apt update && \ - apt install -y --no-install-recommends \ - git \ - ros-jazzy-irobot-create-* \ - ros-jazzy-rmw-fastrtps-cpp \ - ros-dev-tools \ - ros-jazzy-navigation2 \ - ros-jazzy-nav2-bringup \ - ros-jazzy-slam-toolbox - -# Install Gazebo packages - -RUN apt install -y curl && \ - curl https://packages.osrfoundation.org/gazebo.gpg --output /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg && \ - echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null && \ - apt update && \ - apt install --no-install-recommends -y gz-harmonic - -# Install x11 apps dependencies +# Core ROS dependencies and build tools RUN apt-get update && \ - apt-get install -y --no-install-recommends libx11-6 \ - libxext6 \ - libxrender1 \ - libxtst6 \ - libxi6 \ - libgtk-3-0 \ - x11-xserver-utils \ - ffmpeg \ - libsm6 \ - unzip \ - findutils - -# Clean up -RUN apt-get clean && rm -rf /var/lib/apt/lists/* + apt-get install -y --no-install-recommends \ + git \ + ros-dev-tools \ + ros-jazzy-irobot-create-* \ + ros-jazzy-rmw-fastrtps-cpp \ + ros-jazzy-navigation2 \ + ros-jazzy-nav2-bringup \ + ros-jazzy-slam-toolbox \ + curl && \ + curl https://packages.osrfoundation.org/gazebo.gpg --output /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg && \ + echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" > /etc/apt/sources.list.d/gazebo-stable.list && \ + apt-get update && \ + apt-get install -y --no-install-recommends gz-harmonic && \ + rm -rf /var/lib/apt/lists/* ## Set up workspace -ENV WORKSPACE_ROOT=/turtle_ws - -# Create and clone workspace WORKDIR ${WORKSPACE_ROOT}/src -# Clone turtlebot4 simulation packages (with modified render engine) -RUN git clone -b jazzy https://github.com/CollaborativeRoboticsLab/turtlebot4.git -RUN git clone -b jazzy https://github.com/turtlebot/turtlebot4_simulator.git -RUN git clone -b jazzy https://github.com/turtlebot/turtlebot4_desktop.git +# Clone turtlebot4 simulation packages +RUN git clone -b jazzy https://github.com/CollaborativeRoboticsLab/turtlebot4.git && \ + git clone -b jazzy https://github.com/turtlebot/turtlebot4_simulator.git && \ + git clone -b jazzy https://github.com/turtlebot/turtlebot4_desktop.git WORKDIR ${WORKSPACE_ROOT} -## Build the workspace -RUN . /opt/ros/jazzy/setup.sh && \ - colcon build +## Build the workspace (merged install to reduce size) +RUN . /opt/ros/jazzy/setup.sh && colcon build -WORKDIR / +RUN rm -rf build/ src/ log/ -# Set environment variables -ENV RMW_IMPLEMENTATION=rmw_fastrtps_cpp -ENV ROS_DOMAIN_ID=0 -ENV ROS_DISCOVERY_SERVER=127.0.0.1:11811 +# Remove build-time tools to slim the image (keep runtime deps intact) +RUN apt-get purge -y --auto-remove git ros-dev-tools curl && \ + rm -rf /var/lib/apt/lists/* /var/cache/apt/* /tmp/* /var/tmp/* -# Copy entrypoint script -COPY turtlebot4-simulation/ros_entrypoint.sh ros_entrypoint.sh +WORKDIR / +# Copy entrypoint script +COPY turtlebot4-simulation/ros_entrypoint.sh /ros_entrypoint.sh RUN chmod +x /ros_entrypoint.sh -ENTRYPOINT [ "/ros_entrypoint.sh" ] \ No newline at end of file +ENTRYPOINT ["/ros_entrypoint.sh"] \ No newline at end of file diff --git a/turtlebot4-workspace/Dockerfile b/turtlebot4-workspace/Dockerfile index ecd7761..5c4d0e1 100644 --- a/turtlebot4-workspace/Dockerfile +++ b/turtlebot4-workspace/Dockerfile @@ -1,43 +1,18 @@ FROM ros:jazzy -# Install dependencies - +## Install ROS dependencies and minimal terminal (xterm only) RUN apt-get update && \ - apt-get install -y --no-install-recommends ros-jazzy-turtlebot4-description \ + apt-get install -y --no-install-recommends \ + ros-jazzy-turtlebot4-description \ ros-jazzy-turtlebot4-msgs \ ros-jazzy-turtlebot4-navigation \ ros-jazzy-turtlebot4-node \ ros-jazzy-rmw-fastrtps-cpp \ ros-jazzy-navigation2 \ ros-jazzy-nav2-bringup \ - ros-jazzy-slam-toolbox - -# Install x11 apps dependencies -RUN apt-get update && \ - apt-get install -y --no-install-recommends libx11-6 \ - libxext6 \ - libxrender1 \ - libxtst6 \ - libxi6 \ - libgtk-3-0 \ - x11-xserver-utils \ - ffmpeg \ - libsm6 \ - unzip \ - findutils \ - gnome-terminal \ - dbus-x11 \ - gsettings-desktop-schemas \ - dconf-service \ - libglib2.0-bin \ - libcanberra-gtk3-module \ - libcanberra-gtk-module \ - at-spi2-core \ - libatk-bridge2.0-0 \ - xterm - -# Clean up -RUN apt-get clean && rm -rf /var/lib/apt/lists/* + ros-jazzy-slam-toolbox \ + xterm && \ + rm -rf /var/lib/apt/lists/* # Set environment variables ENV RMW_IMPLEMENTATION=rmw_fastrtps_cpp @@ -45,6 +20,7 @@ ENV ROS_DOMAIN_ID=0 ENV ROS_DISCOVERY_SERVER=127.0.0.1:11811 ENV TERM=xterm-256color ENV NO_AT_BRIDGE=1 +ENV QT_X11_NO_MITSHM=1 ENV LANG=C.UTF-8 ENV LC_ALL=C.UTF-8 @@ -58,3 +34,4 @@ RUN chmod +x /usr/local/bin/launch-terminal.sh # Ensure the entrypoint script is used ENTRYPOINT ["/ros_entrypoint.sh"] +CMD ["/usr/local/bin/launch-terminal.sh"] diff --git a/turtlebot4-workspace/launch-terminal.sh b/turtlebot4-workspace/launch-terminal.sh index 79ef16f..5812ebd 100644 --- a/turtlebot4-workspace/launch-terminal.sh +++ b/turtlebot4-workspace/launch-terminal.sh @@ -1,14 +1,5 @@ #!/bin/bash set -e -# Prefer gnome-terminal via dbus-launch; fallback to xterm -if command -v gnome-terminal >/dev/null 2>&1; then - if command -v dbus-launch >/dev/null 2>&1; then - dbus-launch gnome-terminal --wait -- bash -i && exit 0 - else - gnome-terminal --wait -- bash -i && exit 0 - fi -fi - -# Fallback to xterm +# Always launch xterm for a minimal footprint exec xterm -fa 'Monospace' -fs 11 -geometry 120x30 -e bash -i From 77603ba22550fee8501b0b5ea714ab126b4eb113 Mon Sep 17 00:00:00 2001 From: Kalana Ratnayake Date: Thu, 5 Feb 2026 14:59:21 +1100 Subject: [PATCH 2/5] replaced xterm with code-server --- .../turtlebot4-discovery-jazzy-dev.yml | 2 +- .../workflows/turtlebot4-rviz-jazzy-dev.yml | 2 +- .../turtlebot4-simulation-jazzy-dev.yml | 2 +- .../turtlebot4-workspace-jazzy-dev.yml | 2 +- compose-physical.yaml | 22 ++-------- compose.yaml | 28 ++++--------- turtlebot4-workspace/Dockerfile | 41 +++++++++++-------- turtlebot4-workspace/launch-terminal.sh | 5 --- 8 files changed, 39 insertions(+), 65 deletions(-) delete mode 100644 turtlebot4-workspace/launch-terminal.sh diff --git a/.github/workflows/turtlebot4-discovery-jazzy-dev.yml b/.github/workflows/turtlebot4-discovery-jazzy-dev.yml index eea2319..f61e9e3 100644 --- a/.github/workflows/turtlebot4-discovery-jazzy-dev.yml +++ b/.github/workflows/turtlebot4-discovery-jazzy-dev.yml @@ -1,4 +1,4 @@ -name: Turtlebot4 Discovery Jazzy Build +name: Turtlebot4 Discovery Jazzy Dev Build on: workflow_dispatch: diff --git a/.github/workflows/turtlebot4-rviz-jazzy-dev.yml b/.github/workflows/turtlebot4-rviz-jazzy-dev.yml index 06f5087..ccc4fba 100644 --- a/.github/workflows/turtlebot4-rviz-jazzy-dev.yml +++ b/.github/workflows/turtlebot4-rviz-jazzy-dev.yml @@ -1,4 +1,4 @@ -name: Turtlebot4 Rviz Jazzy Build +name: Turtlebot4 Rviz Jazzy Dev Build on: workflow_dispatch: diff --git a/.github/workflows/turtlebot4-simulation-jazzy-dev.yml b/.github/workflows/turtlebot4-simulation-jazzy-dev.yml index fb529f0..6b0254b 100644 --- a/.github/workflows/turtlebot4-simulation-jazzy-dev.yml +++ b/.github/workflows/turtlebot4-simulation-jazzy-dev.yml @@ -1,4 +1,4 @@ -name: Turtlebot4 GZ Simulation Jazzy Build +name: Turtlebot4 GZ Simulation Jazzy Dev Build on: workflow_dispatch: diff --git a/.github/workflows/turtlebot4-workspace-jazzy-dev.yml b/.github/workflows/turtlebot4-workspace-jazzy-dev.yml index b3bc930..a395d75 100644 --- a/.github/workflows/turtlebot4-workspace-jazzy-dev.yml +++ b/.github/workflows/turtlebot4-workspace-jazzy-dev.yml @@ -1,4 +1,4 @@ -name: Turtlebot4 Workspace Jazzy Build +name: Turtlebot4 Workspace Jazzy Dev Build on: workflow_dispatch: diff --git a/compose-physical.yaml b/compose-physical.yaml index 3e6469e..76bc574 100644 --- a/compose-physical.yaml +++ b/compose-physical.yaml @@ -1,6 +1,6 @@ services: turtlebot4-rviz: - image: ghcr.io/collaborativeroboticslab/turtlebot4-rviz:jazzy + image: ghcr.io/collaborativeroboticslab/turtlebot4-rviz:dev command: ["ros2", "launch", "turtlebot4_viz", "view_navigation.launch.py"] # command: ["ros2", "launch", "turtlebot4_viz", "view_diagnostics.launch.py"] environment: @@ -28,32 +28,18 @@ services: - /tmp/.X11-unix:/tmp/.X11-unix:rw # GUI related turtlebot4-workspace: - image: ghcr.io/collaborativeroboticslab/turtlebot4-workspace:jazzy - command: ["/usr/local/bin/launch-terminal.sh"] + image: ghcr.io/collaborativeroboticslab/turtlebot4-workspace:dev environment: - - PYTHONUNBUFFERED=1 # GUI related - - DISPLAY # GUI related - - QT_X11_NO_MITSHM=1 # GUI related - - NVIDIA_VISIBLE_DEVICES=all # GUI related - - NVIDIA_DRIVER_CAPABILITIES=all # GUI related + - PASSWORD=student # code-server login - ROS_DOMAIN_ID=10 - RMW_IMPLEMENTATION=rmw_fastrtps_cpp - ROS_DISCOVERY_SERVER=10.42.0.1:11811 - ROS_SUPER_CLIENT=1 - NO_AT_BRIDGE=1 restart: unless-stopped - privileged: true - deploy: - resources: - reservations: - devices: - - driver: nvidia - count: 1 - capabilities: [gpu] network_mode: host ipc: host tty: true stdin_open: true volumes: - - /tmp/.X11-unix:/tmp/.X11-unix:rw # GUI related - - ./turtlebot4-workspace/turtle_ws/src:/turtle_ws/src:rw \ No newline at end of file + - ./turtlebot4-workspace/workspace:/workspace:rw \ No newline at end of file diff --git a/compose.yaml b/compose.yaml index 755c9f4..b107697 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,6 +1,6 @@ services: turtlebot4-discovery: - image: ghcr.io/collaborativeroboticslab/turtlebot4-discovery:jazzy + image: ghcr.io/collaborativeroboticslab/turtlebot4-discovery:dev environment: - ROS_DOMAIN_ID=0 - RMW_IMPLEMENTATION=rmw_fastrtps_cpp @@ -12,8 +12,8 @@ services: restart: unless-stopped turtlebot4-simulation: - image: ghcr.io/collaborativeroboticslab/turtlebot4-simulation:jazzy - command: ["ros2", "launch", "turtlebot4_gz_bringup", "turtlebot4_gz.launch.py", "nav2:=true", "localization:=true", "slam:=false", "use_sim_time:=true"] + image: ghcr.io/collaborativeroboticslab/turtlebot4-simulation:dev + command: ["ros2", "launch", "turtlebot4_gz_bringup", "turtlebot4_gz.launch.py", "use_sim_time:=true"] environment: - PYTHONUNBUFFERED=1 # GUI related - DISPLAY # GUI related @@ -42,7 +42,7 @@ services: - turtlebot4-discovery turtlebot4-rviz: - image: ghcr.io/collaborativeroboticslab/turtlebot4-rviz:jazzy + image: ghcr.io/collaborativeroboticslab/turtlebot4-rviz:dev command: ["ros2", "launch", "turtlebot4_viz", "view_navigation.launch.py", "use_sim_time:=true"] environment: - PYTHONUNBUFFERED=1 # GUI related @@ -70,33 +70,19 @@ services: - turtlebot4-discovery turtlebot4-workspace: - image: ghcr.io/collaborativeroboticslab/turtlebot4-workspace:jazzy - command: ["/usr/local/bin/launch-terminal.sh"] + image: ghcr.io/collaborativeroboticslab/turtlebot4-workspace:dev environment: - - PYTHONUNBUFFERED=1 # GUI related - - DISPLAY # GUI related - - QT_X11_NO_MITSHM=1 # GUI related - - NVIDIA_VISIBLE_DEVICES=all # GUI related - - NVIDIA_DRIVER_CAPABILITIES=all # GUI related + - PASSWORD=student # code-server login - ROS_DOMAIN_ID=10 - RMW_IMPLEMENTATION=rmw_fastrtps_cpp - ROS_DISCOVERY_SERVER=127.0.0.1:11811 - NO_AT_BRIDGE=1 restart: unless-stopped - privileged: true - deploy: - resources: - reservations: - devices: - - driver: nvidia - count: 1 - capabilities: [gpu] tty: true stdin_open: true network_mode: host ipc: host volumes: - - /tmp/.X11-unix:/tmp/.X11-unix:rw # GUI related - - ./turtlebot4-workspace/turtle_ws/src:/turtle_ws/src:rw + - ./turtlebot4-workspace/workspace:/workspace:rw depends_on: - turtlebot4-discovery \ No newline at end of file diff --git a/turtlebot4-workspace/Dockerfile b/turtlebot4-workspace/Dockerfile index 5c4d0e1..ddb7963 100644 --- a/turtlebot4-workspace/Dockerfile +++ b/turtlebot4-workspace/Dockerfile @@ -1,18 +1,23 @@ FROM ros:jazzy -## Install ROS dependencies and minimal terminal (xterm only) +## Install ROS dependencies and code-server +ARG CODE_SERVER_VERSION=4.91.0 RUN apt-get update && \ - apt-get install -y --no-install-recommends \ - ros-jazzy-turtlebot4-description \ - ros-jazzy-turtlebot4-msgs \ - ros-jazzy-turtlebot4-navigation \ - ros-jazzy-turtlebot4-node \ - ros-jazzy-rmw-fastrtps-cpp \ - ros-jazzy-navigation2 \ - ros-jazzy-nav2-bringup \ - ros-jazzy-slam-toolbox \ - xterm && \ - rm -rf /var/lib/apt/lists/* + apt-get install -y --no-install-recommends \ + ros-jazzy-turtlebot4-description \ + ros-jazzy-turtlebot4-msgs \ + ros-jazzy-turtlebot4-navigation \ + ros-jazzy-turtlebot4-node \ + ros-jazzy-rmw-fastrtps-cpp \ + ros-jazzy-navigation2 \ + ros-jazzy-nav2-bringup \ + ros-jazzy-slam-toolbox \ + curl \ + ca-certificates && \ + curl -fOL https://github.com/coder/code-server/releases/download/v${CODE_SERVER_VERSION}/code-server_${CODE_SERVER_VERSION}_amd64.deb && \ + apt-get install -y --no-install-recommends ./code-server_${CODE_SERVER_VERSION}_amd64.deb && \ + rm -f code-server_${CODE_SERVER_VERSION}_amd64.deb && \ + rm -rf /var/lib/apt/lists/* # Set environment variables ENV RMW_IMPLEMENTATION=rmw_fastrtps_cpp @@ -24,14 +29,16 @@ ENV QT_X11_NO_MITSHM=1 ENV LANG=C.UTF-8 ENV LC_ALL=C.UTF-8 +# Default workspace served by code-server +WORKDIR /workspace + +# Expose code-server port +EXPOSE 8080 + # Copy entrypoint script COPY ros_entrypoint.sh /ros_entrypoint.sh RUN chmod +x /ros_entrypoint.sh -# Terminal launcher script -COPY launch-terminal.sh /usr/local/bin/launch-terminal.sh -RUN chmod +x /usr/local/bin/launch-terminal.sh - # Ensure the entrypoint script is used ENTRYPOINT ["/ros_entrypoint.sh"] -CMD ["/usr/local/bin/launch-terminal.sh"] +CMD ["/usr/bin/code-server", "--bind-addr", "0.0.0.0:8080", "--auth", "password", "--disable-telemetry", "/workspace"] diff --git a/turtlebot4-workspace/launch-terminal.sh b/turtlebot4-workspace/launch-terminal.sh deleted file mode 100644 index 5812ebd..0000000 --- a/turtlebot4-workspace/launch-terminal.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -set -e - -# Always launch xterm for a minimal footprint -exec xterm -fa 'Monospace' -fs 11 -geometry 120x30 -e bash -i From 3bd4476e79bc8296b3b2ecbabb024a27cf630f4d Mon Sep 17 00:00:00 2001 From: Kalana Ratnayake Date: Thu, 5 Feb 2026 15:33:32 +1100 Subject: [PATCH 3/5] test --- compose.yaml | 2 ++ turtlebot4-simulation/Dockerfile | 17 +++++++++-------- .../code-server/config/config.yaml | 4 ++++ .../data/coder-logs/code-server-stderr.log | 0 .../data/coder-logs/code-server-stdout.log | 16 ++++++++++++++++ 5 files changed, 31 insertions(+), 8 deletions(-) create mode 100644 turtlebot4-workspace/code-server/config/config.yaml create mode 100644 turtlebot4-workspace/code-server/data/coder-logs/code-server-stderr.log create mode 100644 turtlebot4-workspace/code-server/data/coder-logs/code-server-stdout.log diff --git a/compose.yaml b/compose.yaml index b107697..5d159a3 100644 --- a/compose.yaml +++ b/compose.yaml @@ -84,5 +84,7 @@ services: ipc: host volumes: - ./turtlebot4-workspace/workspace:/workspace:rw + - ./turtlebot4-workspace/code-server/config:/root/.config/code-server:rw + - ./turtlebot4-workspace/code-server/data:/root/.local/share/code-server:rw depends_on: - turtlebot4-discovery \ No newline at end of file diff --git a/turtlebot4-simulation/Dockerfile b/turtlebot4-simulation/Dockerfile index 3434596..fcc26a5 100644 --- a/turtlebot4-simulation/Dockerfile +++ b/turtlebot4-simulation/Dockerfile @@ -10,14 +10,15 @@ ENV DEBIAN_FRONTEND=noninteractive \ # Core ROS dependencies and build tools RUN apt-get update && \ apt-get install -y --no-install-recommends \ - git \ - ros-dev-tools \ - ros-jazzy-irobot-create-* \ - ros-jazzy-rmw-fastrtps-cpp \ - ros-jazzy-navigation2 \ - ros-jazzy-nav2-bringup \ - ros-jazzy-slam-toolbox \ - curl && \ + git \ + ros-dev-tools \ + ros-jazzy-irobot-create-* \ + ros-jazzy-irobot-create-gz-bringup \ + ros-jazzy-rmw-fastrtps-cpp \ + ros-jazzy-navigation2 \ + ros-jazzy-nav2-bringup \ + ros-jazzy-slam-toolbox \ + curl && \ curl https://packages.osrfoundation.org/gazebo.gpg --output /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg && \ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" > /etc/apt/sources.list.d/gazebo-stable.list && \ apt-get update && \ diff --git a/turtlebot4-workspace/code-server/config/config.yaml b/turtlebot4-workspace/code-server/config/config.yaml new file mode 100644 index 0000000..0e585b6 --- /dev/null +++ b/turtlebot4-workspace/code-server/config/config.yaml @@ -0,0 +1,4 @@ +bind-addr: 127.0.0.1:8080 +auth: password +password: 4e2a8d4e1ec8c7c269d5e6ec +cert: false diff --git a/turtlebot4-workspace/code-server/data/coder-logs/code-server-stderr.log b/turtlebot4-workspace/code-server/data/coder-logs/code-server-stderr.log new file mode 100644 index 0000000..e69de29 diff --git a/turtlebot4-workspace/code-server/data/coder-logs/code-server-stdout.log b/turtlebot4-workspace/code-server/data/coder-logs/code-server-stdout.log new file mode 100644 index 0000000..ced4e2b --- /dev/null +++ b/turtlebot4-workspace/code-server/data/coder-logs/code-server-stdout.log @@ -0,0 +1,16 @@ +[2026-02-05T04:30:06.173Z] info code-server 4.91.0 fb3e3e1546d571e9973e86482bcd925c1918ec27 +[2026-02-05T04:30:06.173Z] info Using user-data-dir /root/.local/share/code-server +[2026-02-05T04:30:06.184Z] info Using config file /root/.config/code-server/config.yaml +[2026-02-05T04:30:06.184Z] info HTTP server listening on http://0.0.0.0:8080/ +[2026-02-05T04:30:06.184Z] info - Authentication is enabled +[2026-02-05T04:30:06.184Z] info - Using password from $PASSWORD +[2026-02-05T04:30:06.184Z] info - Not serving HTTPS +[2026-02-05T04:30:06.184Z] info Session server listening on /root/.local/share/code-server/code-server-ipc.sock +[2026-02-05T04:30:46.469Z] info code-server 4.91.0 fb3e3e1546d571e9973e86482bcd925c1918ec27 +[2026-02-05T04:30:46.470Z] info Using user-data-dir /root/.local/share/code-server +[2026-02-05T04:30:46.479Z] info Using config file /root/.config/code-server/config.yaml +[2026-02-05T04:30:46.479Z] info HTTP server listening on http://0.0.0.0:8080/ +[2026-02-05T04:30:46.479Z] info - Authentication is enabled +[2026-02-05T04:30:46.479Z] info - Using password from $PASSWORD +[2026-02-05T04:30:46.479Z] info - Not serving HTTPS +[2026-02-05T04:30:46.479Z] info Session server listening on /root/.local/share/code-server/code-server-ipc.sock From 9b182a21db583cbdc492a3c98d54033e8a67550d Mon Sep 17 00:00:00 2001 From: Kalana Ratnayake Date: Thu, 5 Feb 2026 15:40:40 +1100 Subject: [PATCH 4/5] minor change --- .gitignore | 4 +++- turtlebot4-simulation/Dockerfile | 5 ----- .../code-server/config/config.yaml | 4 ---- .../data/coder-logs/code-server-stderr.log | 0 .../data/coder-logs/code-server-stdout.log | 16 ---------------- 5 files changed, 3 insertions(+), 26 deletions(-) delete mode 100644 turtlebot4-workspace/code-server/config/config.yaml delete mode 100644 turtlebot4-workspace/code-server/data/coder-logs/code-server-stderr.log delete mode 100644 turtlebot4-workspace/code-server/data/coder-logs/code-server-stdout.log diff --git a/.gitignore b/.gitignore index 13c1c1d..69c3115 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ turtlebot4-simulation/gazebo_data -turtlebot4-simulation/rviz \ No newline at end of file +turtlebot4-simulation/rviz +turtlebot4-workspace/code-server +turtlebot4-workspace/workspace \ No newline at end of file diff --git a/turtlebot4-simulation/Dockerfile b/turtlebot4-simulation/Dockerfile index fcc26a5..bb6e559 100644 --- a/turtlebot4-simulation/Dockerfile +++ b/turtlebot4-simulation/Dockerfile @@ -13,7 +13,6 @@ RUN apt-get update && \ git \ ros-dev-tools \ ros-jazzy-irobot-create-* \ - ros-jazzy-irobot-create-gz-bringup \ ros-jazzy-rmw-fastrtps-cpp \ ros-jazzy-navigation2 \ ros-jazzy-nav2-bringup \ @@ -40,10 +39,6 @@ RUN . /opt/ros/jazzy/setup.sh && colcon build RUN rm -rf build/ src/ log/ -# Remove build-time tools to slim the image (keep runtime deps intact) -RUN apt-get purge -y --auto-remove git ros-dev-tools curl && \ - rm -rf /var/lib/apt/lists/* /var/cache/apt/* /tmp/* /var/tmp/* - WORKDIR / # Copy entrypoint script diff --git a/turtlebot4-workspace/code-server/config/config.yaml b/turtlebot4-workspace/code-server/config/config.yaml deleted file mode 100644 index 0e585b6..0000000 --- a/turtlebot4-workspace/code-server/config/config.yaml +++ /dev/null @@ -1,4 +0,0 @@ -bind-addr: 127.0.0.1:8080 -auth: password -password: 4e2a8d4e1ec8c7c269d5e6ec -cert: false diff --git a/turtlebot4-workspace/code-server/data/coder-logs/code-server-stderr.log b/turtlebot4-workspace/code-server/data/coder-logs/code-server-stderr.log deleted file mode 100644 index e69de29..0000000 diff --git a/turtlebot4-workspace/code-server/data/coder-logs/code-server-stdout.log b/turtlebot4-workspace/code-server/data/coder-logs/code-server-stdout.log deleted file mode 100644 index ced4e2b..0000000 --- a/turtlebot4-workspace/code-server/data/coder-logs/code-server-stdout.log +++ /dev/null @@ -1,16 +0,0 @@ -[2026-02-05T04:30:06.173Z] info code-server 4.91.0 fb3e3e1546d571e9973e86482bcd925c1918ec27 -[2026-02-05T04:30:06.173Z] info Using user-data-dir /root/.local/share/code-server -[2026-02-05T04:30:06.184Z] info Using config file /root/.config/code-server/config.yaml -[2026-02-05T04:30:06.184Z] info HTTP server listening on http://0.0.0.0:8080/ -[2026-02-05T04:30:06.184Z] info - Authentication is enabled -[2026-02-05T04:30:06.184Z] info - Using password from $PASSWORD -[2026-02-05T04:30:06.184Z] info - Not serving HTTPS -[2026-02-05T04:30:06.184Z] info Session server listening on /root/.local/share/code-server/code-server-ipc.sock -[2026-02-05T04:30:46.469Z] info code-server 4.91.0 fb3e3e1546d571e9973e86482bcd925c1918ec27 -[2026-02-05T04:30:46.470Z] info Using user-data-dir /root/.local/share/code-server -[2026-02-05T04:30:46.479Z] info Using config file /root/.config/code-server/config.yaml -[2026-02-05T04:30:46.479Z] info HTTP server listening on http://0.0.0.0:8080/ -[2026-02-05T04:30:46.479Z] info - Authentication is enabled -[2026-02-05T04:30:46.479Z] info - Using password from $PASSWORD -[2026-02-05T04:30:46.479Z] info - Not serving HTTPS -[2026-02-05T04:30:46.479Z] info Session server listening on /root/.local/share/code-server/code-server-ipc.sock From 6ffdffcdfbe4aa95a6553bd69809ab004c01544c Mon Sep 17 00:00:00 2001 From: Kalana Ratnayake Date: Thu, 5 Feb 2026 16:09:32 +1100 Subject: [PATCH 5/5] finalized --- README.md | 37 +++++++++++++++++++++++++++++++------ compose.yaml | 7 +++++-- docs/containers.md | 19 +++++++++++++++++-- docs/troubleshooting.md | 6 +++++- 4 files changed, 58 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index c3c6daa..ee2640c 100644 --- a/README.md +++ b/README.md @@ -54,11 +54,17 @@ Pull the latest docker containers docker compose pull ``` -Allow permission for UI interfaces from docker containers -```bash -# Allow local-root X11 access for GUI apps in containers -xhost +local:root -``` +### Workspace via code-server + +When the stack is up, the workspace container serves a web VS Code at http://127.0.0.1:8080. + +- Default password: `student` (set via `PASSWORD` in compose) +- Workspace folder: `/workspace` (mounted from `./turtlebot4-workspace/workspace`) +- Settings/extensions persist to: + - `./turtlebot4-workspace/code-server/config` → `/root/.config/code-server` + - `./turtlebot4-workspace/code-server/data` → `/root/.local/share/code-server` + +To change the password, edit the `PASSWORD` env in [compose.yaml](compose.yaml) under the `turtlebot4-workspace` service.
@@ -78,6 +84,12 @@ Start the docker containers docker compose up ``` +For GUI containers (simulation, rviz), allow X11 access on the host if needed: +```bash +# Allow local-root X11 access for GUI apps in containers +xhost +local:root +``` + ## Using the Physical robot and remote pc ### Mapping @@ -147,4 +159,17 @@ docker compose -f compose-physical.yaml up ## Doing custom work -Copy your packages or create your pacakges within `/turtlebot4-workspace/turtle_ws/src` this folder is mounted into the workspace container and packages can be compiled and executed within the container. +Use code-server to edit files under `/workspace` (mounted from `./turtlebot4-workspace/workspace`). We recommend creating a ROS 2 colcon workspace inside `/workspace`: + +```bash +# In the code-server terminal (already sourced via ros entrypoint) +mkdir -p /workspace/turtle_ws/src +cd /workspace +colcon build --merge-install + +# Use the overlay +source /workspace/install/setup.bash +ros2 pkg list +``` + +Place your packages in `/workspace/turtle_ws/src`, build with `colcon`, and run as usual. The code-server terminal is ROS-ready (environment is sourced by the container entrypoint). diff --git a/compose.yaml b/compose.yaml index 5d159a3..898ef47 100644 --- a/compose.yaml +++ b/compose.yaml @@ -23,6 +23,7 @@ services: - ROS_DOMAIN_ID=0 - RMW_IMPLEMENTATION=rmw_fastrtps_cpp - ROS_DISCOVERY_SERVER=127.0.0.1:11811 + - ROS_SUPER_CLIENT=1 restart: unless-stopped privileged: true deploy: @@ -50,9 +51,10 @@ services: - QT_X11_NO_MITSHM=1 # GUI related - NVIDIA_VISIBLE_DEVICES=all # GUI related - NVIDIA_DRIVER_CAPABILITIES=all # GUI related - - ROS_DOMAIN_ID=10 + - ROS_DOMAIN_ID=0 - RMW_IMPLEMENTATION=rmw_fastrtps_cpp - ROS_DISCOVERY_SERVER=127.0.0.1:11811 + - ROS_SUPER_CLIENT=1 restart: unless-stopped privileged: true deploy: @@ -73,9 +75,10 @@ services: image: ghcr.io/collaborativeroboticslab/turtlebot4-workspace:dev environment: - PASSWORD=student # code-server login - - ROS_DOMAIN_ID=10 + - ROS_DOMAIN_ID=0 - RMW_IMPLEMENTATION=rmw_fastrtps_cpp - ROS_DISCOVERY_SERVER=127.0.0.1:11811 + - ROS_SUPER_CLIENT=1 - NO_AT_BRIDGE=1 restart: unless-stopped tty: true diff --git a/docs/containers.md b/docs/containers.md index d5c9f95..b636fcb 100644 --- a/docs/containers.md +++ b/docs/containers.md @@ -67,7 +67,7 @@ Works as a client of turtlebot4-discovery, and thus update the following variabl ## `Turtlebot4-workspace` container -This container provide a workspace environment that connects to Turtlebot4 simulation (or a physical robot). +This container provides a browser-based VS Code (code-server) environment that connects to Turtlebot4 simulation (or a physical robot). Works out-of-box as a client of turtlebot4-discovery, and thus update the following variables if turtlebot4-discovery settings change. @@ -75,9 +75,24 @@ Works out-of-box as a client of turtlebot4-discovery, and thus update the follow - ROS_DOMAIN_ID=0 - RMW_IMPLEMENTATION=rmw_fastrtps_cpp - ROS_DISCOVERY_SERVER=127.0.0.1:11811 + - PASSWORD=student ``` **Parameter descriptions** - `ROS_DOMAIN_ID`: Same domain as simulation and discovery. - `RMW_IMPLEMENTATION`: Keep Fast DDS for discovery server support. -- `ROS_DISCOVERY_SERVER`: Discovery server endpoint as above. \ No newline at end of file +- `ROS_DISCOVERY_SERVER`: Discovery server endpoint as above. + - `PASSWORD`: code-server login password (default `student`). Set in compose. + +**Access & Folders** +- URL: `http://127.0.0.1:8080` (served by the workspace container) +- Workspace root: `/workspace` (mounted from `./turtlebot4-workspace/workspace`) +- Persistent settings/extensions: + - `./turtlebot4-workspace/code-server/config` → `/root/.config/code-server` + - `./turtlebot4-workspace/code-server/data` → `/root/.local/share/code-server` + +**ROS Development inside workspace** +- The entrypoint sources ROS automatically for the integrated terminal. +- Create a ROS 2 overlay inside `/workspace` if desired: + - `mkdir -p /workspace/turtle_ws/src && cd /workspace && colcon build --merge-install` + - `source /workspace/install/setup.bash` \ No newline at end of file diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index b8f1d2a..df1ece4 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -22,4 +22,8 @@ Ensure `ROS_DISCOVERY_SERVER` uses a concrete address (not `0.0.0.0`). - Inside `turtlebot4-simulation`, run `ros2 topic list`, check `/map`, `/tf`, and Nav2 nodes (`planner_server`, `controller_server`). - Ensure transforms between `map`, `odom`, and `base_link` are present. -- Check the robot namespace \ No newline at end of file +- Check the robot namespace + +## ROS2 topic list doesnot print the list + +- try running the `ros2 daemon stop && ros2 daemon start` command once and wait few seconds \ No newline at end of file