Skip to content

Commit 7122ad5

Browse files
XuRoboticsclaude
andcommitted
infra: port Docker, GitHub Actions, external yamls, and docs to ROS2 Jazzy
Update every piece of non-package infrastructure to target ROS2 Jazzy Jalisco on Ubuntu 24.04 instead of ROS1 Noetic on Ubuntu 20.04. Also rename branch references in this commit from dev/ros2 to ros2_dev. Dockerfiles (9): autonomy_core/{base,client,control,estimation,interface,map_plan, state_machine}/Dockerfile, autonomy_sim/Dockerfile, autonomy_sim/unity_sim/Dockerfile - base/Dockerfile: nvidia/cudagl:11.4.2-base-ubuntu20.04 -> osrf/ros:jazzy-desktop-full. The nvidia/cudagl lineage was EOL'd and has no direct Jazzy successor; a multi-line TODO at the top documents this and notes that compute-CUDA workloads (e.g. YOLOv8 inference) will need a follow-up to either layer CUDA onto this image or switch to nvidia/cuda:12.x-runtime-ubuntu24.04. - Stage images (client/control/estimation/map_plan/state_machine/ interface) inherit from the base image via the kumarrobotics/autonomy:<stage>-jazzy tag chain (the -jazzy suffix lets ROS1 and ROS2 images coexist on Docker Hub). - ros-noetic-* -> ros-jazzy-* throughout. - python-catkin-tools / python-catkin-pkg -> python3-colcon-common-extensions; python-rosdep -> python3-rosdep; python-rosinstall -> python3-vcstool. - ros-noetic-gazebo-ros-pkgs / gazebo-ros / gazebo-plugins -> ros-jazzy-ros-gz / ros-gz-sim / ros-gz-bridge (Gazebo Harmonic replaces Gazebo classic). hector-gazebo has no direct ROS2 equivalent; a TODO in autonomy_sim/Dockerfile notes the sensor plugins it supplied will need replacement. - ros-noetic-rviz -> ros-jazzy-rviz2 (package renamed). - ros-noetic-tf -> ros-jazzy-tf2-ros (the tf package no longer exists in ROS2; tf2_ros replaces it). - catkin build / catkin config --extend <upstream>/devel -> single colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=... step, with . <upstream>/install/setup.sh sourcing the upstream overlay. - state_machine/Dockerfile: added --break-system-packages to the rospkg pip install because Ubuntu 24.04 / PEP 668 enforces externally-managed environments. - unity_sim/Dockerfile: rm src/pkgs/rosflight_msgs/CATKIN_IGNORE -> rm -f ... /COLCON_IGNORE (marker name changed with colcon; -f so the build doesn't fail if the marker is already absent). docker/run.sh scripts (9, one per Dockerfile): - roslaunch/rosrun/rosbag/rostopic/rosnode/rosservice/rosparam -> ros2 launch/run/bag/topic/node/service/param. roscore -> echo stub (ROS2 has no master). roscd <pkg> -> cd $(ros2 pkg prefix --share <pkg>). - /opt/ros/noetic -> /opt/ros/jazzy; devel/setup -> install/setup. - Docker image tags carry a -jazzy suffix to match the Dockerfiles. - Container names received a _ros2 suffix (autonomy_base_it -> autonomy_base_ros2_it, etc.) so ROS1 and ROS2 containers coexist. GitHub Actions workflows (7): .github/workflows/docker-build-{base,client,control,estimation, map-plan,sim,state-machine}.yaml - Image base references updated consistent with the Dockerfiles. - runs-on: ubuntu-20.04 -> ubuntu-24.04 where applicable. - Workflow trigger branches: [master] -> [ros2_dev] so CI actually fires on this branch. - catkin build -> colcon build --symlink-install; /opt/ros/noetic -> /opt/ros/jazzy; devel/setup -> install/setup. - reviewdog workflows (cpplint/pylint/shellcheck) had no ROS1-specific content and are left unchanged. external_*.yaml (5: external_all, external_coverage_planner, external_lidar_odometry, external_real_robot, autonomy_sim/external): - Add a top-of-file TODO noting that the listed external repos are ROS1-only vcstool entries and must be ported to their ROS2 equivalents before `vcs import` produces a buildable workspace. - Individual entries are left as-is so that vcs still resolves them at snapshot-time when someone starts porting each one. README.md: - Banner at the top updated to reference ros2_dev (was dev/ros2 after the initial rename). - Prereq section rewritten: catkin build -> colcon build --symlink-install, devel/setup -> install/setup, /opt/ros/noetic -> /opt/ros/jazzy. - New subsection "### ROS1 bags -> ROS2 conversion" noting that demo bags recorded under Noetic need rosbags-convert (from the `rosbags` pip package) before ros2 bag play can replay them. - Videos, wiki link, citations, code-structure diagram all untouched. exp_usage.md: same dev-command substitutions as the run.sh scripts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 21c4928 commit 7122ad5

32 files changed

Lines changed: 152 additions & 121 deletions

.github/workflows/docker-build-base.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ on:
55
push:
66
paths:
77
- 'autonomy_core/base/**'
8-
branches: [master]
8+
branches: [ros2_dev]
99
workflow_dispatch:
1010
schedule:
1111
- cron: '0 0 * * 0'
1212

1313
jobs:
1414
main:
15-
runs-on: ubuntu-20.04
15+
runs-on: ubuntu-24.04
1616

1717
steps:
1818
-
@@ -33,7 +33,7 @@ jobs:
3333
uses: docker/build-push-action@v2
3434
with:
3535
push: true
36-
tags: kumarrobotics/autonomy:base
36+
tags: kumarrobotics/autonomy:base-jazzy
3737
file: ./autonomy_core/base/Dockerfile
3838
platforms: linux/amd64,linux/arm64
3939
-

.github/workflows/docker-build-client.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ on:
66
workflow_dispatch:
77
workflow_run:
88
workflows: ["docker-build-map-plan"]
9-
branches: [master]
9+
branches: [ros2_dev]
1010
types:
1111
- completed
1212
push:
1313
paths:
1414
- 'autonomy_core/client/**'
15-
branches: [master]
15+
branches: [ros2_dev]
1616
# DO NOT add a schedule. This build will be triggered by base schedule.
1717

1818
jobs:
1919
main:
20-
runs-on: ubuntu-20.04
20+
runs-on: ubuntu-24.04
2121

2222
steps:
2323
-
@@ -44,7 +44,7 @@ jobs:
4444
with:
4545
context: .
4646
push: true
47-
tags: kumarrobotics/autonomy:client
47+
tags: kumarrobotics/autonomy:client-jazzy
4848
file: ./autonomy_core/client/Dockerfile
4949
platforms: linux/amd64,linux/arm64
5050
-

.github/workflows/docker-build-control.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ name: docker-build-control
55
on:
66
workflow_run:
77
workflows: ["docker-build-base"]
8-
branches: [master]
8+
branches: [ros2_dev]
99
types:
1010
- completed
1111
workflow_dispatch:
1212
push:
1313
paths:
1414
- 'autonomy_core/control/**'
15-
branches: [master]
15+
branches: [ros2_dev]
1616
# DO NOT add a schedule. This build will be triggered by base schedule.
1717

1818
jobs:
1919
main:
20-
runs-on: ubuntu-20.04
20+
runs-on: ubuntu-24.04
2121

2222
steps:
2323
-
@@ -44,7 +44,7 @@ jobs:
4444
with:
4545
context: .
4646
push: true
47-
tags: kumarrobotics/autonomy:control
47+
tags: kumarrobotics/autonomy:control-jazzy
4848
file: ./autonomy_core/control/Dockerfile
4949
platforms: linux/amd64,linux/arm64
5050
-

.github/workflows/docker-build-estimation.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ name: docker-build-estimation
55
on:
66
workflow_run:
77
workflows: ["docker-build-base"]
8-
branches: [master]
8+
branches: [ros2_dev]
99
types:
1010
- completed
1111
push:
1212
paths:
1313
- 'autonomy_core/estimation/**'
14-
branches: [master]
14+
branches: [ros2_dev]
1515
workflow_dispatch:
1616
# DO NOT add a schedule. This build will be triggered by base schedule.
1717

1818
jobs:
1919
main:
20-
runs-on: ubuntu-20.04
20+
runs-on: ubuntu-24.04
2121

2222
steps:
2323
-
@@ -38,7 +38,7 @@ jobs:
3838
uses: docker/build-push-action@v2
3939
with:
4040
push: true
41-
tags: kumarrobotics/autonomy:estimation
41+
tags: kumarrobotics/autonomy:estimation-jazzy
4242
file: ./autonomy_core/estimation/Dockerfile
4343
platforms: linux/amd64,linux/arm64
4444
-

