Feature Request: Option to use a cached launch description
Maintainers usually reply within 1 day
@wjwwood is already working on this.
Since Jul 27, 2023.
Assessment
This issue has not been assessed yet.
Description
Feature request
Feature description
Please correct me if this line of thought is misguided (or if such a feature already exists), but my understanding of the launch process is when a user calls ros2 launch, that executes a (potentially large) number of substitutions based on the provided launch description(s) to convert the launch description into a list of processes (and their resolved arguments) that need to be started/executed.
I am working with a ROS2 project with a decently large ROS2 launch setup, and what I believe I am seeing is a considerable amount of time being spent in this pre-launch phase (i.e. after i run launch, there is a big delay before the processes actually start). However, in a realistic scenario where the launch description the pre-launch phase is creating does not need to change between calls to ros2 launch (e.g. a robot that will be turned on and off many times), I think there would be a considerable time savings in caching the previous launch description and providing users with the option to use that rather than going through the pre-launch phase again.
Implementation considerations
Has this been considered in the past? Was there a reason it was not implemented?
A big question is how exactly can the launch description be cached for future use. Maybe some near-final by-product of the prelaunch phase can can be stored as a binary file (e.g. pickled). And users could pass a --cached argument to request that the file be used?
I am also not yet deeply familiar with the pipeline the launch description goes through before node processes actually get started. So it is unclear to me at what point this caching should/could occur.
Any feedback is greatly appreciated.
Thanks for taking the time to read through this! 😃
- 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