|
| 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