Skip to content

Modular AirStack 4/9: asm_optitrack extraction, local-layer flatten - #391

Merged
andrewjong merged 7 commits into
developfrom
rfc/s4-optitrack-flatten-local
Aug 24, 2026
Merged

Modular AirStack 4/9: asm_optitrack extraction, local-layer flatten#391
andrewjong merged 7 commits into
developfrom
rfc/s4-optitrack-flatten-local

Conversation

@andrewjong

Copy link
Copy Markdown
Member

Stacked PR — merge the stack bottom-up with merge commits (squash-merging a lower PR orphans the commits every higher PR builds on). When the PR below merges, GitHub retargets this one to develop automatically. Each PR bumps VERSION (0.20.0-alpha.N), so check-version-increment passes at every level and each merge publishes images.

Stack 4/9 · base: rfc/s3-stacks-wrap

First real extraction: OptiTrack leaves trunk for castacks/asm_optitrack (history preserved via git filter-repo), and the local layer flattens into stack entry files under the wiring-equality gate.

What's inside

  • OptiTrack trunk-removal: natnet_ros2, the PX4 external-vision fusion config, the Isaac Sim NatNet emulator (moves with the module — meaningless without it), integration + e2e tests, and docs all live in the module. The proprietary NatNet SDK stays a host-side hooks.host_setup download — never in images or git.
  • P5-E2 flatten: local*.launch.xml variant wiring hoisted into stack entries; module launch files become arg-declaring, canonical-defaulted, remap-free.
  • Hardening from extraction dogfood: stale-colcon-cache warnings on module sync, hook_env input for host hooks in module CI, sync self-heals partial checkouts, and a contract test banning stack entries from including the dispatcher (recursion guard).

Validation

  • asm_optitrack e2e 6/6: PX4 flies mocap-only EKF2 (Circle flights prove fusion, not just topic presence) against the in-sim emulator.
  • Flatten gate: empty wiring.md diff vs the wrap-form baselines for full_default and full_droan_cpu.
  • Evidence-based landing-timeout widening in the flight harness (pass margin was 0.1s).

🤖 Generated with Claude Code

andrewjong and others added 7 commits August 22, 2026 04:02
…ks/asm_optitrack

Trunk now carries zero natnet code. The module owns the whole mocap loop:
natnet_ros2 client + EV-fusion bridges, the Isaac Sim NatNet emulator
extension (moved with the module per its maintainer — it was the main value
of the OptiTrack PRs), the natnet Isaac launch scripts, the integration +
optitrack e2e tests, docs, and the optitrack-development skill.

- perception.launch.xml: LAUNCH_NATNET gate removed (stack include is the
  activation path — RFC #379's answer to env toggles); the env var warns for
  one release via preflight
- airstack setup: cmd_setup_natnet_sdk generalized to 'module sync' (module
  hooks.host_setup cover host-side SDK downloads); --no-natnet removed
- compose: LAUNCH_NATNET/NATNET_SERVER_IP env + emulator mounts removed;
  Dockerfile.isaac-ros no longer bakes the emulator (module loads it via the
  Kit exts mount); optitrack overrides/*.env deleted (module test_stack
  replaces them); px4-params/external-vision.env stays (generic EV fusion)
- tests: colcon unit-test entries removed; optitrack mark kept for module CI
- docs/robot/optitrack.md stub points at the module

Install: airstack module add https://github.com/castacks/asm_optitrack.git --version <tag>

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- canonical module launch files (declared, described topic args with
  canonical defaults; params in config yamls; scoped set_remap binds args
  inside each module's namespace group — no <remap>, graph unchanged):
  takeoff_landing_planner, fixed_trajectory_task, droan_gl (+18 params →
  config/droan_gl.yaml), droan_local_planner, disparity_expansion,
  trajectory_controller (+config yaml), pid_controller (+49 params → yaml)
- the three stack entry files now wire the local layer as flat module
  includes ('this module, these connections'); stacks differ only in the
  droan variant include + disparity source arg
- DELETED local_droan_cpu.launch.xml and local_macvo_obstacle_avoidance
  .launch.xml (superseded by stacks; the macvo one never worked); legacy
  local.launch.xml frozen byte-identical for the AUTONOMY_ROLE path until
  0.21; lint allowlist shrunk accordingly
- merge gate: graph equality vs the committed stacks/*/wiring.md baselines
  (GPU verification follows this commit)

Unit suite: 147 passed, 1 skipped.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Lets a caller export explicit KEY=VALUE pairs (e.g. proprietary-license
acceptance like NATNET_ACCEPT_LICENSE=1) into the hook step. Values appear in
logs — never secrets.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A package moved from trunk into a module keeps its old build/<pkg> CMake
cache in bind-mounted checkouts; colcon then fails with 'source does not
match cache'. Sync now detects and prints the exact (root-owned-safe)
cleanup command. Observe-and-report, never deletes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
robot.launch.xml includes the stack entry when AIRSTACK_STACK_DIR is set; a
stack entry wrapping robot.launch.xml recurses infinitely
(robot_1/robot_1/... namespace explosion) — found the hard way by the
asm_optitrack test_stack's interim wrap form.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A managed modules/<name> dir without .git (interrupted clone or partial
remove) made vcs import fail with 'destination path already exists'; sync now
clears such dirs before importing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@andrewjong
andrewjong changed the base branch from rfc/s3-stacks-wrap to develop August 24, 2026 20:30
@andrewjong
andrewjong merged commit 3e4e726 into develop Aug 24, 2026
2 of 3 checks passed
@andrewjong
andrewjong deleted the rfc/s4-optitrack-flatten-local branch August 24, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant