The Parser: a ROS2 interface definition becomes a field structure and its types.
It reads the installed interface package by introspection over the generated class. The vendored parser in tools/catalog/ reads the other source and produces the same MessageDescription; a Jazzy CI job checks that the two agree. This is the one module that imports interface packages, and it imports no rclpy. Private: an interface class must not reach code above the seam.
| Function | describe |
Return the structure of a ROS2 message type, read off its installed interface class. |
| Function | import |
Import and return the generated class for a ROS2 action type (package/action/Name). |
| Function | import |
Import and return the generated interface class for a ROS2 type name. |
| Function | import |
Import and return the generated class for a ROS2 service type (package/srv/Name). |
| Function | _action |
Return the generated class of an action's goal, feedback or result, or None. |
| Function | _describe |
Model every field of an interface class, in declaration order. |
| Function | _import |
Import an action or service class, which has no fields of its own and so skips import_interface_class. |
| Function | _import |
Import the module one ROS2 type lives in, and return the parts of its name with it. |
| Function | _nested |
Return the fully qualified name of a slot's nested type, or None when it has none. |
Import and return the generated class for a ROS2 action type (package/action/Name).
| Raises | |
InvalidMessageTypeNameError | When the name has the wrong shape. |
MissingInterfacePackageError | When the interface package is not installed. |
UnusableMessageTypeError | When the package has no such action. |
Import and return the generated interface class for a ROS2 type name.
| Parameters | |
typestr | package/kind/Name, or package/Name for a message. |
| Returns | |
Any | Undocumented |
| Raises | |
InvalidMessageTypeNameError | When the name has neither shape. |
MissingInterfacePackageError | When the interface package is not installed. This is fatal at init: rclpy cannot subscribe to a type without its typesupport. |
UnusableMessageTypeError | When the package is installed but has no such message. |
Import and return the generated class for a ROS2 service type (package/srv/Name).
| Raises | |
InvalidMessageTypeNameError | When the name has the wrong shape. |
MissingInterfacePackageError | When the interface package is not installed. |
UnusableMessageTypeError | When the package has no such service. |
Return the generated class of an action's goal, feedback or result, or None.
The package exports only Fibonacci, while ROS2 names the goal Fibonacci_Goal elsewhere, so that spelling is resolved as Fibonacci.Goal. The suffix must be an action member name, so a message genuinely called Foo_Bar is not mistaken for a member of a missing Foo.
Import an action or service class, which has no fields of its own and so skips import_interface_class.
Import the module one ROS2 type lives in, and return the parts of its name with it.
| Raises | |
MissingInterfacePackageError | When the interface package is not installed. |
UnusableMessageTypeError | When the package is installed but the module is not there. |