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

Add iFrameTransformToIWear device #126

Closed lrapetti closed 3 years ago

lrapetti commented 3 years ago

This PR adds a device that converts the YARP iFrame Transform interface to an IWear device.

An example of device configuration can be found at https://github.com/robotology/wearables/blob/add-iFrameTransformToIWear-device/devices/IFrameTransformToIWear/conf/iframetransform_to_iwear.xml#L11-L25 The iFrameTransform provides the transform of the selected frameIDs frames w.r.t. the selected rootFrameID. The IWear format in which the IWear data will be exposed is defined by the wearableSensorType parameter (currently only PoseSensor is available, but I am planning to add other working options such as IVirtualLinkKin sensor or IOrientation)

S-Dafarra commented 3 years ago

The iFrameTransform provides the transform of the selected frameIDs frames w.r.t. the selected rootFrameID.

I would also consider the possibility to "calibrate" these transforms. For example, the input transforms might be defined wrt a fixed frame, but the initial transformation might not be known.

lrapetti commented 3 years ago

Adding here a screenshot that shows:

Screenshot 2021-07-16 at 18 51 43

We can say that seems to be working fine since:

lrapetti commented 3 years ago

The iFrameTransform provides the transform of the selected frameIDs frames w.r.t. the selected rootFrameID.

I would also consider the possibility to "calibrate" these transforms. For example, the input transforms might be defined wrt a fixed frame, but the initial transformation might not be known.

Not sure if this would be the right place to apply this calibration. In my opinion, I would leave the calibration to the downstream devices (as it is now in the HumanStateProvider), and keep this device minimal, so that all the calibration procedures are done at the same level of the pipeline.

Anyway, I would ask also @diegoferigo and @Yeshasvitvs for their opinion on this point.

S-Dafarra commented 3 years ago

Not sure if this would be the right place to apply this calibration. In my opinion, I would leave the calibration to the downstream devices (as it is now in the HumanStateProvider), and keep this device minimal, so that all the calibration procedures are done at the same level of the pipeline.

Anyway, I would ask also @diegoferigo and @Yeshasvitvs for their opinion on this point.

I agree. I added that comment before fully realizing the purpose of this device.

lrapetti commented 3 years ago

Thanks for the reviews @kouroshD @diegoferigo, I should have addressed all of them. Please let me know if you have further comments, otherwise I will proceed with cleaning the commit history and merging.

lrapetti commented 3 years ago

I have cleaned the commit history, and all the checks are passed. I'll proceed merging.