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
2 changes: 1 addition & 1 deletion .agents/skills/bump-version-and-release/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Bump the `VERSION=` line in `/.env` whenever a pull request **materially changes

Bump VERSION when the PR touches:

- Any `Dockerfile` under `robot/`, `simulation/isaac-sim/`, `simulation/ms-airsim/`, `gcs/`, `common/`, or `tests/docker/`
- Any `Dockerfile` under `robot/`, `simulation/isaac-sim/`, `simulation/ms-airsim/`, `simulation/project-airsim/`, `gcs/`, `common/`, or `tests/docker/`
- `docker-compose.yaml` or any included sub-compose file (when the change affects what is built or installed into images)
- Code that is **baked into** an image (i.e., copied during build, not bind-mounted at runtime). The workspace is bind-mounted (`DOCKER_IMAGE_BUILD_MODE` is a tag discriminator only — a real `prebuilt` workspace-baked stage is future work), so source-only changes under `robot/ros_ws/src/**` do not strictly require a rebuild — but bumping is still safer if you are unsure.
- Apt packages, pip requirements, ROS package manifests installed during the build
Expand Down
11 changes: 8 additions & 3 deletions .agents/skills/configure-multi-robot/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ If you only ever touch one robot, you can usually skip this skill — but the mo

## Prerequisites

- Familiarity with the AirStack docker-compose layout (`.env`, `robot/docker/`, `simulation/{isaac-sim,ms-airsim}/`)
- Familiarity with the AirStack docker-compose layout (`.env`, `robot/docker/`, `simulation/{isaac-sim,ms-airsim,project-airsim}/`)
- Basic understanding of ROS 2 namespaces and TF frame names
- You have already read [`docs/robot/docker/robot_identity.md`](../../../docs/robot/docker/robot_identity.md), or are willing to as you go — that file is the canonical reference for the resolution mechanism

Expand Down Expand Up @@ -269,7 +269,7 @@ self.target_frame = f"{robot_name}/base_link"

## Sim-Side Robot Spawning

Both simulators read `NUM_ROBOTS` from the environment and spawn matching vehicles named `robot_1`, `robot_2`, … so the names line up with what the resolver assigns to robot containers.
Every PX4 simulator (Isaac Sim, Microsoft AirSim, Project AirSim) reads `NUM_ROBOTS` from the environment and spawn matching vehicles named `robot_1`, `robot_2`, … so the names line up with what the resolver assigns to robot containers.

### Microsoft AirSim (legacy)

Expand All @@ -288,6 +288,10 @@ Both simulators read `NUM_ROBOTS` from the environment and spawn matching vehicl

The `ms-airsim` container's `entrypoint.sh` (in `simulation/ms-airsim/docker/`) loops `for i in $(seq 1 "$NUM_ROBOTS")` to start one PX4 SITL instance per vehicle. AirSim binds them via the per-robot TCP ports.

### Project AirSim

