Glove + Exo composite solution
Connect an Exo and two Gloves over one shared serial link with one lifecycle.
Glove + Exo composite solution
An interrupted shared serial link recovers automatically. After recovery or a successful restart, the SDK refreshes Exo and Glove state and clears stale connection errors; recovery does not require continuous application update() calls.
A Qnbot PLUS composite exposes the Exo, left Glove, and right Glove over one shared serial link.
Create it with CompositeExoGloveConfig and let one root Sdk manage all three members.
Configuration flow
- Configure the shared serial link once on
CompositeExoGloveConfig. Do not assign separate connections to the Exo, left Glove, or right Glove member. - Use automatic discovery when no port is pinned. To target one device explicitly, replace the shared connection with
SerialConnection(port="/dev/ttyACM0"). - Put the left Glove, right Glove, and Exo configs in
devices; usesdk.exo()for Exo data andsdk.glove()for Glove access. - Call
start(),stop(), andclose()only on the rootSdkso it owns the shared-link lifecycle.
Optional CompositeExoGloveConfig.name identifies the outer group. Members do not inherit it: give each member its own name before selecting it with glove.device(name) or exo.device(name).
Complete example
from qnbot_sdk import CompositeExoGloveConfig, Sdk, SerialConnection, Side
from qnbot_sdk.exo import ExoConfig
from qnbot_sdk.glove import GloveConfig
composite = CompositeExoGloveConfig(
name="workstation-a",
connection=SerialConnection(auto_discover=True),
# For a fixed deployment use SerialConnection(port="/dev/ttyACM0").
devices=(
GloveConfig(name="left-glove", side=Side.LEFT),
GloveConfig(name="right-glove", side=Side.RIGHT),
ExoConfig(name="exo"),
),
)
sdk = Sdk(devices=(composite,))
glove = sdk.glove()
exo = sdk.exo()
left = glove.device("left-glove")
right = glove.device("right-glove")
exo_device = exo.device("exo")
try:
left.pose().subscribe(lambda sample: print("left", sample.value))
right.pose().subscribe(lambda sample: print("right", sample.value))
exo_device.telemetry().subscribe(lambda sample: print("exo", sample.value))
sdk.start()
sdk.run_forever()
finally:
sdk.close()Exo haptics are unavailable in composite mode. Glove member GloveHaptics writes and clears are ignored with a composite_glove_haptics_unavailable warning and produce no physical vibration.
Exo supplies telemetry and status; check capabilities.imus before using IMU data. Glove supplies pose and status. The current shared CDC path does not expose raw Glove IMU.
Deciding when recovery is complete
After the shared physical port returns, each member still recovers independently when its own fresh data arrives. A recovered Exo does not imply that either Glove has recovered, and a recovered Glove does not imply fresh Exo telemetry. Subscribe separately to exo_device.status(), left.status(), and right.status(), and resume work for a member only when it reports connected and not stale.
Install compatible qnbot-sdk-exo and qnbot-sdk-glove versions. See the
Glove composite guide. For a complete left- and right-hand retargeting output example, see
glove_retargeting.py.