Skip to content

Commit

Permalink
Update README, remove print
Browse files Browse the repository at this point in the history
  • Loading branch information
danzimmerman committed Jun 14, 2023
1 parent 97216be commit 5fd205b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Some examples of ROS 2 launch files in Python, XML, and YAML.

## Argument Declaration examples
## Argument declaration examples

The launch files `arg_examples.launch.py`, `arg_examples.launch.xml`, and `arg_examples.launch.yaml` show off some features
of argument declaration.
Expand All @@ -28,5 +28,17 @@ To see the declared arguments and their descriptions and valid choices, run:
ros2 launch dz_launch_examples arg_examples.launch.<extension> --show-args
```

## Node preparation in Python `OpaqueFunction`

This provides an example of returning several talker/listener node pairs in consecutively numbered namespaces, inspired by [this post](https://answers.ros.org/question/416438/adding-node-from-within-opaquefunction-in-ros2-python-launch-file/).

To launch three node pairs, for example, run:

```
ros2 launch dz_launch_examples opaque_multi_nodes.launch.py num_node_pairs:=3
```





1 change: 0 additions & 1 deletion launch/opaque_multi_nodes.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ def prepare_multiple_nodes(context, *args, **kwargs):
"""
N_lc = launch.substitutions.LaunchConfiguration("num_node_pairs")
print(N_lc)
N = int(N_lc.perform(context))

nodes = []
Expand Down

0 comments on commit 5fd205b

Please sign in to comment.