proto2ros.output.interfaces module

This module provides APIs to write ROS message specifications.

proto2ros.output.interfaces.dump_as_comments(content: str) str

Dumps the given content as ROS message comment.

proto2ros.output.interfaces.dump_message_specification(message_spec: rosidl_adapter.parser.MessageSpecification) str

Dumps a ROS message specification back to a string.

proto2ros.output.interfaces.which_message_specification(message_spec: rosidl_adapter.parser.MessageSpecification, root: str | PathLike[str] | None = None) Path

Returns an .msg file path for a given ROS message specification.

ROS .msg file name conversions are observed in the process.

Args:

message_spec: source ROS message specification. root: optional root directory for .msg file.

Returns:

the full .msg file path.