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 carries the left Glove, right Glove, and Exo over one shared serial link.
Declare all three members in one CompositeExoGloveConfig, then use the root Sdk for their lifecycle.
Configuration flow
- Let
CompositeExoGloveConfigown the only serial connection. Do not assign separate connections to the two Gloves or Exo members. - Leave
composite.connection.portempty for automatic discovery. Set it once on the composite when a fixed port is required. - Put the left Glove, right Glove, and Exo configs in
devices, then usesdk.glove()andsdk.exo()to obtain the members. - Call
start(),stop(), andclose()only on the rootSdk.
Complete example
// Members declare identity only; they do not own separate serial connections.
qnbot::GloveConfig left_glove;
left_glove.side = qnbot::Side::left;
qnbot::GloveConfig right_glove;
right_glove.side = qnbot::Side::right;
qnbot::ExoConfig exo_config;
qnbot::CompositeExoGloveConfig composite;
// The shared port is auto-discovered by default. Uncomment to pin it.
// composite.connection.port = "/dev/ttyACM0";
composite.devices = {
qnbot::DeviceConfig{left_glove},
qnbot::DeviceConfig{right_glove},
qnbot::DeviceConfig{exo_config},
};
qnbot::SdkConfig config;
config.devices.push_back(composite);
qnbot::Sdk sdk(config);
// Obtain all three members through the product facades on the root SDK.
auto glove = sdk.glove();
auto exo = sdk.exo();
auto left = glove.device(qnbot::Side::left);
auto right = glove.device(qnbot::Side::right);
auto exo_device = exo.device();
// Let the root SDK own the entire composite lifecycle.
sdk.start();
// Composite vibration is sent through the Glove members.
const qnbot::GloveHaptics value{{{qnbot::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 members. Exo supplies telemetry, status, and IMU; Glove supplies pose and status. The current shared CDC path does not expose raw Glove IMU.
Install compatible Exo and Glove C++ packages. See the
Exo composite guide and the complete
composite-exo-glove/cpp example.