.github/workflows/docker-build-map-plan.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ on:
66
workflow_dispatch:
77
workflow_run:
88
workflows: ["docker-build-control"]
9-
branches: [master]
9+
branches: [ros2_dev]
1010
types:
1111
- completed
1212
push:
1313
paths:
1414
- 'autonomy_core/map_plan/**'
15-
branches: [master]
15+
branches: [ros2_dev]
1616
# DO NOT add a schedule. This build will be triggered by base schedule.
1717

1818
jobs:
1919
main:
20-
runs-on: ubuntu-20.04
20+
runs-on: ubuntu-24.04
2121

2222
steps:
2323
-
@@ -44,7 +44,7 @@ jobs:
4444
with:
4545
context: .
4646
push: true
47-
tags: kumarrobotics/autonomy:map_plan
47+
tags: kumarrobotics/autonomy:map_plan-jazzy
4848
file: ./autonomy_core/map_plan/Dockerfile
4949
platforms: linux/amd64,linux/arm64
5050
-

.github/workflows/docker-build-sim.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ on:
66
workflow_dispatch:
77
workflow_run:
88
workflows: ["docker-build-state-machine"]
9-
branches: [master]
9+
branches: [ros2_dev]
1010
types:
1111
- completed
1212
push:
1313
paths:
1414
- 'autonomy_sim/**'
15-
branches: [master]
15+
branches: [ros2_dev]
1616
# DO NOT add a schedule. This build will be triggered by base schedule.
1717

1818
jobs:
1919
main:
20-
runs-on: ubuntu-20.04
20+
runs-on: ubuntu-24.04
2121

2222
steps:
2323
-
@@ -44,7 +44,7 @@ jobs:
4444
with:
4545
context: .
4646
push: true
47-
tags: kumarrobotics/autonomy:sim
47+
tags: kumarrobotics/autonomy:sim-jazzy
4848
file: ./autonomy_sim/Dockerfile
4949
platforms: linux/amd64,linux/arm64
5050
-

.github/workflows/docker-build-state-machine.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ on:
66
workflow_dispatch:
77
workflow_run:
88
workflows: ["docker-build-map-plan"]
9-
branches: [master]
9+
branches: [ros2_dev]
1010
types:
1111
- completed
1212
push:
1313
paths:
1414
- 'autonomy_core/state_machine/**'
15-
branches: [master]
15+
branches: [ros2_dev]
1616
# DO NOT add a schedule. This build will be triggered by base schedule.
1717

1818
jobs:
1919
main:
20-
runs-on: ubuntu-20.04
20+
runs-on: ubuntu-24.04
2121

2222
steps:
2323
-
@@ -44,7 +44,7 @@ jobs:
4444
with:
4545
context: .
4646
push: true
47-
tags: kumarrobotics/autonomy:state_machine
47+
tags: kumarrobotics/autonomy:state_machine-jazzy
4848
file: ./autonomy_core/state_machine/Dockerfile
4949
platforms: linux/amd64,linux/arm64
5050
-

