robotology / robots-configuration

Contains robots configuration files
BSD 3-Clause "New" or "Revised" License
14 stars 69 forks source link

Expose BMS on ergoCubSN000 via `battery_nws_yarp` #514

Closed martinaxgloria closed 1 year ago

martinaxgloria commented 1 year ago

I put this PR in draft since I have to check the protocol and firmware versions and test those files on ergoCub.

martinaxgloria commented 1 year ago

Today I tried to launch yarprobotinterface --config battery_test.xml (this xml includes both the hardware and the wrapper relatives to the battery conf file) and the yarprobotinterface runs happly. I tried to read values from the port /ergocub/battery/data:o but it streamed all zeros since the battery is not puggled in. When ergoCub is available, I will do some other tests with the battery plugged in order to read real values.

martinaxgloria commented 1 year ago

Today @AntonioConsilvio helps me with the battery to be plugged and I succeeded in reading the values via yarp read ... /ergocub/battery/data:o. From the README.md of the embObjBattery library, I got how to read the output:

90b71efa-be1b-456d-9e03-657b1f2ebaef

With the battery on and the robot powered with the power supply, I got these values:

de837a51-098d-4786-87c3-0190f780ced6

While without the power supply, I got:

12c4d686-10d5-4154-8869-d10d60c5cca6

I checked the charge value on the display on the ergoCub back and there I read 83 instead of 93. The other difference is in the current value which is 0 in the first case and a negative value in the second.

cc @Nicogene @pattacini

pattacini commented 1 year ago

@AntonioConsilvio, you may consider copying out this structure into the newborn robot ergoCubSN001.

pattacini commented 1 year ago

@maggia80, we have now the BMS publishing data over YARP on ergoCubSN000. Thanks @martinaxgloria!