A dora-rs node that receives the same kind of messages from several sources and forwards only the ones from the selected source. You can use it to switch arm commands between VR teleoperation and a policy, for example.
The selected source is the highest-priority one among the enabled sources. This node doesn't look into values, so it depends on neither the robot nor the arm.
pip install dora-openarm-selector- id: arm-command-selector
path: dora-openarm-selector
args: --sources vr,policy
inputs:
vr_enabled: vr-controller/enabled
vr_right: ik/position_right
vr_left: ik/position_left
policy_right: actions-executor/move_position_right
policy_left: actions-executor/move_position_left
outputs:
- right
- left
- selectedWith this dataflow, policy drives the arms by default. While
vr-controller/enabled is true, vr takes over because it has the higher
priority.
| Argument | Environment variable | Required | Description |
|---|---|---|---|
--sources vr,policy |
SOURCES |
Yes | Comma-separated source names. Earlier ones have higher priority. |
A source name must not contain _. Each source must have at least one
input. Inputs of sources that aren't in --sources are ignored. You
can use it to select a source by an environment variable for dora run without changing wiring, because dora-rs expands environment
variables in env: values:
- id: arm-command-selector
path: dora-openarm-selector
env:
SOURCES: "${TELEOP_SOURCE:-ker}"
inputs:
ker_right: leader/follower_position_right
ker_left: leader/follower_position_left
webxr_right: ik/position_right
webxr_left: ik/position_left
outputs:
- right
- leftWith this configuration, TELEOP_SOURCE=webxr dora run ... forwards
only webxr_* inputs and ker_* inputs are ignored. ker is used
when TELEOP_SOURCE isn't set. A misspelled TELEOP_SOURCE such as
webrx is rejected at startup because webrx has no input.
| Input ID | Type | Description |
|---|---|---|
<source>_<channel> |
Any | Data to forward such as vr_right. |
<source>_enabled |
bool (length 1) | true enables the source, false disables it. |
You can name channels freely such as right and left. The source of
an input ID is the part before the first _. An input ID whose source
isn't in --sources is ignored, so a misspelled source in an input ID
such as polcy_right isn't detected. The format of an ignored input ID
is still checked, so polcy_selected is rejected. enabled is the channel
for <source>_enabled input, so it isn't forwarded. selected can't be
used as a channel name because it conflicts with selected output.
A source without <source>_enabled input is always enabled. A source
with <source>_enabled input is disabled until it receives true.
Invalid values such as null are ignored with an error message.
| Output ID | Description |
|---|---|
<channel> |
<source>_<channel> of the selected source as is, with selected_source metadata. |
selected |
The selected source name (string) at startup and whenever it changes. An empty string if no source is selected. |
selected_source metadata lets a recorder record which source a
command came from. If you don't list selected in outputs:, this
node doesn't send it.
- At startup, only sources without
<source>_enabledinput are enabled. - Every
<source>_enabledinput selects the highest-priority enabled source again. - Only
<source>_<channel>of the selected source is forwarded to<channel>. Others are dropped. - Switching doesn't resend previous values. Forwarding starts from the next message from the newly selected source.
- Nothing is forwarded while no source is selected.
- When
<source>_enabledinput is closed, for example because its upstream node exits, the source is disabled. When all<source>_<channel>inputs of a source are closed, the source is never selected. Otherwise it would block lower-priority sources forever.
example/dataflow-mujoco.yaml
teleoperates OpenArm in a MuJoCo simulation
(dora-openarm-mujoco)
with KER or
WebXR. Both of them are
always running, so you need a KER connected via USB and a TLS
certificate for WebXR. TELEOP_SOURCE environment variable selects
which one moves the arms.
Generate a self-signed TLS certificate into example/ with
example/prepare_tls.sh. Pass a host name
that your VR device can resolve. See
dora-openarm-webxr's setup
for details.
example/prepare_tls.sh $(hostname).localThen build and run the dataflow:
pip install dora-rs-cli
dora build example/dataflow-mujoco.yaml
# KER moves the arms. KER is the default.
TELEOP_SOURCE=ker dora run example/dataflow-mujoco.yaml
# WebXR moves the arms.
TELEOP_SOURCE=webxr dora run example/dataflow-mujoco.yamlTo use WebXR, open https://$(hostname).local:8443/ in the Web browser
on your VR device and press the "Start" button.
Licensed under the Apache License 2.0. See LICENSE for details.
Copyright 2026 Enactic, Inc.
All participation in the OpenArm project is governed by our Code of Conduct.