█████╗ ██████╗ ██╗██████╗ ██╗██╗ ██╗
██╔══██╗██╔════╝ ██║██╔══██╗██║╚██╗██╔╝
███████║██║ ███╗██║██████╔╝██║ ╚███╔╝
██╔══██║██║ ██║██║██╔═══╝ ██║ ██╔██╗
██║ ██║╚██████╔╝██║██║ ██║██╔╝ ██╗
╚═╝ ╚═╝ ╚═════╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝
██╗ ██████╗ ██████╗ ██████╗ ███████╗██████╗ ██║ ██╔═══██╗██╔════╝ ██╔════╝ ██╔════╝██╔══██╗ ██║ ██║ ██║██║ ███╗██║ ███╗█████╗ ██████╔╝ ██║ ██║ ██║██║ ██║██║ ██║██╔══╝ ██╔══██╗ ███████╗╚██████╔╝╚██████╔╝╚██████╔╝███████╗██║ ██║ ╚══════╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝ Advanced ROS2 logging for Agipix Platform
Interactive CLI and ROS 2 autostart logger for recording ROS 2 bags and transferring files over TCP.
- Interactive menu when running
agi-loggerwithout arguments. - Foreground recording with full rosbag output (Ctrl+C stops recording cleanly).
- Config-driven defaults from
cfg/configs.yamlwith an interactive editor. - Settings editor split into Logger and TCP (Server/Client) sections with colorized output.
- TCP transfer automatically blocked while logging is active.
- ROS 2 autostart node that listens to
/fmu/out/vehicle_statusand starts recording on arming. - Interactive bag playback selector with arrow-key list and
qto stop playback. - Optional background recording via
--background.
- Install (editable):
cd /workspaces/logging/src/agi_logger pip install -e .
- Ensure ROS 2 and px4_msgs are installed and your ROS environment is sourced.
- Open interactive menu:
agi-logger - Show CLI help:
agi-logger --help - Start recording (foreground):
agi-logger record start - Start recording in background:
agi-logger record start --background - Stop background recording:
agi-logger record stop - Show status (background only):
agi-logger record status - Start ROS 2 autostart node:
agi-logger ros2 autostart - Open settings menu:
agi-logger settings - Play a bag (interactive list):
agi-logger play
Configuration defaults are loaded from cfg/configs.yaml.
Running agi-logger without arguments shows:
- Record: previews logger settings, then Enter = start / e = edit logger settings.
- Transfer: choose server/client, preview settings, then Enter = start / e = edit that section.
- Play: arrow-key list of bag directories under
logger.bag_path. - Settings: opens the editor directly.
- Logger settings: edit only the logger section values.
- TCP settings: choose Server or Client sections.
- Enter at value prompt keeps current value; Enter at selection list goes back.
Starts recording when auto_start is true and the vehicle is armed (PX4 VehicleStatus).
- Run:
agi-logger ros2 autostart
Uses the config values in cfg/configs.yaml.
- Server:
agi-logger tcp send - Client:
agi-logger tcp receive - Auto mode:
agi-logger tcp run(respectstcp_file_communication.mode)
TCP transfer is disabled while recording is active.
agi-logger play opens a scrollable list of bag directories under logger.bag_path.
- Use UP/DOWN to select, Enter to play,
cto change directory,qto go back. - During playback,
qstops playback and returns to the list. Built-in rosbag controls (space, arrows) remain available.
The repository includes legacy scripts for reference:
- bags/bag_record.sh: timed rosbag recorder with MCAP, compression, QoS overrides, max size, and per-bag metadata.
- bags/play_bags.sh: loops through
timed_bag_*directories and plays them in order.
Example usage:
bash bags/bag_record.sh /topic1 /topic2 --name=run1 --path=~/bags --mcap --compressbash bags/play_bags.sh