Classes | |
| class | ROS2Bag |
Functions | |
| def | _get_message_definition (typename) |
| def | _get_message_type_hash (typename) |
| def | canonical (typename, unbounded=False) |
| def | create_publisher (topic, cls_or_typename, queue_size) |
| def | create_subscriber (topic, cls_or_typename, handler, queue_size) |
| def | deserialize_message (raw, cls_or_typename) |
| def | format_message_value (msg, name, value) |
| def | get_message_class (typename) |
| def | get_message_definition (msg_or_type) |
| def | get_message_definition_idl (typename) |
| def | get_message_fields (val) |
| def | get_message_type (msg_or_cls) |
| def | get_message_type_hash (msg_or_type) |
| def | get_message_value (msg, name, typename) |
| def | get_rostime (fallback=False) |
| def | get_topic_types () |
| def | init_node (name) |
| def | is_ros_message (val, ignore_time=False) |
| def | is_ros_time (val) |
| def | make_duration (secs=0, nsecs=0) |
| def | make_full_typename (typename) |
| def | make_subscriber_qos (topic, typename, queue_size=10) |
| def | make_time (secs=0, nsecs=0) |
| def | qos_to_dict (qos) |
| def | scalar (typename) |
| def | serialize_message (msg) |
| def | set_message_value (obj, name, value) |
| def | shutdown_node () |
| def | time_message (val, to_message=True, clock_type=None) |
| def | to_duration (val) |
| def | to_nsec (val) |
| def | to_sec (val) |
| def | to_sec_nsec (val) |
| def | to_time (val) |
| def | validate (live=False) |
Variables | |
| list | __all__ |
| Bag = ROS2Bag | |
| tuple | BAG_EXTENSIONS = (".db3", ) |
| Bagfile extensions to seek. More... | |
| context = None | |
| rclpy.context.Context instance More... | |
| dictionary | DDS_TYPES |
| Data Distribution Service types to ROS builtins. More... | |
| executor = None | |
| rclpy.executors.Executor instance More... | |
| node = None | |
| rclpy.node.Node instance More... | |
| numpy | |
| dictionary | ROS_ALIAS_TYPES = {"byte": "uint8", "char": "int8"} |
| Mapping between type aliases and real types, like {"byte": "uint8"}. More... | |
| dictionary | ROS_TIME_CLASSES |
| ROS2 time/duration types and message types mapped to type names. More... | |
| dictionary | ROS_TIME_MESSAGES |
| ROS2 time/duration types mapped to message types. More... | |
| list | ROS_TIME_TYPES = ["builtin_interfaces/Time", "builtin_interfaces/Duration"] |
| ROS2 time/duration message types. More... | |
| tuple | SKIP_EXTENSIONS = () |
| Bagfile extensions to skip. More... | |
|
private |
|
private |
| def grepros.ros2.canonical | ( | typename, | |
unbounded = False |
|||
| ) |
Returns "pkg/Type" for "pkg/msg/Type", standardizes various ROS2 formats.
Converts DDS types like "octet" to "byte", and "sequence<uint8, 100>" to "uint8[100]".
@param unbounded drop constraints like array and string bounds,
e.g. returning "uint8[]" for "uint8[10]" and "string" for "string<=8"
| def grepros.ros2.create_publisher | ( | topic, | |
| cls_or_typename, | |||
| queue_size | |||
| ) |
| def grepros.ros2.create_subscriber | ( | topic, | |
| cls_or_typename, | |||
| handler, | |||
| queue_size | |||
| ) |
| def grepros.ros2.deserialize_message | ( | raw, | |
| cls_or_typename | |||
| ) |
| def grepros.ros2.format_message_value | ( | msg, | |
| name, | |||
| value | |||
| ) |
| def grepros.ros2.get_message_class | ( | typename | ) |
| def grepros.ros2.get_message_definition | ( | msg_or_type | ) |
| def grepros.ros2.get_message_definition_idl | ( | typename | ) |
| def grepros.ros2.get_message_fields | ( | val | ) |
| def grepros.ros2.get_message_type | ( | msg_or_cls | ) |
| def grepros.ros2.get_message_type_hash | ( | msg_or_type | ) |
| def grepros.ros2.get_message_value | ( | msg, | |
| name, | |||
| typename | |||
| ) |
| def grepros.ros2.get_rostime | ( | fallback = False | ) |
| def grepros.ros2.get_topic_types | ( | ) |
| def grepros.ros2.init_node | ( | name | ) |
| def grepros.ros2.is_ros_message | ( | val, | |
ignore_time = False |
|||
| ) |
| def grepros.ros2.is_ros_time | ( | val | ) |
| def grepros.ros2.make_duration | ( | secs = 0, |
|
nsecs = 0 |
|||
| ) |
| def grepros.ros2.make_full_typename | ( | typename | ) |
| def grepros.ros2.make_subscriber_qos | ( | topic, | |
| typename, | |||
queue_size = 10 |
|||
| ) |
| def grepros.ros2.make_time | ( | secs = 0, |
|
nsecs = 0 |
|||
| ) |
| def grepros.ros2.qos_to_dict | ( | qos | ) |
| def grepros.ros2.scalar | ( | typename | ) |
| def grepros.ros2.serialize_message | ( | msg | ) |
| def grepros.ros2.set_message_value | ( | obj, | |
| name, | |||
| value | |||
| ) |
| def grepros.ros2.shutdown_node | ( | ) |
| def grepros.ros2.time_message | ( | val, | |
to_message = True, |
|||
clock_type = None |
|||
| ) |
Converts ROS2 time/duration between `rclpy` and `builtin_interfaces` objects. @param val ROS2 time/duration object from `rclpy` or `builtin_interfaces` @param to_message whether to convert from `rclpy` to `builtin_interfaces` or vice versa @param clock_type ClockType for converting to `rclpy.Time`, defaults to `ROS_TIME` @return value converted to appropriate type, or original value if not convertible
| def grepros.ros2.to_duration | ( | val | ) |
| def grepros.ros2.to_nsec | ( | val | ) |
| def grepros.ros2.to_sec | ( | val | ) |
| def grepros.ros2.to_sec_nsec | ( | val | ) |
| def grepros.ros2.to_time | ( | val | ) |
| def grepros.ros2.validate | ( | live = False | ) |
|
private |
| tuple grepros.ros2.BAG_EXTENSIONS = (".db3", ) |
| dictionary grepros.ros2.DDS_TYPES |
Data Distribution Service types to ROS builtins.
| grepros.ros2.executor = None |
| dictionary grepros.ros2.ROS_ALIAS_TYPES = {"byte": "uint8", "char": "int8"} |
| dictionary grepros.ros2.ROS_TIME_CLASSES |
ROS2 time/duration types and message types mapped to type names.
| dictionary grepros.ros2.ROS_TIME_MESSAGES |
| list grepros.ros2.ROS_TIME_TYPES = ["builtin_interfaces/Time", "builtin_interfaces/Duration"] |