rosidl_cli.command.helpers module

rosidl_cli.command.helpers.dependencies_from_include_paths(include_paths)

Collect dependencies’ ROS interface definition files from include paths.

Interface definition file paths from dependencies are absolute paths prefixed by the name of package they belong to followed by a colon ‘:’.

rosidl_cli.command.helpers.generate_visibility_control_file(*, package_name, template_path, output_path)

Generate a visibility control file from a template.

Parameters:
  • package_name – Name of the ROS package for which to generate the file.

  • template_path – Path to template visibility control file. May contain @PROJECT_NAME@ and @PROJECT_NAME_UPPER@ placeholders, to be substituted by the package name, accordingly.

  • output_path – Path to visibility control file after interpolation.

rosidl_cli.command.helpers.idl_tuples_from_interface_files(interface_files)

Express ROS interface definition file paths as IDL tuples.

An IDL tuple is a relative path prefixed by an absolute path against which to resolve it followed by a colon ‘:’. This function then applies the same logic as interface_path_as_tuple.

rosidl_cli.command.helpers.interface_path_as_tuple(path)

Express interface definition file path as an (absolute prefix, relative path) tuple.

An interface definition file path is a relative path, optionally prefixed by a path against which to resolve the former followed by a colon ‘:’. Thus, this function applies following logic: - If a given path follows this pattern, it is split at the colon ‘:’ - If a given path is prefixed by a relative path, it is resolved

relative to the current working directory.

  • If a given path has no prefix, the current working directory is used as prefix.

rosidl_cli.command.helpers.legacy_generator_arguments_file(*, package_name, interface_files, include_paths, templates_path, output_path)

Generate a temporary rosidl generator arguments file.

Parameters:
  • package_name – Name of the ROS package for which to generate code

  • interface_files – Relative paths to ROS interface definition files, optionally prefixed by another absolute or relative path followed by a colon ‘:’. The former relative paths will be used as a prototype to namespace generated code (if applicable).

  • include_paths – Paths where ROS package dependencies’ interface definition files may be found

  • templates_path – Path to the templates directory for the generator script this arguments are for

  • output_path – Path to the output directory for generated code

rosidl_cli.command.helpers.package_name_from_interface_file_path(path)

Derive ROS package name from a ROS interface definition file path.

This function assumes ROS interface definition files follow the typical rosidl install space layout i.e. ‘package_name/subfolder/interface.idl’.