A terminal UI for recording ROS2 bags (strongly inspired by rosbag_fancy).
Some of its features:
- Sort by message count, topic type, frequency, bandwith, duration, disk size...
- Adaptive display based on terminal window size
- Same arguments as
rosbag2(ros2 bag record) - Colors indicate 'no msgs received' (yellow) and 'no publisher' (red)
- Specify arguments per command line or YAML file
- Publishes status topic (optional)
If you are familiar with ros2 bag record, you can use hector_recorder as a drop-in replacement with additional convenience.
- ROS 2 (tested for jazzy)
- ncurses
- fmt
- yaml-cpp
sudo apt update &&
sudo apt install libncurses-dev libfmt-dev libyaml-cpp-dev
# clone this repo into your ros2 workspace, then build:
colcon build --packages-select hector_recorder hector_recorder_msgs
source install/setup.bashbag_recorder <args>Place all ROS arguments at the end of the command line.
bag_recorder <args> --ros-args -r __ns:=my_namespaceWe support almost all ros2 bag record arguments as explained in the official documentation.
In addition, there is:
--max-bag-size-gb Specify the split size in GB instead of bytes
--publish-status If true, recorder stats will be published on a topic
--config Load all parameters from a YAML file (see below for more details)
By pressing keys 1-8 you can sort the table by the respective column.
-
Record everything (all topics & services):
bag_recorder --all
-
Record specific topics:
bag_recorder --topics /tf /odom
-
Load from YAML:
bag_recorder --config /path/to/config.yaml
All arguments can be specified either via command line or in a config file.
Example:
node_name: "my_node_name" # defaults to 'hector_recorder'
output: "/tmp/bags" # will be normalized, timestamp subdir if directory
topics:
- "/tf"
- "/odom"
max_bag_duration: 60 # split the bag at 60s
publish_status: true # publish hector_recorder_msgs statusSee here for all available parameters and their default values: hector_recorder/config/default.yaml
- If
--output/-ois not specified, a timestamped folder in the current directory is created. -o some_dircreatessome_dir(works with absolute/relative paths)- If you want to have timestamped bag files in a specified log dir (useful for automatic logging), you can append a slash:
-o some_dir/createssome_dir/rosbag_<stamp>
- Add/test qos-profile-overrides-path
This project includes components from:
