Skip to content

l4t infra fixes: aarch64 build args + robot-name resolution#370

Merged
JohnYanxinLiu merged 1 commit into
developfrom
johnliu/l4t-infra-fixes
Jul 21, 2026
Merged

l4t infra fixes: aarch64 build args + robot-name resolution#370
JohnYanxinLiu merged 1 commit into
developfrom
johnliu/l4t-infra-fixes

Conversation

@JohnYanxinLiu

@JohnYanxinLiu JohnYanxinLiu commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

What features did you add and/or bugs did you address?

  • Which GitHub issue does this address?

    No dedicated issue. This is a foundational infra PR extracted from Johnliu/optitrack emulation #367 (OptiTrack emulation) so the generic real-robot deployment fixes can be reviewed and merged first; Johnliu/optitrack emulation #367 is then rebased on top, shrinking its diff. It also unblocks the upcoming l4t (Jetson) profile work.

  • Additional description if not fully described in the GitHub issue

    Two independent concerns, both generic (nothing OptiTrack-specific):

    1. aarch64 (Jetson/l4t, voxl) image builds

    • Dockerfile.robot: add ARG TARGET_ARCH=x86_64 and use it to parametrize LD_LIBRARY_PATH (.../lib/${TARGET_ARCH}-linux-gnu) so the arm64 images link against the correct arch triplet instead of the hard-coded x86_64.
    • Dockerfile.robot: install ros-${ROS_DISTRO}-mavros-extras (generic MAVROS dependency; also provides the vision_pose plugin used by external-pose deployments).
    • docker-compose.yaml: pass TARGET_ARCH: aarch64 to the voxl and l4t image builds.

    2. Robot name resolution ("robot launches with no name" bug)

    • .bashrc: honor a pre-set ROBOT_NAME (e.g. injected via docker compose) instead of always overriding it from the container/hostname mapping. The bws() flock build lock is retained.
    • default_robot_name_map.yaml: catch-all fallback maps to unknown_robot (a valid ROS namespace token) instead of unknown-robot (a hyphen makes the namespace invalid and launch fails).
  • Please add videos and images to demonstrate the feature.

    N/A — build-arg + shell/config changes, no runtime UI.

How did you implement it?

  • TARGET_ARCH defaults to x86_64, so the desktop/CI build is byte-for-byte unchanged; only the voxl/l4t services opt into aarch64.
  • The name-resolution change is a guard (if [ -z "${ROBOT_NAME:-}" ]; then ... fi) wrapped around the existing container/hostname mapping block — no behavior change when ROBOT_NAME is unset.

How do you run and use it?

  • Desktop (unchanged, sanity check the default arch path still builds):
    AUTOLAUNCH=false airstack up robot-desktop
  • aarch64 image build (on a Jetson / arm64 host):
    airstack image-build --profile l4t robot-l4t
  • Verify a pre-set ROBOT_NAME is honored:
    docker exec -e ROBOT_NAME=robot_1 <container> bash -lc 'echo $ROBOT_NAME'   # -> robot_1

Testing with PyTest

  • No new pytests. This PR is infra/build plumbing; there is no runtime surface with a hermetic test hook. The existing build_packages / build_docker suites exercise the affected Dockerfile/compose.
  • Command (optional, GPU runner): airstack test -m "build_docker or build_packages" -v
  • Expected: robot images build; TARGET_ARCH default keeps the x86 build identical to develop.

Documentation

  • Was mkdocs.yml updated? (y/n) n — no new module or user-facing doc page; changes are within existing docker/config files. CHANGELOG.md updated.
  • Docs scope: existing multi-robot / docker docs remain accurate.
  • Visual media: N/A.

Versioning

  • Yes — bumped .env VERSION 0.19.0-alpha.50.19.0-alpha.6 per semantic versioning (trailing alpha label increment). CHANGELOG [Unreleased] updated.

Generated with Claude Code

Foundational real-robot deployment fixes extracted from the OptiTrack
emulation PR (#367) so they can be reviewed and merged first; #367 will be
rebased on top afterward, shrinking its diff.

Docker / ARM build:
- Add TARGET_ARCH build arg (default x86_64) to Dockerfile.robot and use it to
  parametrize LD_LIBRARY_PATH, so the aarch64 (Jetson/l4t, voxl) images link
  against the correct arch triplet.
- docker-compose.yaml passes TARGET_ARCH: aarch64 to the voxl and l4t image
  builds.
- Install ros-${ROS_DISTRO}-mavros-extras (generic dep; also provides the
  vision_pose plugin used by external-pose deployments).

Robot name resolution:
- .bashrc now honors a pre-set ROBOT_NAME (e.g. injected by docker compose)
  instead of always overriding it from the container/hostname mapping. The
  bws() flock build lock is retained.
- default_robot_name_map.yaml catch-all fallback maps to unknown_robot (valid
  ROS namespace token) instead of unknown-robot.

Version bumped 0.19.0-alpha.5 -> 0.19.0-alpha.6 for the version-increment gate.

Note: the trajectory_controller/trajectory_library robustness fixes originally
listed for extraction are already present on develop (PR #365), so they are not
included here.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@JohnYanxinLiu
JohnYanxinLiu marked this pull request as ready for review July 21, 2026 04:47
@JohnYanxinLiu
JohnYanxinLiu merged commit c476db3 into develop Jul 21, 2026
4 of 8 checks passed
JohnYanxinLiu added a commit that referenced this pull request Jul 21, 2026
…e resolution

Parametrize the robot-l4t compose service so a single service covers real
deployments without editing compose:
- AUTONOMY_ROLE and FCU_URL are now ${VAR:-default} overridable (and FCU_URL is
  unquoted so the literal serial path reaches mavros).
- Rosbag output path is BAG_STORAGE_PATH-overridable.

Update the configure-multi-robot skill to reflect the honor-pre-set-ROBOT_NAME
guard (#370): document pinning ROBOT_NAME in an override for a single real robot,
the never-on-the-shared-service caveat, and the unknown_robot fallback fixes by
topology.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

2 participants