rosros 0.2.5
Simple unified interface to ROS1 / ROS2 Python API
|
Utilities for ROS message definition texts. More...
Functions | |
calculate_definition_hash (typename, definition, subdefs=()) | |
Returns MD5 hash for message / service type definition. | |
get_ros2_message_definition (typename, full=True) | |
Returns ROS2 message/service type definition full text. | |
get_ros2_message_definition_idl (typename) | |
Returns ROS2 message type definition parsed from IDL file. | |
get_ros2_service_definition (typename) | |
Returns ROS2 service type definition full text. | |
get_ros2_service_definition_idl (typename) | |
Returns ROS2 service type definition parsed from IDL file. | |
make_definition_hash_text (pkg, definition, subdefs=()) | |
Returns text for calculating message or service request/response type definition. | |
parse_definition_subtypes (typedef) | |
Returns subtype names and type definitions from a full message definition. | |
rosidl_format_comment (text) | |
Returns annotation text formatted with comment prefixes and escapes. | |
rosidl_format_idl_type (typeobj, msgpackage, constant=False) | |
Returns canonical type name for ROS2 IDL parser entity, like "uint8" or "nav_msgs/Path". | |
rosidl_format_message_content (msgidl) | |
Returns message IDL as .msg text. | |
rosidl_get_comments (obj) | |
Returns all comments for annotatable object, as [text, ]. | |
Utilities for ROS message definition texts.
rosros.parsing.calculate_definition_hash | ( | typename, | |
definition, | |||
subdefs = () |
|||
) |
Returns MD5 hash for message / service type definition.
subdefs | definitions for subtypes, if any, as ((typename, definition), ) |
Definition at line 36 of file parsing.py.
rosros.parsing.get_ros2_message_definition | ( | typename, | |
full = True |
|||
) |
Returns ROS2 message/service type definition full text.
Parses and assembles text from .msg or .srv or .idl files on disk.
full | include subtype definitions, separated with lines of "=" |
Definition at line 133 of file parsing.py.
rosros.parsing.get_ros2_message_definition_idl | ( | typename | ) |
Returns ROS2 message type definition parsed from IDL file.
Definition at line 179 of file parsing.py.
rosros.parsing.get_ros2_service_definition | ( | typename | ) |
Returns ROS2 service type definition full text.
Parses and assembles text from .srv or .idl files on disk.
Definition at line 166 of file parsing.py.
rosros.parsing.get_ros2_service_definition_idl | ( | typename | ) |
Returns ROS2 service type definition parsed from IDL file.
Definition at line 192 of file parsing.py.
rosros.parsing.make_definition_hash_text | ( | pkg, | |
definition, | |||
subdefs = () |
|||
) |
Returns text for calculating message or service request/response type definition.
subdefs | definitions for subtypes, as ((typename, definition), ) |
Definition at line 49 of file parsing.py.
rosros.parsing.parse_definition_subtypes | ( | typedef | ) |
Returns subtype names and type definitions from a full message definition.
Definition at line 90 of file parsing.py.
rosros.parsing.rosidl_format_comment | ( | text | ) |
Returns annotation text formatted with comment prefixes and escapes.
Definition at line 246 of file parsing.py.
rosros.parsing.rosidl_format_idl_type | ( | typeobj, | |
msgpackage, | |||
constant = False |
|||
) |
Returns canonical type name for ROS2 IDL parser entity, like "uint8" or "nav_msgs/Path".
typeobj | ROS2 IDL parser entity, like `rosidl_parser.definition.Array` |
msgpackage | name of parsed package |
constant | whether parsed item is a constant |
Definition at line 213 of file parsing.py.
rosros.parsing.rosidl_format_message_content | ( | msgidl | ) |
Returns message IDL as .msg text.
msgidl | rosidl_parser.definition.Message instance |
Definition at line 266 of file parsing.py.
rosros.parsing.rosidl_get_comments | ( | obj | ) |
Returns all comments for annotatable object, as [text, ].
Definition at line 255 of file parsing.py.