ros2bag.api package

Module contents

class ros2bag.api.SplitLineFormatter(prog, indent_increment=2, max_help_position=24, width=None)

Bases: HelpFormatter

Extend argparse HelpFormatter to allow for explicit newlines in help string.

ros2bag.api.add_standard_reader_args(parser: ArgumentParser) None
ros2bag.api.add_writer_storage_plugin_extensions(parser: ArgumentParser) None
ros2bag.api.check_not_negative_float(value: Any) float

Argparse validator to verify that a value is a float and that not negative.

ros2bag.api.check_not_negative_int(arg: str) int

Argparse validator to verify that a value is a int and not negative.

ros2bag.api.check_path_exists(value: Any) str

Argparse validator to verify a path exists.

ros2bag.api.check_positive_float(value: Any) float

Argparse validator to verify that a value is a float and positive.

ros2bag.api.convert_service_to_service_event_topic(services)
ros2bag.api.convert_yaml_to_qos_profile(qos_profile_dict: Dict) Dict[str, rclpy.qos.QoSProfile]

Convert a YAML file to use rclpy’s QoSProfile.

ros2bag.api.create_bag_directory(uri: str) str | None

Create a directory.

ros2bag.api.dict_to_duration(time_dict: Dict[str, int] | None) rclpy.duration.Duration

Convert a QoS duration profile from YAML into an rclpy Duration.

ros2bag.api.interpret_dict_as_qos_profile(qos_profile_dict: Dict) rclpy.qos.QoSProfile

Sanitize a user provided dict of a QoS profile and verify all keys are valid.

ros2bag.api.print_error(string: str) str
ros2bag.api.print_warn(string: str) str