rosidl_cli.command.translate.api module

rosidl_cli.command.translate.api.translate(*, package_name, interface_files, output_format, input_format=None, include_paths=None, output_path=None, translators=None)

Translate interface definition files from one format to another.

To do so, this function leverages translation support as provided by third-party package extensions.

Each path to an interface definition file is a relative path optionally prefixed by another path followed by a colon ‘:’, against which the first relative path is to be resolved.

The directory structure that these relative paths exhibit will be replicated on output (as opposed to the prefix path, which will be ignored).

If no translators are specified, all available ones will be considered.

Parameters:
  • package_name – name of the package all interface files belong to

  • interface_files – list of paths to interface definition files

  • output_format – format to translate interface definition files to

  • input_format – optional format to assume for all interface definition files, deduced from file extensions if not given

  • include_paths – optional list of paths to include dependency interface definition files from

  • output_path – optional path to directory to hold translated interface definition files, defaults to the current working directory

  • translators – optional list of translators to use

Returns:

list of paths to translated interface definition files