Skip to content

Commit ebbf9e4

Browse files
committed
build(CI): fix ROS2 workspace metadata, GH action checks (Ruff, build conditioned on installed SDKs)
1 parent dc9c6ed commit ebbf9e4

34 files changed

Lines changed: 842 additions & 176 deletions

.devcontainer/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
5454
&& add-apt-repository ppa:jjriek/rockchip-multimedia \
5555
&& apt-get update && apt-get install -y --no-install-recommends \
5656
librga2 librga-dev libdrm-dev \
57+
ros-${ROS_DISTRO}-behaviortree-cpp \
5758
ros-${ROS_DISTRO}-cv-bridge \
5859
ros-${ROS_DISTRO}-image-transport \
5960
ros-${ROS_DISTRO}-robot-state-publisher \

.github/workflows/ci.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
workflow_dispatch: {}
8+
9+
jobs:
10+
ros-and-vision:
11+
runs-on: ubuntu-24.04
12+
container:
13+
image: osrf/ros:kilted-desktop-full-noble
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Install system deps
19+
shell: bash
20+
run: |
21+
set -eux
22+
apt-get update
23+
apt-get install -y --no-install-recommends \
24+
git \
25+
python3-colcon-common-extensions \
26+
python3-pip \
27+
python3-pytest \
28+
python3-ruff \
29+
ros-kilted-ament-copyright \
30+
ros-kilted-ament-cmake-gtest \
31+
ros-kilted-ament-xmllint \
32+
ros-kilted-behaviortree-cpp \
33+
ros-kilted-nav2-msgs
34+
35+
- name: Source ROS
36+
shell: bash
37+
run: |
38+
set -eux
39+
source /opt/ros/kilted/setup.bash
40+
env | grep '^ROS_'
41+
42+
- name: Ruff
43+
shell: bash
44+
run: |
45+
set -eux
46+
ruff check ros_ws/src/analysis ros_ws/src/bringup
47+
48+
- name: Build ROS packages
49+
shell: bash
50+
run: |
51+
set -eux
52+
source /opt/ros/kilted/setup.bash
53+
cd ros_ws
54+
colcon build --merge-install \
55+
--packages-select omniseer_msgs yolo_msgs omniseer_description analysis bringup
56+
57+
- name: Build vision bridge when SDKs are present
58+
shell: bash
59+
run: |
60+
set -eux
61+
if command -v pkg-config >/dev/null \
62+
&& pkg-config --exists librga \
63+
&& [ -f /usr/include/rknn_api.h ] \
64+
&& find /usr/lib /usr/local/lib -name 'librknnrt.so' -print -quit | grep -q .; then
65+
source /opt/ros/kilted/setup.bash
66+
cd ros_ws
67+
colcon build --merge-install --packages-select omniseer_vision_bridge
68+
else
69+
echo "Skipping omniseer_vision_bridge: librga/RKNN SDK not available in CI image"
70+
fi
71+
72+
- name: Test ROS packages
73+
shell: bash
74+
run: |
75+
set -eux
76+
source /opt/ros/kilted/setup.bash
77+
cd ros_ws
78+
colcon test --merge-install \
79+
--packages-select omniseer_description analysis bringup
80+
colcon test-result --all --verbose
81+
82+
- name: Build host vision tests
83+
shell: bash
84+
run: |
85+
set -eux
86+
cmake -S vision -B vision/build-ci -DVISION_BUILD_HARNESS=OFF
87+
cmake --build vision/build-ci \
88+
--target image_buffer_pool_test jsonl_telemetry_test rolling_telemetry_test
89+
90+
- name: Run host vision tests
91+
shell: bash
92+
run: |
93+
set -eux
94+
ctest --test-dir vision/build-ci \
95+
-R 'image_buffer_pool_test|jsonl_telemetry_test|rolling_telemetry_test' \
96+
--output-on-failure

AGENTS.md

Lines changed: 44 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,54 @@
11
# AGENTS.md
22

3-
Guidance for AI coding agents working in this repository.
3+
Instructions for Codex agents working in this repository.
44

5-
## User Preferences
5+
## Role
66

