robotology / wearables

Code moved to https://github.com/robotology/human-dynamics-estimation
https://github.com/robotology/human-dynamics-estimation
BSD 3-Clause "New" or "Revised" License
19 stars 11 forks source link

Update Paexo wearable device to serialize wearable data/commands to access through yarp ports #109

Closed yeshasvitirupachuri closed 3 years ago

yeshasvitirupachuri commented 3 years ago

Currently the Paexo wearable device just exposes wearable data from the actual Paexo exoskeleton. To enable developing matlab controllers for the Paexo, we need to serialize wearable data to be data through yarp ports, also a way to handle the motor commands through receive data from a yarp port.

This issue tracks the details related to addressing this task

CC @lrapetti @claudia-lat @DanielePucci

yeshasvitirupachuri commented 3 years ago

we need to serialize wearable data to be data through yarp ports

Thanks to @prashanthr05 for https://github.com/robotology/wearables/pull/113 we can realize this wearable data streaming to yarp ports through the new logger

a way to handle the motor commands through receive data from a yarp port.

At the moment the Paexo wearable device has an rpc port https://github.com/robotology/wearables/blob/master/devices/Paexo/src/Paexo.cpp#L209, and we can use the YarpRpc block from https://github.com/robotology/wb-toolbox/pull/178 to send motor commands to Paexo device.

@diegoferigo please take a look at https://github.com/robotology/wb-toolbox/pull/178#issuecomment-644711133, and let me know if we can proceed with that PR.

CC @lrapetti @claudia-lat

traversaro commented 3 years ago

@diegoferigo please take a look at robotology/wb-toolbox#178 (comment), and let me know if we can proceed with that PR.

I think I can give feeedback in the PR as we transitioned the maintenance of the repo to me.

yeshasvitirupachuri commented 3 years ago

Thanks to @prashanthr05 for #113 we can realize this wearable data streaming to yarp ports through the new logger

For communication of Paexo wearable data to yarp ports that can be read in simulink, the PR #123 updates iwear logger device with yarp functionality.

For communication from simulink to Paexo, an alternative to yarp rpc block is to update the Paexo wearable device with yarp ports that receive motor commands. Furthermore, having two separate Left and Right motor actuators is needed. This is implemented and tested in Paexo/motor-control-yarp

Following the above two changes, I wrote a simple simulink controller using WBToolBox to read the Paexo data using yarp read blocks and sending motor commands through yarp write blocks.

https://user-images.githubusercontent.com/6505998/123477543-7ff36880-d5fe-11eb-82ef-e68ade8ee304.mp4

The entire pipeline works fine, except for high frequency motor commands to the Paexo. This needs to be investigated further.

https://user-images.githubusercontent.com/6505998/123477740-c47f0400-d5fe-11eb-8f9a-f2494c68eaba.MOV

https://user-images.githubusercontent.com/6505998/123477743-c5b03100-d5fe-11eb-90e5-90b5b0aac5a3.MOV

CC @claudia-lat @lrapetti @DanielePucci

lrapetti commented 3 years ago

I think this issue was completed, @claudia-lat @Yeshasvitvs can we close it?

yeshasvitirupachuri commented 3 years ago

Yes

claudia-lat commented 3 years ago

Closing issue.