diff --git a/ros2bag/ros2bag/verb/play.py b/ros2bag/ros2bag/verb/play.py index 1047f6eb3..7fbcb4dcb 100644 --- a/ros2bag/ros2bag/verb/play.py +++ b/ros2bag/ros2bag/verb/play.py @@ -169,7 +169,7 @@ def add_arguments(self, parser, cli_name): # noqa: D102 choices=['debug', 'info', 'warn', 'error', 'fatal'], help='Logging level.') parser.add_argument( - '--progress-bar', type=float, default=10.0, + '--progress-bar', type=float, default=3.0, help='Print a progress bar of the playback player at a specific frequency in Hz. ' 'Default is %(default)d. ' 'Negative values mark an update for every published message, while ' diff --git a/rosbag2_transport/include/rosbag2_transport/play_options.hpp b/rosbag2_transport/include/rosbag2_transport/play_options.hpp index cf2ad2212..975792112 100644 --- a/rosbag2_transport/include/rosbag2_transport/play_options.hpp +++ b/rosbag2_transport/include/rosbag2_transport/play_options.hpp @@ -125,7 +125,7 @@ struct PlayOptions ServiceRequestsSource service_requests_source = ServiceRequestsSource::SERVICE_INTROSPECTION; // Rate in Hz at which to print progress bar. - double progress_bar_print_frequency = 10.0; + double progress_bar_print_frequency = 3.0; }; } // namespace rosbag2_transport diff --git a/rosbag2_transport/src/rosbag2_transport/play_options.cpp b/rosbag2_transport/src/rosbag2_transport/play_options.cpp index 64861f893..c38683f51 100644 --- a/rosbag2_transport/src/rosbag2_transport/play_options.cpp +++ b/rosbag2_transport/src/rosbag2_transport/play_options.cpp @@ -59,6 +59,8 @@ Node convert::encode( node["disable_loan_message"] = play_options.disable_loan_message; + node["progress_bar_print_frequency"] = play_options.progress_bar_print_frequency; + return node; } @@ -114,6 +116,9 @@ bool convert::decode( optional_assign(node, "disable_loan_message", play_options.disable_loan_message); + optional_assign( + node, "progress_bar_print_frequency", play_options.progress_bar_print_frequency); + return true; }