Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ PROJECT_NAME="airstack"
# If you've run ./airstack.sh setup, then this will auto-generate from the git commit hash every time a change is made
# to a Dockerfile or docker-compose.yaml file. Otherwise this can also be set explicitly to make a release version.
# auto-generated from git commit hash
VERSION="0.19.0-alpha.8"
VERSION="0.19.0-alpha.12"
# Choose "dev" or "prebuilt". "dev" is for mounted code that must be built live. "prebuilt" is for built ros_ws baked into the image
DOCKER_IMAGE_BUILD_MODE="dev"
# Where to push and pull images from. Can replace with your docker hub username if using docker hub.
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Robot name resolution now honors a pre-set `ROBOT_NAME` (e.g. injected via docker compose) instead of always overriding it from the container/hostname mapping (`robot/docker/.bashrc`)
- Robot name-map catch-all fallback now maps to `unknown_robot` (valid ROS namespace token) instead of `unknown-robot` (`default_robot_name_map.yaml`)
- l4t robot image: replace dustynv's `/ros_entrypoint.sh` with a passthrough so its prebuilt source-ROS libs (older `fastcdr`) no longer shadow the apt Jazzy runtime and crash apt-built nodes like MAVROS
- `RECORD_BAGS=true` never enabled bag recording on a robot: `logging.launch.xml` hardcoded `record_bag=false` and `onboard_autonomy_all.launch.xml` includes it with no arguments, so the variable was forwarded into the container and read by nobody (only `gcs.launch.xml` consumed it). It now reads `RECORD_BAGS`, selects its topic set via `LOG_CONFIG`, and starts recording at bringup (`auto_start`, `BAG_AUTO_START=false` to opt out)
- `ROBOT_NAME` / `ROS_DOMAIN_ID` can now be set from an override env file: `.bashrc` already honored a pre-set `ROBOT_NAME`, but no compose service forwarded it, so the override had no effect. Required for hosts whose hostname doesn't match `default_robot_name_map.yaml` (a Jetson named `airlab-desktop` otherwise comes up as `unknown_robot` on domain 0). Single-robot only — replicas must leave these unset

## [1.0.0] - 2024-12-19

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,16 @@ def __init__(self):
self.declare_parameter(
"mcap_qos_dir", ""
)


# Begin recording immediately on bringup instead of waiting for a
# set_recording_status=true message. Defaults false so the existing
# toggle-driven behavior is unchanged for anyone not setting it.
self.declare_parameter("auto_start", False)

self.cfg_path = self.get_parameter("cfg_path").get_parameter_value().string_value
self.output_dir = self.get_parameter("output_dir").get_parameter_value().string_value
self.mcap_qos_dir = self.get_parameter("mcap_qos_dir").get_parameter_value().string_value
self.auto_start = self.get_parameter("auto_start").get_parameter_value().bool_value

self.active = False
self.cfg = yaml.safe_load(open(self.cfg_path))
Expand Down Expand Up @@ -71,6 +77,10 @@ def __init__(self):

self.timer = self.create_timer(0.5, self.pub_status_callback)

if self.auto_start:
self.get_logger().info("auto_start=true — beginning recording on bringup.")
self.run()

def add_topics(self):
'''The configuration file looks like

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
<!-- LOGGING -->
<launch>
<arg name="record_bag" default="false" />

<!-- RECORD_BAGS is forwarded into the robot container by
robot/docker/robot-base-docker-compose.yaml, but this file used to hardcode
record_bag=false and onboard_autonomy_all.launch.xml includes it with no
arguments — so RECORD_BAGS=true never reached the recorder on a robot (only
gcs.launch.xml read it). Reading the env here is what makes the flag work.
An explicit default keeps this launchable when the variable is unset. -->
<arg name="record_bag" default="$(env RECORD_BAGS false)" />
<!-- Which topic set to record: a filename in logging_bringup/config. -->
<arg name="log_config" default="$(env LOG_CONFIG log.yaml)" />

<group if="$(var record_bag)">
<node name="bag_record" pkg="bag_record_pid" exec="bag_record_node">
<param name="cfg_path" value="$(find-pkg-share logging_bringup)/config/log.yaml" />
<param name="cfg_path" value="$(find-pkg-share logging_bringup)/config/$(var log_config)" />
<param name="output_dir" value="/bags" />
<param name="mcap_qos_dir" value="$(find-pkg-share bag_record_pid)/config" />
<!-- Start recording at bring-up. RECORD_BAGS already gates whether this node
runs at all, so waiting for a further set_recording_status toggle just
yields a running recorder that records nothing on an unattended robot.
Set BAG_AUTO_START=false to restore the toggle-driven behavior. -->
<param name="auto_start" value="$(env BAG_AUTO_START true)" />
</node>
</group>

</launch>
18 changes: 17 additions & 1 deletion robot/docker/robot-base-docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,24 @@ services:
- DISPLAY=${DISPLAY}
- QT_X11_NO_MITSHM=1
- QT_QPA_PLATFORM
# Record bags
# Record bags. LOG_CONFIG picks which topic set in logging_bringup/config to
# record; BAG_AUTO_START=false reverts to waiting for a set_recording_status
# toggle instead of recording from bringup. Both read by logging.launch.xml.
- RECORD_BAGS=${RECORD_BAGS}
- LOG_CONFIG=${LOG_CONFIG:-log.yaml}
- BAG_AUTO_START=${BAG_AUTO_START:-true}
# Pre-set robot identity. .bashrc keeps a non-empty ROBOT_NAME instead of
# resolving one from the container/hostname map, so this is the only way to name
# a robot whose hostname doesn't match default_robot_name_map.yaml (e.g. a Jetson
# named "airlab-desktop", which otherwise falls through to unknown_robot on
# domain 0). Unset yields an empty string, which .bashrc treats as absent — so
# the existing mapping path is unchanged when an override doesn't set these.
#
# SINGLE ROBOT ONLY: replica deployments (deploy.replicas / NUM_ROBOTS>1) share
# one env, so setting these would collapse every replica onto the same name and
# domain. Leave them unset there and let the container-name mapping do its job.
- ROBOT_NAME=${ROBOT_NAME}
- ROS_DOMAIN_ID=${ROS_DOMAIN_ID}
# docker compose interpolation to env variables
- AUTONOMY_ROLE=${AUTONOMY_ROLE:-full}
- URDF_FILE=${URDF_FILE}
Expand Down
Loading