Remote action execution for scenario-execution.
Actions declared with remote(host) run on a server process instead of locally.
| Package | Role |
|---|---|
scenario_execution_remote |
Client-side OSC2 modifier + py_trees integration |
scenario_execution_server |
Server binary — executes action plugins on behalf of clients |
python -m venv .venv && source .venv/bin/activate
pip install -e scenario_execution/scenario_execution # base library
pip install -e scenario_execution_remote
pip install -e scenario_execution_serverStart the server (on the machine that should execute actions):
# TCP
scenario_execution_server --port 7613
# Unix domain socket
scenario_execution_server --socket /tmp/se.sockDeclare a remote action in your .osc scenario:
import osc.types
import osc.helpers
import osc.remote
scenario test_run_process:
do serial:
run_process("hostname") with:
remote("127.0.0.1") # TCP, default port 7613
# remote("192.168.1.10:9000") # TCP, explicit port
# remote("/tmp/se.sock") # Unix domain socket
Run the scenario normally — the client connects to the server during tree setup:
scenario_execution test.osc -tscenario_execution (client) scenario_execution_server
| |
setup() ──── init + setup ────────────────► | instantiates action plugin
initialise() ─ execute ──────────────────── ► | calls action.execute()
update() ─────── update (poll) ─────────── ► | returns RUNNING / SUCCESS / FAILURE
terminate() ──── terminate ──────────────── ► |
Transport: ZMQ REQ/REP, serialisation: msgpack.
One socket per remote() modifier instance.
Connection timeout: 5 s (setup), 10 s (execution).
modifier remote:
endpoint: string # hostname/IP, host:port, or /path/to/unix-socket
Any action available as a scenario_execution.actions entry-point on the server can be used remotely.
Use TCP endpoints. Unix domain sockets (/path/...) are local-only.
remote("192.168.1.20") # TCP — works across machines
remote("/tmp/se.sock") # IPC — same machine only
The server must have:
- all required action Python packages installed (e.g.
scenario_execution_ros) - any files referenced by actions (launch files, configs, …) present at the same absolute paths as on the client, or accessible via a network mount
Run scenario_execution_server as a sidecar container in the same pod and share a Unix socket via an emptyDir volume for zero-overhead IPC:
volumes:
- name: ipc
emptyDir: {}Both containers mount /ipc and connect via remote("/ipc/se.sock").