Skip to content

Commit

Permalink
update default rate
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaloi committed Nov 10, 2024
1 parent 43fa0f8 commit eb9ea35
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ros2bag/ros2bag/verb/play.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 '
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions rosbag2_transport/src/rosbag2_transport/play_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ Node convert<rosbag2_transport::PlayOptions>::encode(

node["disable_loan_message"] = play_options.disable_loan_message;

node["progress_bar_print_frequency"] = play_options.progress_bar_print_frequency;

return node;
}

Expand Down Expand Up @@ -114,6 +116,9 @@ bool convert<rosbag2_transport::PlayOptions>::decode(

optional_assign<bool>(node, "disable_loan_message", play_options.disable_loan_message);

optional_assign<double>(
node, "progress_bar_print_frequency", play_options.progress_bar_print_frequency);

return true;
}

Expand Down

0 comments on commit eb9ea35

Please sign in to comment.