Skip to content

Commit a1287ca

Browse files
JohnYanxinLiuclaude
andcommitted
add a real-robot OptiTrack deployment override
Mocap counterpart to l4t-px4-realrobot.env: same Jetson stack, plus the NatNet server/body settings and LAUNCH_NATNET. Carries the two things that are easy to get wrong and produce no error. The body id must match Motive's streaming id, since the client filters frames numerically and a mismatch just never publishes. And nothing writes the EKF2 external-vision parameters to a real FCU — px4_param_setter only reads them back and warns — so they have to be set once in QGroundControl. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 2071bdb commit a1287ca

2 files changed

Lines changed: 79 additions & 0 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Added
1111

12+
- `overrides/l4t-optitrack-realrobot.env` — deployment override for a real Jetson robot flying on OptiTrack mocap (PX4 EKF2 external vision instead of GPS): the NatNet server/body settings, plus the multi-NIC and FCU-parameter notes that path needs
1213
- Feature notebook workflow (`use-feature-notebook` skill): every agent-implemented feature gets a local, gitignored `notebook/NNN-feature-slug/` entry with a status-tracked `design_spec.md` (written before coding) and `results/` artifacts + self-contained `results_summary.md` that populate the feature's PR description
1314
- Battery and telemetry display in GCS RQT control panel (voltage and percentage per robot when MAVROS battery topic is bridged)
1415
- `TARGET_ARCH` build arg (default `x86_64`) in `Dockerfile.robot` to arch-parametrize `LD_LIBRARY_PATH`; `docker-compose.yaml` passes `TARGET_ARCH: aarch64` to the `voxl` and `l4t` real-robot image builds
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Real-robot deployment on an NVIDIA Jetson (aarch64 / l4t) flying on OptiTrack mocap:
2+
# PX4 EKF2 fuses the mocap pose as external vision instead of GPS.
3+
#
4+
# Same as overrides/l4t-px4-realrobot.env plus the OptiTrack path. Use that file instead
5+
# if the vehicle flies on GPS.
6+
#
7+
# Build (first time / after image changes):
8+
# airstack image-build --profile l4t robot-l4t
9+
# Run:
10+
# airstack up --env-file overrides/l4t-optitrack-realrobot.env robot-l4t
11+
#
12+
# Data path:
13+
# Motive -> natnet_ros2 -> vision_pose_converter
14+
# -> /{robot}/interface/mavros/vision_pose/pose_cov -> PX4 EKF2
15+
#
16+
# Setup guide, including the PX4 parameters this expects on the FCU:
17+
# docs/robot/px4_external_vision.md
18+
19+
# Only bring up the Jetson stack (robot-l4t + zed-l4t).
20+
COMPOSE_PROFILES="l4t"
21+
22+
# Launch the autonomy stack automatically on container start.
23+
AUTOLAUNCH="true"
24+
NUM_ROBOTS="1"
25+
26+
# Launches entire robot autonomy stack
27+
AUTONOMY_ROLE="full"
28+
29+
# --- Robot identity -----------------------------------------------------------
30+
# Resolved from this device's hostname: name the Jetson robot-1 on the HOST
31+
# Run the following: ``hostnamectl set-hostname robot-1``
32+
# resulting in robot_1 on domain 1.
33+
# A hostname that matches no rule in default_robot_name_map.yaml falls through to
34+
# unknown_robot on domain 0; the container prints a warning at shell start when it does.
35+
36+
# --- OptiTrack / NatNet -------------------------------------------------------
37+
LAUNCH_NATNET="true"
38+
39+
# IP of the PC running Motive. THE ONE SETTING THAT ALWAYS DIFFERS PER SITE — there is no
40+
# sensible default, so set it before the first flight.
41+
NATNET_SERVER_IP="192.168.1.100"
42+
43+
# Rigid body to track. The NatNet client filters incoming frames by NUMERIC id, so the id
44+
# must match the rigid body's streaming id in Motive exactly — a mismatch gives you a
45+
# client that connects and then never publishes, with no error. The name is matched
46+
# case-sensitively and is only used for logging/lookup.
47+
NATNET_BODY_NAME="Drone"
48+
NATNET_BODY_ID="1"
49+
50+
# Multi-NIC note: natnet_config.yaml binds client_ip 0.0.0.0 by default. Motive learns
51+
# where to send unicast data from the inbound packet's source IP, so if this Jetson has
52+
# both wifi and a wired link to the OptiTrack LAN, confirm the mocap traffic actually
53+
# leaves the wired interface.
54+
#
55+
# Also make sure the OptiTrack LAN link does not hand out DNS or a default route, or its
56+
# router will hijack name resolution and take down internet access over wifi:
57+
# nmcli con mod "<wired connection>" ipv4.ignore-auto-dns yes ipv4.never-default yes
58+
59+
# --- Flight controller (MAVROS) ----------------------------------------------
60+
# Jetson UART. Note some airframes wire the FCU through an external USB-serial adapter
61+
# instead, in which case this is e.g. /dev/ttyUSB0:921600 — check yours.
62+
FCU_URL="/dev/ttyTHS4:115200"
63+
64+
# PX4 EKF2 must be configured for external vision (EKF2_EV_CTRL, EKF2_HGT_REF, GPS off,
65+
# ...). Unlike the sim — where the same parameters are pushed at SITL boot — nothing here
66+
# writes them to a real FCU. Set them once in QGroundControl per the setup guide above.
67+
# On startup px4_param_setter READS them back and warns on any mismatch (it is a checker
68+
# by default, auto_set: false in natnet_ros2/config/px4_params.yaml), so a missed
69+
# parameter shows up in the logs rather than in the air.
70+
71+
# --- Robot description (PX4 iris w/ sensors; override for your airframe) ------
72+
URDF_FILE="robot_descriptions/iris/urdf/iris_with_sensors.pegasus.robot.urdf"
73+
74+
# --- Flight-data recording ----------------------------------------------------
75+
# Where rosbags land on the host (bind-mounted to /bags in-container). RECORD_BAGS brings
76+
# the recorder up; start/stop it from the GCS control panel.
77+
BAG_STORAGE_PATH="/media/airlab/Storage/airstack_collection"
78+
RECORD_BAGS="false"

0 commit comments

Comments
 (0)