Skip to content

Launch Loop Support? [Feature Request] #499

@shonigmann

Description

@shonigmann

Feature request

Not knowing too much about what's going on under the hood, would it be possible to support loops based on launch configuration values in python launch files?

Feature description

Similar to how launch conditions can be used to decide whether or not to spawn a node, it would be helpful to be able to spawn N nodes, based on a user or CLI set launch configuration. In particular, this could be useful for simulating swarms of robots of different sizes, on the fly.

Implementation considerations

I am aware of two possible work-arounds;

  1. creating a helper function that calls the single-instance launch command N times with an additional namespace variable passed in
  2. Adding N_max if-conditional statements in the launch file and comparing them to a passed in launch configuration.

The former feels cleaner, but it would be nice to have a solution that exists entirely in the launch file.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions