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

Launch delay argument for nodes or other launch files #286

Open
pepisg opened this issue Nov 16, 2021 · 3 comments
Open

Launch delay argument for nodes or other launch files #286

pepisg opened this issue Nov 16, 2021 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@pepisg
Copy link

pepisg commented Nov 16, 2021

Feature request

Feature description

Hi! it would be great if an argument could be added to add a delay for launching a given node or launch file.
I think this could be useful to control the CPU load of the computing platform when launching a relatively big number of nodes (~40) by preventing all of them from launching at the same time.

If this feature already exits or can be easily implemented please point me in the right direction.

Thanks in advance for your help!

@joncppl
Copy link
Contributor

joncppl commented Dec 1, 2021

in python launch files I implemented this by wrapping each node to delay with a launch.action.TimerAction.

It would be nicer to just be able to add the delay as an argument argument though!

eg. launch_ros.actions.Node could emit a TimerAction wrapping what it does now

@hidmic hidmic added enhancement New feature or request help wanted Extra attention is needed labels Dec 8, 2021
@hidmic
Copy link
Contributor

hidmic commented Dec 8, 2021

I'd rather stick to proper feature composition than to add (yet more) options to the Node action.

As @joncppl says, you can use a TimerAction. Alternatively, you could implement a group-like action to help cap the amount of processes simultaneously brought up (e.g. via ProcessStart events). That could be an addition to launch, if enough people find that useful. FYI @ros2/team.

@jacobperron
Copy link
Member

Yeah, I'd rather see examples of people using TimerAction to accomplish this task and we can later consider adding a utility (or simply an example) to launch as common patterns arise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants