16.3. rosbag Time Updater
This tool can be used to update the playback timestamps in a rosbag file to use the cFS timestamp instead. This can be useful when the rosbag file is created on the flight side and then is used on the ground. Once the new file is generated then it can be used with the standard rosbag playback utility and will play back using the timestamps specified in the CCSDS of the cFS messages.
16.3.1. Install the rosbag utility
$ pip install rosbags
16.3.2. Edit the config to set paths
Edit the file brash/src/brash_tools/rosbag_time_converter/config/rosbag_time_converter.yaml and set these paths:
msg_dir: '<path to BRASH>/src/cfe_ros2_bridge_plugin/cfe_msgs/msg'
src_path: '<path to existing bag file>'
dst_path: '<path to file to be created by this tool>'
Also in this file select which time should be used:
time_to_use: 'ROS2'
The available choices are ‘CCSDS’ and ‘ROS2’.
16.3.3. Run the tool
$ ros2 launch rosbag_time_converter rosbag_time_converter.launch.py