ros2launch.api.api module

Python package for the ros2 launch api implementation.

class ros2launch.api.api.LaunchFileNameCompleter(*, package_name_key=None)

Bases: object

Callable returning a list of launch file names within a package’s share directory.

exception ros2launch.api.api.MultipleLaunchFilesError(msg, paths)

Bases: Exception

Exception raised when multiple candidate launch files are found in a package.

ros2launch.api.api.get_launch_file_paths(*, path)

Return a list of paths to launch files within a given path.

ros2launch.api.api.get_share_file_path_from_package(*, package_name, file_name)

Return the full path to a file in the share directory of a package.

Raises:

PackageNotFoundError if package is not found

Raises:

FileNotFoundError if the file is not found in the package

Raises:

MultipleLaunchFilesError if the file is found in multiple places

ros2launch.api.api.is_launch_file(path)

Return True if the path is a launch file.

ros2launch.api.api.launch_a_launch_file(*, launch_file_path, launch_file_arguments, noninteractive=False, args=None, option_extensions={}, debug=False)

Launch a given launch file (by path) and pass it the given launch file arguments.

ros2launch.api.api.parse_launch_arguments(launch_arguments: List[str]) List[Tuple[str, str]]

Parse the given launch arguments from the command line, into list of tuples for launch.

ros2launch.api.api.print_a_launch_file(*, launch_file_path)

Print the description of a launch file to the console.

ros2launch.api.api.print_arguments_of_launch_description(*, launch_description)

Print the arguments of a LaunchDescription to the console.

ros2launch.api.api.print_arguments_of_launch_file(*, launch_file_path)

Print the arguments of a launch file to the console.