ros2launch.api package

Submodules

Module contents

Python package for the ros2 launch api.

class ros2launch.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.MultipleLaunchFilesError(msg, paths)

Bases: Exception

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

ros2launch.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.is_launch_file(path)

Return True if the path is a launch file.

ros2launch.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.print_a_launch_file(*, launch_file_path)

Print the description of a launch file to the console.

ros2launch.api.print_arguments_of_launch_description(*, launch_description)

Print the arguments of a LaunchDescription to the console.

ros2launch.api.print_arguments_of_launch_file(*, launch_file_path)

Print the arguments of a launch file to the console.