Repository navigation
Description
Describe the bug
In the sharpa_avatar plugin, a glove that is powered on after the plugin has started never streams. Every 2 s the plugin connects it and stops it again within a few milliseconds, indefinitely. Gloves that are already on when the plugin starts work normally.
Cause (from the plugin code)
start_glove_if_present()gets the glove withAvatarSDK::get_device(GLOVE, side)(L360), which only returns a device whose discovery row is online, then callsinit()/start().- On the next frame,
refresh_data()checksstate.device->get_device_info().online(L424). For a hot-plugged glove this isfalse, so it callsstate.reset()(L426), which callsdevice->stop()(L246). try_connect_missing_gloves()reconnects afterkGloveRetryInterval= 2 s (L39), and the cycle repeats.
So the two calls disagree: get_device() (discovery table) says online, AvatarDevice::get_device_info().online says offline. Because the upstream code resets silently, the only visible symptom is that the glove never produces data.
From the Avatar SDK 1.7.3 binary (no source available, so this part is inferred): AvatarDevice is constructed from a DeviceInfo copy (AvatarDevice(DeviceInfo const&)), get_device_info() returns that stored copy, and there is no AvatarDeviceAccess setter for online. The SDK first discovers a hot-plugged glove as link=offline and only later logs offline -> online, so the handle appears to keep online=false from when it was created.
To reproduce
- Start a TeleopSession that launches
avatar_hand_plugin(e.g.python -m isaaccapture_examples.sharpa_avatar) with both gloves powered off. - Power on one glove.
- The glove never streams; the plugin's stdout shows
connected and streamingevery 2 s.
Expected behavior
A glove powered on after the plugin starts is connected once and streams.
Observed behavior
SDK log (plugin stdout) for a right glove powered on after start. There is no online -> offline transition at all, yet SerialHand::start runs every 2 s and the glove answers each time:
21:53:42.069 DiscoverService: discovered device side=RIGHT type=0 link=offline
21:53:46.364 DiscoverService: link state changed side=RIGHT offline -> online
21:53:46.592 SerialHand::start identity before tactile sn= side=RIGHT serial_open=true
21:53:46.653 SerialHand::identity_worker_loop: firmware identity ready, tactile started side=RIGHT attempt=1
21:53:48.598 SerialHand::start identity before tactile sn=AVTG240R-... side=RIGHT serial_open=true
21:53:48.713 SerialHand::identity_worker_loop: firmware identity ready, tactile started side=RIGHT attempt=1
21:53:50.607 SerialHand::start identity before tactile sn=AVTG240R-... side=RIGHT serial_open=true
... (repeats every 2 s)
With the gloves already on before AvatarSDK::initialize(), the same sequence (get_device -> init -> start, checked with the SDK Python binding) keeps get_device_info().online == true and fetch_data succeeding.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDONE
Activity
[merge-to-it] sharpa_avatar: judge glove liveness by fetched data, no…
[merge-to-it] sharpa_avatar: judge glove liveness by fetched data, no…
Patch avatar 1.5 - cherrypicking from main (#1232)
lotusl-code commentedon Nov 4, 2026
Sharpa reported fixed with #1347