rosidl_cli.command.generate.api module
- rosidl_cli.command.generate.api.generate(*, package_name, interface_files, include_paths=None, output_path=None, types=None, typesupports=None)
Generate source code from interface definition files.
To do so, this function leverages type representation and type support generation 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 type representation nor type support is specified, all available ones will be generated.
If more than one type representation or type support is generated, the name of each will be appended to the given output_path to preclude name clashes upon writing source code files.
- Parameters:
package_name – name of the package to generate source code for
interface_files – list of paths to interface definition files
include_paths – optional list of paths to include dependency interface definition files from
output_path – optional path to directory to hold generated source code files, defaults to the current working directory
types – optional list of type representations to generate
typesupports – optional list of type supports to generate
- Returns:
list of lists of paths to generated source code files, one group per type or type support extension invoked