Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FeatureRequest] Is it possible to skip argument checking in include_launch_description #745

Open
Owen-Liuyuxuan opened this issue Nov 30, 2023 · 0 comments

Comments

@Owen-Liuyuxuan
Copy link

Feature request

Feature description

I would hope to add an argument to skip the argument checking in actions/include_launch_description.py .

Background

  1. include_launch_description now searches exhaustively for all declared arguments inside a launch file and all of the included files inside it.
  2. For a huge launch system like the one I am testing, the function will search through all the included files (regardless it is included or not by <group if=false/true>) to check argument validity. But when we go onto the process of the subfiles, the function will again search through all the sub-subfiles. Which essentially leads to a search complexity of at least $O(n^2)$.
  3. More importantly, the search itself is a standalone part of codes that only reports errors but does not contribute to the launch process.
  4. Without argument checking in include, each declare_launch_arugment will also cleanly throw out an error and cleanly terminate the program when the value is not provided.
  5. The launching process of other parts of the code is now $O(n)$ and more manageable for large system.

Implementation considerations

Experiment: Completely Eliminate the Argument Checking in include_launch_description

Locally I have conducted this experiment.

Commenting out Line 163 - 177.

  1. Launching with correct arguments: I observed a significant boost of speed in launching our repo.
  2. Launching with in-complete arguments: the launch will fire up some of the corrected packages in the order of the launch file -> declare_launch_arugment throws error messages about the lack of required argument -> everything quit cleanly including the launched nodes.

Pros: easy to implement and fast.

Cons: Some users may expect the launch system to quit directly before launching up any nodes.

Personal Considerations

I hope this could at least become an optional mechanism by adding arguments to the launch command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant