Glove + Exo composite solution
Connect two Gloves and an Exo over one shared serial link with one lifecycle.
Current version · 1.4.0
Glove + Exo composite solution
A Qnbot PLUS composite exposes the left Glove, right Glove, and Exo over one shared serial link.
Declare the three members with CompositeExoGloveConfig, then manage them through one root Sdk.
Configuration flow
- Configure the shared serial link once on
CompositeExoGloveConfig. Do not assign separate connections to the left Glove, right Glove, or Exo 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, then usesdk.glove()andsdk.exo()to access their capabilities. - Call
start(),stop(), andclose()only on the rootSdkso it owns the shared-link lifecycle.
Complete example
from qnbot_sdk import CompositeExoGloveConfig, Sdk, SerialConnection, Side
from qnbot_sdk.exo import ExoConfig
from qnbot_sdk.glove import GloveConfig, GloveFinger, GloveHaptics
# Configure the connection only on the composite; auto-discover the shared port.
# To pin it, use SerialConnection(port="/dev/ttyACM0") instead.
composite = CompositeExoGloveConfig(
connection=SerialConnection(auto_discover=True),
devices=(
# Member configs do not declare their own serial connections.
GloveConfig(side=Side.LEFT),
GloveConfig(side=Side.RIGHT),
ExoConfig(),
),
)
sdk = Sdk(devices=(composite,))
# Obtain all three members through the product facades on the root SDK.
glove = sdk.glove()
exo = sdk.exo()
left = glove.device(side=Side.LEFT)
right = glove.device(side=Side.RIGHT)
exo_device = exo.device()
# Let the root SDK own the entire composite lifecycle.
sdk.start()
# Composite vibration is sent through the Glove members.
value = GloveHaptics({GloveFinger.THUMB: 80})
left.haptics().set(value)
right.haptics().set(value)
# Read Exo telemetry/status/IMU from exo_device.
left.haptics().clear()
right.haptics().clear()
sdk.stop()
sdk.close()Exo haptics are unavailable in composite mode. Send haptic commands through the left and right
Glove haptics() APIs. Exo supplies telemetry, status, and IMU; Glove supplies pose and status.
The current shared CDC path does not expose raw Glove IMU.
Install compatible qnbot-sdk-glove and qnbot-sdk-exo versions. See the
Exo composite guide and the complete
composite-exo-glove/python example.