7-
- Be concise, direct, and action-oriented.
8-
- Prefer doing the work over describing the work. Inspect first, then implement, verify, and summarize.
9-
- Make reasonable assumptions instead of asking unnecessary questions. If a decision has real tradeoffs, present a short recommendation and a small set of options.
10-
- Keep progress updates brief and informative.
11-
- Keep final summaries high-signal. Avoid long file-by-file changelogs unless explicitly requested.
12-
- Prefer fixes that persist across sessions and machines. When possible, encode behavior in repository files instead of one-off local shell state.
13-
- Match the repository's recent commit style: conventional prefix with an explicit scope, followed by a descriptive sentence. Mention notable secondary changes when helpful.
7+
- Act as a pragmatic senior engineer, not a narrator.
8+
- Prefer doing the work over describing the work.
9+
- The default loop is: inspect, implement, verify, summarize.
1410

15-
## Repository Conventions
11+
## Decision Rules
1612

17-
- Preserve existing architecture and naming patterns in `vision/`, `ros_ws/src/`, `.devcontainer/`, and related support tooling.
18-
- Favor Doxygen-style C++ comments to stay aligned with the documented code style.
19-
- When adding or changing ROS 2 message definitions, update both `package.xml` and `CMakeLists.txt` for the affected package.
20-
- Prefer focused diffs and targeted validation over broad refactors.
21-
- Do not commit generated artifacts, machine-specific secrets, or host-only paths unless the change explicitly requires them.
13+
- Apply Occam's razor: prefer the simplest explanation and the smallest change that fully solves the problem.
14+
- Prefer targeted fixes over broad refactors.
15+
- Fix root causes when they are near and clear. Avoid speculative cleanup.
16+
- Make reasonable low-risk assumptions and continue.
17+
- Ask only when the decision is materially ambiguous, expensive to reverse, or likely to create user-visible churn.
2218

23-
## Workflow Defaults
19+
## Communication
2420

25-
- Start by gathering context with targeted searches, diffs, and file reads.
26-
- Before editing files, briefly state what is being changed.
27-
- After changes, report what changed, what was verified, and any remaining limitation.
28-
- If hardware, container, or SBC-specific constraints block full verification, say so clearly instead of implying success.
21+
- Be concise, direct, and technical.
22+
- Keep progress updates short, factual, and useful.
23+
- Do not pad responses with reassurance, ceremony, or obvious narration.
24+
- Final summaries should cover three things: what changed, what was verified, and what remains uncertain.
25+
- If presenting options, recommend one first and explain tradeoffs briefly.
2926

30-
## Environment Notes
27+
## Working Style
3128

32-
- This repository is often used from an SSH-connected SBC and from a devcontainer.
33-
- If Git pushes fail in a devcontainer because the wrong forwarded GitHub identity is selected, prefer a repo-local `git config core.sshCommand` fix over changing the remote URL globally.
34-
- Prefer repository-local or clone-local persistence when it helps future sessions without polluting the host machine.
29+
- Read surrounding code before editing.
30+
- Match the local style and structure of the code you touch.
31+
- Preserve existing architecture unless the task clearly requires structural change.
32+
- Keep diffs focused and reviewable.
33+
- Do not revert unrelated changes in the worktree.
34+
- Prefer durable repository changes over one-off local shell state.
35+
- Preserve or improve logs, telemetry, and failure reporting when changing runtime behavior.
36+
37+
## Verification
38+
39+
- Run the smallest meaningful validation for the change.
40+
- Prefer targeted builds, tests, lint, or runtime checks over broad expensive sweeps.
41+
- Do not claim success without verification.
42+
- If hardware, camera, ROS graph, container, or SBC constraints block full validation, say so explicitly.
43+
44+
## Repository Biases
45+
46+
- This repo spans ROS 2, vision/runtime code, and support tooling; keep cross-file wiring coherent.
47+
- When changing ROS interfaces, keep definitions, package metadata, and build configuration in sync.
48+
- Assume the repo may be used from an SBC, over SSH, or in a devcontainer; avoid host-specific assumptions.
49+
- Do not commit generated artifacts, secrets, or host-only paths unless the task explicitly requires them.
50+
51+
## Commit Style
52+
53+
- When asked to commit, use a conventional prefix with an explicit scope and a descriptive sentence.
54+
- Mention notable secondary changes when they materially help review.

0 commit comments

Comments
 (0)