launch.substitutions.this_launch_file_dir module
Module for the ThisLaunchFileDir substitution.
- class launch.substitutions.this_launch_file_dir.ThisLaunchFileDir[source]
Bases:
PathSubstitutionSubstitution that returns the absolute path to the current launch file.
- classmethod parse(data: Sequence[str | Path | Substitution | Iterable[str | Path | Substitution]])[source]
Parse ThisLaunchFileDir 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:
launch.substitutions.substitution_failure.SubstitutionFailure – if not in a launch file