ami-iit / yarp-openmct

Repo for YARP and OpenMCT integration.
BSD 3-Clause "New" or "Revised" License
6 stars 1 forks source link

Fix telemetry server crashes at startup when parsing heel and toe FTs data #148

Closed nunoguedelha closed 1 year ago

nunoguedelha commented 1 year ago

Fixes #146 .

This change fixes an issue is due to a mismatch of the telemetry ID related to the FT feet measurements, between the value used in the state variable and the value associated to the YARP port and received samples.

The FTs attached to the feet heels and toes have their data published on the same ports, one for the left foot and one for the right foot:

For having a common format for all the FTs transmitted data and dictionary metadata, we parse the YARP data and send the each FT chunk of data separately. For that purpose, we use separate IDs for the telemetry samples stored in icubtelemetry.state, icubtelemetry.history.

But the same separate IDs should also be used in the function sending the data to the client or pushing it in the history. If we use the port related key instead, we try to push to a non existing table.

The fix consists in returning the sub-IDs from the parser parseFromId and using them in the function forwardOrSend.

nunoguedelha commented 1 year ago

Thanks @traversaro !