Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ergoCubSN001 gravity compensation / compliant mode does not work as intended #221

Open
traversaro opened this issue Feb 13, 2024 · 12 comments
Assignees
Labels
domain-software Related to Software prj-ergocub Related to ErgoCub Project team-fix Related to Team Fix

Comments

@traversaro
Copy link
Member

Task description

While debugging torque control with @LoreMoretti and @DanielePucci, we noticed that switching on compliant mode of the upper body of the ergoCubSN000 the gravity compensation was not working as intended, i.e. by decreasing the stiffness the arm or the torso the joint was not remaining still. Interestingly, running a gravity compensation "externally" (for example via https://github.com/vvv-school/tutorial_impedance-control/) seems to work fine, indicating that somehow the gravity compensation computed by wholebodynamics device was not working correctly. As both methods used the same model, perhaps the difference may be in the source of kinematic information used by WBD? If anyone is interested in investigating this, a first test could be to change this. From the configuration file in https://github.com/icub-tech-iit/ergocub-software/blob/10670acf8120bdaad19c6cb01388eff555f4f356/urdf/ergoCub/conf/estimators/wbd_ecub_sim.xml#L10C22-L10C34 it seems that wbd is using the head IMU, but according to @GiulioRomualdi this is not the case anymore, so the first thing to do would be to double check this.

Unfortunately I do not have detailed software version information of the software used in the tests, perhaps @LoreMoretti has more info.

Definition of Done

Commit in master branch a wbd configuration file for which compliant mode works "fine", i.e. by decreasing the stiffness the robot keep its position.

@traversaro traversaro added domain-software Related to Software prj-ergocub Related to ErgoCub Project team-fix Related to Team Fix labels Feb 13, 2024
@GiulioRomualdi
Copy link
Contributor

Here is the bug https://github.com/robotology/robots-configuration/blob/devel/ergoCubSN001%2Festimators%2Fwholebodydynamics.xml#L10

The imu used is the root link imu but the link is the head one

@traversaro
Copy link
Member Author

Here is the bug https://github.com/robotology/robots-configuration/blob/devel/ergoCubSN001%2Festimators%2Fwholebodydynamics.xml#L10

The imu used is the root link imu but the link is the head one

Great, thanks!

@traversaro
Copy link
Member Author

traversaro commented Feb 13, 2024

Fix proposed in robotology/robots-configuration#614 . Note that probably this did not only affected the gravity compensation torques, but also the torque estimation @LoreMoretti @isorrentino . As the problem is there since robotology/robots-configuration#584, probably all ergoCubSN001 tests were affected by this, good catch @GiulioRomualdi !

@isorrentino
Copy link
Contributor

isorrentino commented Feb 14, 2024

@traversaro I checked the configuration I was using for the paper to be sure that the results were correct and it is correct (luckily). Indeed I set the parameter assume_fixed and the frame was root_link.

See:
https://github.com/ami-iit/robots-configuration/blob/4edd9f0993c9e1bf31e3652d67fc7b5d6c38b4ac/ergoCubSN000/estimators/wholebodydynamics.xml#L10

@traversaro
Copy link
Member Author

@traversaro I checked the configuration I was using for the paper to be sure that the results were correct and it is correct (luckily). Indeed I set the parameter assume_fixed and the frame was root_link.

See: https://github.com/ami-iit/robots-configuration/blob/4edd9f0993c9e1bf31e3652d67fc7b5d6c38b4ac/ergoCubSN000/estimators/wholebodydynamics.xml#L10

Great!

@Nicogene
Copy link
Member

@traversaro is this issue fixed by robotology/robots-configuration#614 or we need to change also the urdf?

@traversaro
Copy link
Member Author

In theory no change should be done in the URDF, in practice until this is tested is difficult to be 100% sure.

@Nicogene
Copy link
Member

Nicogene commented Mar 1, 2024

In theory no change should be done in the URDF, in practice until this is tested is difficult to be 100% sure.

This test has been done? Can we close it?

@LoreMoretti
Copy link
Contributor

This test has been done? Can we close it?

We tested today as per this comment.

I think we can close this issue.

@traversaro
Copy link
Member Author

Actually this issue was to track the switch to compliant mode via yarpmotorgui, I am not sure this was tested today. I expect it to work, but I think we can quickly check this on Monday.

@Nicogene
Copy link
Member

Nicogene commented Mar 18, 2024

Actually this issue was to track the switch to compliant mode via yarpmotorgui, I am not sure this was tested today. I expect it to work, but I think we can quickly check this on Monday.

@traversaro @LoreMoretti did you check it?

@traversaro
Copy link
Member Author

I did not, today there are some demos, we can check after the demos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain-software Related to Software prj-ergocub Related to ErgoCub Project team-fix Related to Team Fix
Projects
None yet
Development

No branches or pull requests

5 participants