launch.substitutions.this_launch_file module
Module for the ThisLaunchFile substitution.
- class launch.substitutions.this_launch_file.ThisLaunchFile[source]
Bases:
SubstitutionSubstitution that returns the absolute path to the current launch file.
- classmethod parse(data: Sequence[str | Path | Substitution | Iterable[str | Path | Substitution]])[source]
Parse ThisLaunchFile substitution.
- perform(context: LaunchContext) str[source]
Perform the substitution by returning the path to the current launch file.
If there is no current launch file, i.e. if run from a script, then an error is raised.
- Raises:
SubstitutionFailure if not in a launch file