ThisLaunchFileDir throws error in debug mode
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
Research direction
Reproduce the report with ros2 launch gazebo_ros gazebo.launch.py -d, then inspect launch/launch_description_source.py and launch/substitutions/this_launch_file_dir.py at the traceback locations. Done means debug-mode launch still works without emitting the reported ThisLaunchFileDir traceback.
Written by the indexing model from the issue text.
Description
Bug report
This isn't blocking but I noticed so I thought I'd report. I noticed a traceback when running the gazebo launch file in debug mode. The launch file works fine despite the traceback (which is maybe another issue?)
Required Info:
- Operating System:
- Ubuntu 22
- Installation type:
- binaries
Steps to reproduce issue
ros2 launch gazebo_ros gazebo.launch.py -d
[DEBUG] [launch.launch_context]: emitting event synchronously: 'launch.events.IncludeLaunchDescription'
[INFO] [launch]: All log files can be found below /home/angsa/.ros/log/2024-04-02-22-30-48-565157-tony-xmg-22-2670761
[INFO] [launch]: Default logging verbosity is set to DEBUG
[DEBUG] [launch]: processing event: '<launch.events.include_launch_description.IncludeLaunchDescription object at 0x78bbf394b220>'
[DEBUG] [launch]: processing event: '<launch.events.include_launch_description.IncludeLaunchDescription object at 0x78bbf394b220>' ✓ '<launch.event_handlers.on_include_launch_description.OnIncludeLaunchDescription object at 0x78bbf394ada0>'
[DEBUG] [launch.launch_description_source]: Traceback (most recent call last):
File "/home/angsa/overlay_ws/build/launch/launch/launch_description_source.py", line 68, in try_get_launch_description_without_context
perform_substitutions(context, self.__location)
File "/home/angsa/overlay_ws/build/launch/launch/utilities/perform_substitutions_impl.py", line 26, in perform_substitutions
return ''.join([context.perform_substitution(sub) for sub in subs])
File "/home/angsa/overlay_ws/build/launch/launch/utilities/perform_substitutions_impl.py", line 26, in <listcomp>
return ''.join([context.perform_substitution(sub) for sub in subs])
File "/home/angsa/overlay_ws/build/launch/launch/launch_context.py", line 240, in perform_substitution
return substitution.perform(self)
File "/home/angsa/overlay_ws/build/launch/launch/substitutions/this_launch_file_dir.py", line 57, in perform
raise SubstitutionFailure(
launch.substitutions.substitution_failure.SubstitutionFailure: ThisLaunchFileDir used outside of a launch file (in a script)
[DEBUG] [launch.launch_description_source]: Failed to load the launch file without a context: ThisLaunchFileDir used outside of a launch file (in a script)
- Dominant language
- Python
- Stars
- 156
- Forks
- 200
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 11
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ros2/launch
-
Use a relative target for the `latest` log symlink so it survives different absolute mount paths (host/Docker)Possibly taken @Old-Ding claimed this 139 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
ros2/launch#978 · 1 reaction ·
Maintainers usually reply within 1 day
-
Add OpaqueFunction to list at docs.ros.orgMay be free again A pull request for this issue was closed without being merged. Openbug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ros2/launch#826 · 4 comments ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Maintainers usually reply within 1 day
-
[launch_testing] pytest>8.1 dropped the legacy "path" argument from its internal hooks on humblePossibly taken A pull request linked to this issue is open or already merged. Openbug
Difficulty 3/5 1-2 days Newbie friendliness 55/100
ros2/launch#979 · 6 comments ·
Maintainers usually reply within 1 day
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
hive size:simple
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
backend enhancement priority:P3
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
geolens-io/geolens#4161 ·
Maintainers usually reply within 1 day