Add CLI option to set compression threads priority for Rosbag2 recorder #1760
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
Description
We need to add a CLI parameter for the
ros2 bag record
parameter to be able to set up compression threads priority.Related Issues
Completion Criteria
The CLI parameter for compression threads priority exists and is covered by unit tests.
Implementation Notes / Suggestions
We already have the corresponding member variable
RecordOptions::compression_threads_priority
which matches to theCompressionOptions::thread_priority
in theReaderWriterFactory::make_writer(..)
method.This is going to be a relatively low-effort and straightforward task since changes are expected to be only at the
ros2bag
and mayberosbag2_py
packages. Perhaps without breaking API/ABI compatibility, and it will be possible to backport to the Jazzy branch.Testing Notes / Suggestions
We will need to add new or modify existing test in the
ros2bag/test/test_recorder_args_parser.py
to verify the correctness of the CLI parameter parser with the new CLI option.Also, it will be great to add one integration test to the
ros2bag/test/test_record.py
to simply start the rosbag2 recorder with the newly added parameter and verify the debug output in the console. To facilitate debug output verification in the test will need to add someROSBAG2_COMPRESSION_LOG_INFO_STREAM(..)
orROSBAG2_COMPRESSION_LOG_DEBUG_STREAM(..)
output in the constructor of theand runSequentialCompressionWriter::SequentialCompressionWriter(..)
ros2 bag record
with corresponding--loglevel
parameter from integration test. Note. This is supposed to be just a sanity check that the recorder can start with the settled-up CLI option. No need to publish messages and do a real recording with verification.Update:
Actually will be better to add debug output to the
void SequentialCompressionWriter::compression_thread_fn()
rosbag2/rosbag2_compression/src/rosbag2_compression/sequential_compression_writer.cpp
Lines 112 to 117 in cbef00f
Somewhere before
while (true) {
loopThe text was updated successfully, but these errors were encountered: