Skip to content

Commit

Permalink
Merge pull request #4 from yushijinhun/patch-1
Browse files Browse the repository at this point in the history
Add package & executable parameter to container
  • Loading branch information
oKermorgant authored Mar 22, 2022
2 parents 6e18a7f + 35c83a2 commit 6875d9e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ This syntax adds the `composition/composition::Talker` as a ComposableNode
sl.node(package='composition', plugin='Talker', name='talker')
```

Use the `executable` and `package` parameters if you want to use executors other than `rclcpp_components`'s `component_container`:

```
with sl.container(name='my_container', output='screen', executable='component_container_isolated'):
```

## Simulation and `use_sim_time`

Instanciating `sl = SimpleLauncher(use_sim_time = True)` is equivalent to:
Expand Down
6 changes: 3 additions & 3 deletions src/simple_launch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ def group(self, ns=None, if_arg=None, unless_arg=None, if_condition=None, unless


@contextmanager
def container(self, name, namespace = '', existing = False, **container_args):
def container(self, name, namespace = '', existing = False, package='rclcpp_components', executable='component_container', **container_args):
'''
Opens a Composition group to add nodes
If existing is True, then loads nodes in the (supposely) existing container
Expand All @@ -437,8 +437,8 @@ def container(self, name, namespace = '', existing = False, **container_args):
ComposableNodeContainer(
name=name,
namespace=namespace,
package='rclcpp_components',
executable='component_container',
package=package,
executable=executable,
composable_node_descriptions=new_entities,
**container_args))

Expand Down

0 comments on commit 6875d9e

Please sign in to comment.