[`simulation/project-airsim/config/generate_scene.py`](../../../simulation/project-airsim/config/generate_scene.py) writes one scene with a vehicle per robot: from the fleet file when `FLEET_CONFIG_FILE` is set (each robot's `spawn:` and optional `physics:`), else `robot_1..robot_NUM_ROBOTS` spaced `PROJECT_AIRSIM_SPAWN_SPACING` m (default 3) apart along x. The `project-airsim` container's `entrypoint.sh` then starts one PX4 SITL instance (`-i $i`) per generated robot. See [Fleets → Simulation](../../../docs/development/fleets.md#simulation) for physics resolution.

### Isaac Sim (Pegasus)

With a fleet, [`fleet_spawn.py`](../../../simulation/isaac-sim/launch_scripts/fleet_spawn.py) is selected automatically: spawn positions come from each robot's `spawn:`, the scene from `sim.scene`, and sensor toggles from the vehicle manifests (any `lidar*` sensor enables the RTX lidar subgraph — the per-vehicle `ENABLE_LIDAR` equivalent). The legacy path:
Expand Down Expand Up @@ -389,7 +393,7 @@ Two developers on the same LAN running `airstack up` will see each other's robot

### 6. Forgetting to pass `NUM_ROBOTS` to the simulator container

Both Isaac Sim and AirSim read `NUM_ROBOTS` themselves at startup. `airstack up` and the test harness propagate it for you, but if you start the simulator alone (e.g. `docker compose up isaac-sim`), the simulator will spawn 1 drone regardless of how many robot containers you started. Always set `NUM_ROBOTS` at the top-level invocation, not after the simulator is already running.
Isaac Sim, Microsoft AirSim, and Project AirSim read `NUM_ROBOTS` themselves at startup. `airstack up` and the test harness propagate it for you, but if you start the simulator alone (e.g. `docker compose up isaac-sim`), the simulator will spawn 1 drone regardless of how many robot containers you started. Always set `NUM_ROBOTS` at the top-level invocation, not after the simulator is already running.

### 7. Hardcoded TF frame `base_link` from outside the namespace

Expand Down Expand Up @@ -487,6 +491,7 @@ docker exec -e ROS_DOMAIN_ID=1 airstack-robot-desktop-1 bash -c \
- [`robot/ros_ws/src/autonomy_bringup/launch/robot.launch.xml`](../../../robot/ros_ws/src/autonomy_bringup/launch/robot.launch.xml) — top-level `push_ros_namespace`
- [`robot/ros_ws/src/autonomy_bringup/config/dds_router.yaml`](../../../robot/ros_ws/src/autonomy_bringup/config/dds_router.yaml) — cross-domain allowlist pattern
- [`simulation/ms-airsim/config/generate_settings.py`](../../../simulation/ms-airsim/config/generate_settings.py) and [`settings.json.j2`](../../../simulation/ms-airsim/config/settings.json.j2)
- [`simulation/project-airsim/config/generate_scene.py`](../../../simulation/project-airsim/config/generate_scene.py)
- [`simulation/isaac-sim/launch_scripts/example_multi_px4_pegasus_launch_script.py`](../../../simulation/isaac-sim/launch_scripts/example_multi_px4_pegasus_launch_script.py)
- [`tests/conftest.py`](../../../tests/conftest.py) — `airstack_env` fixture and `--num-robots` parametrization

Expand Down
2 changes: 1 addition & 1 deletion .agents/skills/create-module/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Summary:
`license`, `type` (`isaac_extension` | `ros_package` | `data` | `platform`),
`airstack_compat` (semver range vs trunk `.env` `VERSION`, e.g.
`">=0.19.0 <0.21.0"` — never a branch name), `targets`
(non-empty: `robot` | `gcs` | `isaac-sim` | `ms-airsim`).
(non-empty: `robot` | `gcs` | `isaac-sim` | `ms-airsim` | `project-airsim`).
- **Optional:** `deps` `{apt, pip}`, `dockerfile` (path ending
`Dockerfile.module`), `overlay_image`, `compose`, `assets`
(`[{url (https), sha256, dest}]` — no Git LFS), `docs`, `foxglove`, `hooks`
Expand Down
14 changes: 7 additions & 7 deletions .agents/skills/run-system-tests/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ For details on the co-located layout and adding new unit tests, see the

| File | Mark | What it tests | Hardware required |
|------|------|---------------|-------------------|
| `tests/system/test_build_docker.py` | `build_docker` | `airstack images build` for `robot-desktop`, `gcs`, `isaac-sim`, `ms-airsim`; records image size to `metrics.json` | Docker daemon |
| `tests/system/test_build_packages.py` | `build_packages` | `colcon build` (`bws`) inside the robot, GCS, and ms-airsim ROS workspaces — brought up with `AUTOLAUNCH=false` | Docker daemon |
| `tests/system/test_build_docker.py` | `build_docker` | `airstack images build` for `robot-desktop`, `gcs`, `isaac-sim`, `ms-airsim`, `project-airsim`; records image size to `metrics.json` | Docker daemon |
| `tests/system/test_build_packages.py` | `build_packages` | `colcon build` (`bws`) inside the robot, GCS, ms-airsim, and project-airsim ROS workspaces — brought up with `AUTOLAUNCH=false` | Docker daemon |
| `tests/system/test_liveliness.py` | `liveliness` | Stack bring-up: containers Running, `/clock` readiness, tmux panes, sentinel ROS 2 nodes, compute, infra-only `test_stable` | Docker daemon, NVIDIA GPU + `nvidia-container-toolkit`, sim license / Omniverse creds |
| `tests/system/test_sensors.py` | `sensors` | Topic Hz (Isaac: batched on sim + robot; LiDAR `echo-once` + cloud sanity), RTF, `test_sensor_streams_stable` | Docker daemon, NVIDIA GPU + `nvidia-container-toolkit`, sim license / Omniverse creds |
| `tests/system/test_takeoff_hover_land.py` | `takeoff_hover_land` | 4-phase flight chain per `(sim, num_robots, iteration, velocity)`: `test_px4_ready` → `test_takeoff` → `test_hover` → `test_landing`. Records altitude error, overshoot, hover stability, landing accuracy, odometry drift | Docker daemon, NVIDIA GPU, sim license |
Expand Down Expand Up @@ -99,8 +99,8 @@ rates if too many `ros2 topic hz` processes run concurrently.
- **Sim-side (Isaac):** three `parallel_sample_hz` passes — `/clock`, then both
`image_rect` topics, then both `depth_ground_truth` topics.
- **Robot-side (Isaac):** two passes — both stereo images, then both depths.
**ms-airsim** keeps a single four-topic parallel batch on the robot container.
- **Filtered LiDAR** (`PointCloud2`): uses `ros2 topic echo --once` per robot
**ms-airsim** and **project-airsim** keep a single four-topic parallel batch on the robot container.
- **Filtered LiDAR** (`PointCloud2`, sims with `has_lidar` in `SIM_CONFIG`: `isaacsim`, `projectairsim`): uses `ros2 topic echo --once` per robot
(see `parallel_echo_once_robot_topics` in `tests/harness/sim.py`), not `topic hz`.
- **Multi-drone Pegasus script:** pytest sets `ENABLE_LIDAR=true` in
`conftest.py` `SIM_CONFIG["isaacsim"]["extra_env"]` so LiDAR matches the
Expand Down Expand Up @@ -178,7 +178,7 @@ The `airstack_env` fixture is parametrized over `(sim, num_robots, iteration)` t

| Flag | Default | Affects | Becomes |
|------|---------|---------|---------|
| `--sim` | `isaacsim` | `airstack_env` | One env-tuple per sim (`msairsim` opt-in) |
| `--sim` | `isaacsim` | `airstack_env` | One env-tuple per sim (`msairsim`, `projectairsim` opt-in) |
| `--num-robots` | `1,3` | `airstack_env` | Cross-product with sim |
| `--stack` | `None` (= `full_default`) | `airstack_env` | Stack folder under `stacks/` to launch (sets `AIRSTACK_STACK_DIR` for `airstack up`); the `wiring` test drift-checks against `stacks/<name>/wiring.md` |
| `--fleet` | `None` (legacy `--num-robots` behavior) | `airstack_env` | Fleet preset under `config/fleets/` (e.g. `sim_three_mixed`); sets `FLEET_CONFIG_FILE` and derives `NUM_ROBOTS` from the fleet's robot count, **overriding `--num-robots`** |
Expand Down Expand Up @@ -385,9 +385,9 @@ If multiple tests need the same setup, add a fixture in `conftest.py` (not in yo
- **Forgetting `build_packages`**. If you run `-m liveliness` locally on a fresh checkout, the workspace inside the container is empty and sentinel nodes won't appear. Either run `-m "build_packages or liveliness"` or rely on the CI auto-prepend.
- **Mixing marks unintentionally**. `-m "liveliness or takeoff_hover_land"` brings the stack up once per selected mark's test classes (per parametrization). `-m "liveliness or sensors"` runs **both** classes for each tuple — **two** full ``airstack up`` / ``down`` cycles per `(sim, robots, iter)` because ``airstack_env`` is class-scoped. Combine deliberately, not by reflex.
- **Running on insufficient hardware**. `liveliness`, `sensors`, and `takeoff_hover_land` require an NVIDIA GPU plus nvidia-container-toolkit; without them the sim container won't get GPU access and topic Hz checks will time out. If you only have a CPU, scope to `-m "build_docker or build_packages"`.
- **Expecting interactive sim feedback**. `airstack_env` runs headless by default (`MS_AIRSIM_HEADLESS=true`, `ISAAC_SIM_HEADLESS=true`, `QT_QPA_PLATFORM=offscreen`). Don't add stdin prompts, GUI dialogs, or `input()` calls to test code — they will hang in CI. For local visual debugging only, pass `--gui`.
- **Expecting interactive sim feedback**. `airstack_env` runs headless by default (`MS_AIRSIM_HEADLESS=true`, `PROJECT_AIRSIM_HEADLESS=true`, `ISAAC_SIM_HEADLESS=true`, `QT_QPA_PLATFORM=offscreen`). Don't add stdin prompts, GUI dialogs, or `input()` calls to test code — they will hang in CI. For local visual debugging only, pass `--gui`.
- **Not capturing metrics in a new test**. If a test fails silently (no metric recorded) the regression report has nothing to compare. Always record at least one scalar via `MetricsRecorder` so the test shows up in `metrics.json`.
- **Letting parametrize cardinality explode**. Default `--num-robots 1,3` (and `--sim msairsim` if you opt in) multiplies stack bring-ups for each selected mark (`liveliness`, `sensors`, `takeoff_hover_land`, …) — expensive. Override locally to a single tuple while iterating. `--sim` defaults to `isaacsim` only.
- **Letting parametrize cardinality explode**. Default `--num-robots 1,3` (and each extra `--sim` target you opt in, e.g. `msairsim`, `projectairsim`) multiplies stack bring-ups for each selected mark (`liveliness`, `sensors`, `takeoff_hover_land`, …) — expensive. Override locally to a single tuple while iterating. `--sim` defaults to `isaacsim` only.
- **Hardcoded container names**. Always use `find_container`, `get_robot_containers`, or `wait_for_container` — replica suffixes (`-1`, `-2`, `-3`) and compose project prefixes change.
- **Asserting on stdout instead of using `read_log_tail`**. The conftest captures each subprocess's combined stdout/stderr in memory; assertions should reference it via `read_log_tail()` (`f"airstack up failed:\n{read_log_tail()}"`) so failures attach the relevant context to the JUnit XML.
- **Trying to SSH into a CI runner mid-job**. Workers are ephemeral OSMO pods destroyed after job completion. Re-running creates a fresh pod. For genuine runner debugging, see `.github/orchestrator/README.md` (also exposed at `tests/ci-cd-orchestrator.md`) — but in most cases, reproduce locally with `airstack test`.
Expand Down
21 changes: 12 additions & 9 deletions .agents/skills/use-airstack-cli/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ metadata:

Use this skill any time you need to:

- Start, stop, or inspect AirStack services (robot, isaac-sim, ms-airsim, gcs, docs)
- Start, stop, or inspect AirStack services (robot, isaac-sim, ms-airsim, project-airsim, gcs, docs)
- Launch a specific **stack** (`--stack`) or **fleet** (`--fleet`)
- Manage **modules** (`airstack module add|list|sync|remove|create|lock|doctor`)
- Build or source the ROS 2 workspace inside a container
Expand Down Expand Up @@ -68,11 +68,12 @@ plus optional compose service names and passthrough flags (`--build`, `--recreat

| Flag | What it does |
|------|--------------|
| `--sim isaac\|airsim` | Selects the simulator: swaps the compose profile (`isaac-sim` / `ms-airsim`) and the matching `URDF_FILE` |
| `--sim isaac\|airsim\|projectairsim\|simple` | Selects the simulator: swaps the compose profile (`isaac-sim` / `ms-airsim` / `project-airsim` / `simple`) and the matching `URDF_FILE`. `airsim` = Microsoft AirSim (legacy, UE4); `projectairsim` (aliases `pas`, `project-airsim`) = Project AirSim (UE5, stereo + depth + LiDAR) |
| `--robots N` | Exports `NUM_ROBOTS=N`; on Isaac also keeps `ISAAC_SIM_SCRIPT_NAME` consistent (auto-selects the multi-drone script for N>1) |
| `--stack NAME[:ENTRY]` | Launches `stacks/NAME/launch/ENTRY.launch.xml` (default entry: `stack`). Stacks are the **only** launch dispatch; no `--stack` = `full_default`. `NAME:onboard` / `NAME:offboard` select split-stack entries |
| `--fleet NAME` | Launches `config/fleets/NAME.yaml`: validates it, exports `FLEET_CONFIG_FILE`, derives `NUM_ROBOTS`, selects the Isaac fleet spawner (`fleet_spawn.py`), and for heterogeneous fleets includes the generated per-robot services. Mutually exclusive with `--robots` |
| `--headless` | Sets `ISAAC_SIM_HEADLESS=true`, `MS_AIRSIM_HEADLESS=true`, `QT_QPA_PLATFORM=offscreen` |
| `--headless` | Sets `ISAAC_SIM_HEADLESS=true`, `MS_AIRSIM_HEADLESS=true`, `PROJECT_AIRSIM_HEADLESS=true`, `QT_QPA_PLATFORM=offscreen` |
| `--physics fast-physics\|jsbsim` | Project AirSim only: exports `PROJECT_AIRSIM_PHYSICS` (vehicle dynamics for every robot; default `fast-physics`, `jsbsim` experimental) |
| `--play` / `--no-play` | Whether the sim auto-presses Play on start (`PLAY_SIM_ON_START`) |
| `--no-autolaunch` | Containers start **idle** (no tmuxinator launch sequence) — the development mode |
| `--wait` | Block until the stack is flight-ready (runs `airstack ready` after up) |
Expand All @@ -82,6 +83,7 @@ plus optional compose service names and passthrough flags (`--build`, `--recreat
airstack up # default profile from .env
airstack up --sim isaac --robots 2 # Isaac, two robots, consistent sim script
airstack up --sim airsim --headless --play --wait
airstack up --sim projectairsim --scene neighborhood # Project AirSim (UE5), LiDAR + stereo
airstack up --stack lite_default --sim isaac # launch a specific stack
airstack up --stack lite_offload_global:offboard # split-stack ground half
airstack up --fleet sim_three_mixed --sim isaac # fleet launch (RFC #380)
Expand Down Expand Up @@ -141,9 +143,10 @@ rebuild on next up) — it does **not** touch containers, volumes, or networks.
### Container naming convention

Compose generates names of the form `<project>-<service>-<index>`. With the default
`PROJECT_NAME="airstack"`: `airstack-robot-desktop-1`, `airstack-isaac-sim-1`,
`airstack-ms-airsim-1`, `airstack-gcs-1`, `airstack-docs-1`. With `--robots 2` you
also get `airstack-robot-desktop-2`. Always confirm with `airstack status` or
`PROJECT_NAME="airstack"`: `airstack-robot-desktop-1`, `airstack-gcs-1`,
`airstack-docs-1`. With `--robots 2` you also get `airstack-robot-desktop-2`.
Simulator services set a fixed `container_name` instead: `isaac-sim`,
`ms-airsim`, `project-airsim`. Always confirm with `airstack status` or
`docker ps --format '{{.Names}}'` rather than guessing.

## Modules, Stacks, Fleets, Doctor (RFC #379/#380)
Expand Down Expand Up @@ -200,7 +203,7 @@ and which ground hosts run split-stack offboard halves. Guide:
airstack fleet list # table: robots, vehicles, stacks, shape (homogeneous/heterogeneous/+split)
airstack fleet generate <fleet> # write .airstack/generated/docker-compose.fleet.yaml (heterogeneous only;
# homogeneous fleets need no generation — deploy.replicas handles them)
airstack up --fleet <name> [--sim isaac|airsim]
airstack up --fleet <name> [--sim isaac|airsim|projectairsim]
```

### Sync from `airstack.yaml`
Expand Down Expand Up @@ -374,7 +377,7 @@ For full details on **pytest system tests** (fixtures, all 11 marks, `--stack` /
`--fleet` options, metrics, `/pytest` CI), see the
[`run-system-tests`](../run-system-tests/SKILL.md) skill and
[`tests/README.md`](../../../tests/README.md). For **authoring and running
scenarios inside Isaac Sim or AirSim** (missions, RViz checks, scene tweaks), see
scenarios inside Isaac Sim, Project AirSim, or AirSim** (missions, RViz checks, scene tweaks), see
the [`test-in-simulation`](../test-in-simulation/SKILL.md) skill.

### Lint and format
Expand Down Expand Up @@ -471,7 +474,7 @@ airstack commands # list every registered command
airstack install # Install Docker + nvidia-container-toolkit (one time)
airstack setup # Shell function, submodules, config, module sync (one time)
airstack up # Start default profile from .env (stack: full_default)
airstack up --sim isaac|airsim # Pick the simulator (profile + URDF + Isaac script derived)
airstack up --sim isaac|airsim|projectairsim|simple # Pick the simulator (profile + URDF + Isaac script derived)
airstack up --sim isaac --robots 2 # Multi-robot (keeps NUM_ROBOTS and the sim script consistent)
airstack up --stack lite_default --sim isaac # Launch a specific stack
airstack up --stack lite_offload_global:offboard # Split-stack entry point
Expand Down
2 changes: 1 addition & 1 deletion .airstack/modules/module.sh
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ maintainer: ${maintainer}
license: TODO
type: ros_package # isaac_extension | ros_package | data | platform
airstack_compat: "${compat}"
targets: [robot] # host containers touched: robot | gcs | isaac-sim | ms-airsim
targets: [robot] # host containers touched: robot | gcs | isaac-sim | ms-airsim | project-airsim

deps: {apt: [], pip: []} # dep tier 1; rosdep keys live in package.xml
dockerfile: null # tier 2: Dockerfile.module using ARG BASE_IMAGE
Expand Down
2 changes: 1 addition & 1 deletion .airstack/modules/ready.sh
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function _ready_run_gates {
results[sim_clock]=ok
else
results[sim_clock]=failed
log_error "Sim never published /clock. Inspect the sim: airstack connect isaac-sim (or ms-airsim), or airstack logs <sim>"
log_error "Sim never published /clock. Inspect the sim: airstack connect isaac-sim (or ms-airsim / project-airsim), or airstack logs <sim>"
log_error "If PLAY_SIM_ON_START=false, press Play in the Isaac Sim window."
READY_OVERALL=1
fi
Expand Down
Loading
Loading