Skip to content

feat: validate external simulator bridge against Basilisk - #39

Merged
Accommodus merged 8 commits into
mainfrom
feat/24-validate-external-bridge
Apr 21, 2026
Merged

Accommodus merged 8 commits into
mainfrom
feat/24-validate-external-bridge

Conversation

@1ptqc-KD-97bsBG-pVJG

Copy link
Copy Markdown
Collaborator

Closes #24.

Summary

This PR completes validation of the generic external simulator bridge against Basilisk while preserving ASTRO's existing ROS-facing contract.

It keeps the bridge simulator-agnostic, isolates Basilisk-specific behavior behind an internal backend, and adds both deterministic regression coverage and pinned-runtime Basilisk validation.

What changed

  • added the external_sim_bridge ROS 2 package as a generic bridge between ASTRO and external simulators
  • preserved the existing public ROS contract:
    • env_data remains a 6-element Float64MultiArray ordered [x, y, z, vx, vy, vz]
    • actuation_cmd remains distributed_satellite_sim/srv/ActuationCmd
  • kept gnc_node unchanged
  • added a deterministic linear/fake backend for bridge-core regression coverage
  • added a Basilisk backend for the fixed translational validation scenario
  • documented the bridge contract, Basilisk assumptions, and manuscript/paper alignment in src/external_sim_bridge/doc/design_note.md
  • re-anchored the bridge regression test to the canonical DLQR fixture owned by distributed_satellite_sim
  • installed the canonical trajectory fixture from distributed_satellite_sim so downstream tests can resolve it through ament_index
  • added a dedicated GitHub Actions workflow that validates the bridge in the ROS Kilted image with bsk==2.10.0

Basilisk validation details

  • pins the validation runtime to bsk==2.10.0
  • validates direct Basilisk backend behavior
  • validates the end-to-end gnc_node -> actuation_cmd -> bridge -> Basilisk loop
  • fixes Basilisk command handling so post-start actuation updates are written with the current sim timestamp rather than the default 0 ns

Why this matters

This PR moves the branch from “generic bridge implemented” to “generic bridge validated against Basilisk” without turning the bridge into a Basilisk-only design.

The simulator-specific logic remains in the Basilisk backend. The ROS-side contract remains unchanged and reusable for additional external simulators later.

Testing

Validated in ghcr.io/accommodus/astro:latest with ROS 2 Kilted and bsk==2.10.0:

  • rosdep install --from-paths src --ignore-src -y
  • colcon build --packages-select distributed_satellite_sim external_sim_bridge
  • ASTRO_EXPECT_BASILISK=1 colcon test --packages-select external_sim_bridge
  • colcon test-result --verbose

Result:

  • 11 tests, 0 errors, 0 failures, 0 skipped

Notes for reviewers

  • the validation scenario is intentionally narrow: a fixed translational Basilisk path used to confirm bridge compatibility
  • this PR does not broaden the public ROS interface or implement the richer ROS-side GNC decomposition discussed elsewhere
  • the bridge remains generic; Basilisk is the first validated backend, not the contract itself

@Accommodus
Accommodus merged commit 83e47c4 into main Apr 21, 2026
2 checks passed
@Accommodus
Accommodus deleted the feat/24-validate-external-bridge branch April 21, 2026 22:00
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.

feat: validate generic external simulator bridge against Basilisk

2 participants