robotology / human-dynamics-estimation

Software repository for estimating human dynamics
BSD 3-Clause "New" or "Revised" License
80 stars 28 forks source link

Add dummy wrench soruce that can be set with RPC #299

Closed lrapetti closed 2 years ago

lrapetti commented 2 years ago

This PR adds the possibility to define a wrench source of type dummy in the HumanWrenchProvider device that can be set to an initial wrench value (using value parameter), e.g.

<device type="human_wrench_provider" name="HumanWrenchProvider">
       ....
       <param name="sources">(.... LeftHand)</param>
        <group name="LeftHand">
            <param name="sensorName">none</param>
            <param name="outputFrame">LeftHand</param>
            <param name="type">dummy</param>
            <param name="value">(0.0 0.0 0.0 0.0 0.0 0.0)</param>
        </group>
        ....
</device>

and that can be also be set from rpc port, e.g.

yarp rpc HumanWrenchProvider/rpc:i
> setWorldWrench 0.0 0.0 10.0 0.0 0.0 0.0

(wrenches are in mixed representation, see traversaro-phd-thesis.pdf for further info on that)

lrapetti commented 2 years ago

@RiccardoGrieco note that something similar, I took inspiration from, was implemented in human-dynamics-estimation/feature/SOT-Berdy-HDE/devices/HumanWrenchProvider/HumanWrenchProvider.cpp

prashanthr05 commented 2 years ago

Sorry for the delay @lrapetti. I will do the review soon.

RiccardoGrieco commented 2 years ago

I would also add an example of how to use the feature in the main configuration file https://github.com/robotology/human-dynamics-estimation/blob/add-dummy-wrench-source/conf/xml/Human.xml (even if commented out).

lrapetti commented 2 years ago

I would also add an example of how to use the feature in the main configuration file https://github.com/robotology/human-dynamics-estimation/blob/add-dummy-wrench-source/conf/xml/Human.xml (even if commented out).

Done in https://github.com/robotology/human-dynamics-estimation/pull/299/commits/d544e838278a124b509a2915878dbd0ac1a3b3f6

lrapetti commented 2 years ago

@RiccardoGrieco let me know if you have other comments

RiccardoGrieco commented 2 years ago

I would also add an example of how to use the feature in the main configuration file https://github.com/robotology/human-dynamics-estimation/blob/add-dummy-wrench-source/conf/xml/Human.xml (even if commented out).

Done in d544e83

Perfect! 👍🏻

@RiccardoGrieco let me know if you have other comments

No more comments from my side to add, but there are still the pending ones to be addressed.

lrapetti commented 2 years ago

@RiccardoGrieco let me know if you have other comments

No more comments from my side to add, but there are still the pending ones to be addressed.

mm I cannot see them

lrapetti commented 2 years ago

With https://github.com/robotology/human-dynamics-estimation/pull/299/commits/69d15cb99801cfbaf13b7d9561fd4b337e44581a I have unified the wrench transformer objects that at this stage where all applying the same transform and the main difference was the fact that they were storing some additional transforms (either unused, or not directly related to wrench transformation).

I have also improved some parameters for the robot case (even if at this stage is unused)

lrapetti commented 2 years ago

@RiccardoGrieco can we proceed to merge or do you have other comments?

lrapetti commented 2 years ago

Thanks @RiccardoGrieco