Metadata-Version: 2.5
Name: rostainer-instances
Version: 0.0.6
Summary: rostainer plugin: run several copies of a ROS environment, for simulation and testing
Project-URL: Homepage, https://git.whoi.edu/bmillerklugman/rostainer
Project-URL: Documentation, https://bmillerklugman.pages.whoi.edu/rostainer/
Author: rostainer contributors
License-Expression: MIT
Keywords: docker,ros,ros2,rostainer,simulation
Requires-Python: >=3.7
Requires-Dist: rostainer
Description-Content-Type: text/markdown

# rostainer-instances

A [rostainer](https://bmillerklugman.pages.whoi.edu/rostainer/) plugin that runs
several copies ("instances") of a ROS environment next to its dev container, for
simulation or parallel tests. Each runs the dev container's last build.

```bash
pip install rostainer[instances]       # or: pip install rostainer-instances
rostainer init --with instances        # adds [plugins.instances] to .rostainer.toml
rostainer start                        # the dev container builds the workspace
rostainer instances start              # then the instances run that build
```

```toml
[plugins.instances]
count = 3          # how many
connected = true   # one ROS graph for them all and the dev container (false: one each)
```

| Command | What it does |
|---|---|
| `rostainer instances start [DISTRO]` | Start the target's instances. When none runs, they're (re)created from a new snapshot of the dev container. |
| `rostainer instances restart [DISTRO]` | Replace them with the dev container's current build. |
| `rostainer instances stop [N] [--rm]` | Stop them (or instance N); `--rm` removes them. |
| `rostainer instances status` | List them. |
| `rostainer instances shell N` / `logs N` | A shell in instance N, or its logs. |

Each instance gets `$ROSTAINER_INSTANCE` (0, 1, ...) to tell them apart, e.g. in
`command`. ROS 1 and Zenoh need `network_mode = "host"` for connected instances,
and a Docker network (`"bridge"`) for independent ones.