README.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
> [!NOTE]
2-
> ## You are on the `dev/ros2` branch — ROS2 support for kr_autonomous_flight.
2+
> ## You are on the `ros2_dev` branch — ROS2 support for kr_autonomous_flight.
33
>
44
> This branch ports the entire `kr_autonomous_flight` stack from **ROS1 Noetic** (Ubuntu 20.04) to **ROS2 Jazzy Jalisco** (Ubuntu 24.04) — the latest ROS2 LTS. It is built on top of the [`feature/integrate_lidar_3d_planner_default`](https://github.com/KumarRobotics/kr_autonomous_flight/tree/feature/integrate_lidar_3d_planner_default) branch, which adds support for the **3D planner** and both **LIDAR + VIO** and **LIDAR-only** autonomous flight configurations. It is provided to help developers who want to use kr_autonomous_flight with ROS2.
55
>
@@ -9,16 +9,27 @@
99
1010
![alt text](https://github.com/KumarRobotics/kr_autonomous_flight/blob/master/docs/falcon4-compressed.jpg)
1111

12-
# Branch Notice:
12+
# Branch Notice:
1313
## Prereq
14-
clone this repo
15-
vcs import < external_all.yaml # pull dependency
16-
vcs import < motion_primitives/deps_ssh.repos # pull dependency of motion primitives for dispersion stuff
14+
Targets ROS2 Jazzy Jalisco on Ubuntu 24.04.
15+
16+
```bash
17+
# clone this repo, then from the workspace root:
18+
source /opt/ros/jazzy/setup.bash
19+
vcs import < external_all.yaml # pull dependencies (see TODO in that file — these are still ROS1-only)
20+
vcs import < motion_primitives/deps_ssh.repos # pull motion primitives dispersion deps
1721
rosdep install --from-paths src --ignore-src -r -y
1822
sudo apt install libspdlog-dev
23+
colcon build --symlink-install
24+
source install/setup.bash
25+
```
1926

20-
21-
27+
### ROS1 bags -> ROS2 conversion
28+
The demo bags that ship with the ROS1 `master` branch were recorded under
29+
Noetic and are not directly playable by `ros2 bag play`. Convert them first
30+
with the `rosbags-convert` CLI from the `rosbags` pip package
31+
(`pip install rosbags`), which rewrites `.bag` files into the ROS2 SQLite
32+
(`db3`) format that `ros2 bag play` understands.
2233

2334
This is the autonomous flight code stack used at KumarRobotics, providing a complete solution for GPS-denied quadcopter autonomy. It has been tested extensively in challenging urban and rural (under forest canopy) environments.
2435

autonomy_core/base/Dockerfile

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
FROM nvidia/cudagl:11.4.2-base-ubuntu20.04
2-
3-
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub
1+
# TODO: restore CUDA runtime support (original used nvidia/cudagl:11.4.2-base-ubuntu20.04).
2+
# The nvidia/cudagl lineage was EOL'd and there is no drop-in Jazzy + CUDA image.
3+
# osrf/ros:jazzy-desktop-full covers graphics needs (rviz2, gazebo harmonic) but
4+
# compute-oriented CUDA workloads (e.g. yolov8 inference) will need a follow-up
5+
# that either layers CUDA onto this image or switches to nvidia/cuda:12.x-runtime-ubuntu24.04.
6+
FROM osrf/ros:jazzy-desktop-full
47

58
#Run the frontend first so it doesn't throw an error later
69
RUN export DEBIAN_FRONTEND=noninteractive \
@@ -39,22 +42,18 @@ ENV LC_ALL en_US.UTF-8
3942
ENV LANG en_US.UTF-8
4043
ENV LANGUAGE en_US:en
4144

42-
# ROS Setup
45+
# ROS2 Jazzy tools. The osrf/ros:jazzy-desktop-full base already ships the ROS2
46+
# apt source, colcon, rosdep, and the desktop-full metapackage, so we only need
47+
# to pull in the extra packages the autonomy stack depends on.
4348
RUN sudo apt-get update \
44-
&& sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' \
45-
&& curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add - \
46-
&& sudo apt-get update \
4749
&& sudo apt-get install -y \
48-
python3-catkin-tools \
50+
python3-colcon-common-extensions \
4951
python3-rosdep \
50-
python3-rosinstall \
5152
python3-vcstool \
52-
ros-noetic-catkin \
53-
ros-noetic-rosbash \
54-
ros-noetic-desktop \
55-
ros-noetic-pcl-ros \
56-
ros-noetic-tf2-geometry-msgs \
57-
&& sudo rosdep init \
53+
ros-jazzy-pcl-ros \
54+
ros-jazzy-tf2-geometry-msgs \
55+
ros-jazzy-tf2-ros \
56+
&& (sudo rosdep init || true) \
5857
&& rosdep update
5958

6059
COPY autonomy_core/base/docker/entrypoint.sh /entrypoint.sh

autonomy_core/base/docker/run.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22

3-
# TODO: add command line argument for rosmaster uri
4-
docker run -it --rm --network=host --name autonomy_base_it \
5-
kumarrobotics/autonomy:base \
6-
bash
3+
# ROS2: no rosmaster URI is needed; use ROS_DOMAIN_ID instead if you want to
4+
# namespace multiple robots on the same network.
5+
docker run -it --rm --network=host --name autonomy_base_ros2_it \
6+
kumarrobotics/autonomy:base-jazzy \
7+
bash

0 commit comments

Comments
 (0)