Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
68 changes: 68 additions & 0 deletions .github/workflows/turtlebot4-discovery-jazzy-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Turtlebot4 Discovery Jazzy Dev 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
66 changes: 66 additions & 0 deletions .github/workflows/turtlebot4-rviz-jazzy-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Turtlebot4 Rviz Jazzy Dev 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
68 changes: 68 additions & 0 deletions .github/workflows/turtlebot4-simulation-jazzy-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Turtlebot4 GZ Simulation Jazzy Dev 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
68 changes: 68 additions & 0 deletions .github/workflows/turtlebot4-workspace-jazzy-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Turtlebot4 Workspace Jazzy Dev 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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
turtlebot4-simulation/gazebo_data
turtlebot4-simulation/rviz
turtlebot4-simulation/rviz
turtlebot4-workspace/code-server
turtlebot4-workspace/workspace
37 changes: 31 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<br>

Expand All @@ -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
Expand Down Expand Up @@ -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).
22 changes: 4 additions & 18 deletions compose-physical.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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
- ./turtlebot4-workspace/workspace:/workspace:rw
Loading