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

[ergoCubSN000] Unexpected behaviour when switching from compliant to stiff (and vice versa) with joint in position direct #1547

Closed
GiulioRomualdi opened this issue May 2, 2023 · 20 comments
Assignees
Labels
ergoCub 1.0 S/N:000 ergoCub robot (prototype) pinned This label prevents an issue from being closed automatically

Comments

@GiulioRomualdi
Copy link
Member

Device name 🤖

ergoCubSN000

Request/Failure description

⚠️ Hi! I'm opening the issue here as an entry point, if you think there is a better place to open this issue I can close this one and reopen it in another place.

While testing the compliant mode on the ergoCub we noticed a strange behavior. Indeed when switching from compliant to stiff and or vice versa when the motor is controlled in position direct makes the joint stiff both in the sense of rigidity and viscosity,

Detailed context

The following video tries to explain better what we are experiencing

  1. the joint was set to position and compliant mode (the selection of the compliant mode was done when the joint was in position) In this case the joint is behaving as expected 🟢
  2. Then we switched from position to position direct and also here the joint was moving as expected 🟢
  3. Finally we did the following
    1. switch from position direct to position
    2. switch from compliant to stiff
    3. switch from stiff to compliant
      In this configuration, the joint seems to be stiffer than before 🔴

The experiment was done using the motorgui.

issue_compliant_stiff.mp4

Additional context

cc @S-Dafarra @mebbaid @lrapetti

How does it affect you?

No response

@sgiraz sgiraz added the ergoCub 1.0 S/N:000 ergoCub robot (prototype) label May 2, 2023
@sgiraz sgiraz added this to the ICRA 2023 💂🏻‍♀️ milestone May 2, 2023
@sgiraz sgiraz moved this from Triage to Backlog in iCub Tech Support May 2, 2023
@sgiraz
Copy link
Contributor

sgiraz commented May 17, 2023

Hi @GiulioRomualdi, I think that these control modes are not so common like position (direct), current or pwm. Furthermore, may not be tested by most of us. Probably @ale-git is aware of what is happening here. I believe the best way to resolve this issue is to open a ticket discussion.

cc @valegagge @Nicogene @pattacini

@sgiraz sgiraz removed this from the ICRA 2023 💂🏻‍♀️ milestone Jun 5, 2023
@S-Dafarra
Copy link

We noticed that if we switch to compliant from position, the behavior is very stiff. If we switch to idle and back to position (remaining in compliant mode), then the behavior is good.

@S-Dafarra
Copy link

We found another way to have it working
Joint in position stiff -> switch to compliant -> the compliance is terrible

Joint in position stiff -> switch to idle -> switch to compliant mode -> switch back to position -> the compliance is good.

I am pretty sure this is a firmware bug. @sgiraz @pattacini would you prefer to move this to a ticket?

@pattacini
Copy link
Member

Hi @S-Dafarra

I am pretty sure this is a firmware bug. @sgiraz @pattacini would you prefer to move this to a ticket?

I think @valegagge and @ale-git are following up on this.
Opening up a ticket on this would give just a little benefit. I have no strong opinion on that; probably, it's worth keeping all the discussion here.

@github-actions
Copy link

This issue has been automatically marked as stale because it did not have recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale This issue will be soon closed automatically label Sep 19, 2023
@S-Dafarra
Copy link

@pattacini @valegagge @ale-git any update on this?

@pattacini pattacini added pinned This label prevents an issue from being closed automatically and removed stale This issue will be soon closed automatically labels Sep 19, 2023
@pattacini
Copy link
Member

pattacini commented Sep 19, 2023

Added pinned This label prevents an issue from being closed automatically

cc @valegagge @ale-git

@pattacini
Copy link
Member

Hi @S-Dafarra

Team FIVE has an internal ticket tracking this activity, which has been delayed though, due to the need for testing ergoCubSN001.

@valegagge
Copy link
Member

valegagge commented Sep 20, 2023

Hi @S-Dafarra ,
we don't forget this issue, but we are involved in various activities related to ergocub s/n 001 and we are releasing a new FOC fw that will be installed in the ergocub s/n 001.

@S-Dafarra
Copy link

Hi everyone, from time to time, depending on demos, it is still useful to have joints in compliant mode, but this is blocking. Any update on this?

@Nicogene
Copy link
Member

Hi @S-Dafarra, we will start investigating the next week, we will update you

cc @pattacini @ale-git

@Nicogene
Copy link
Member

Hi @GiulioRomualdi, @ale-git should have found the source of problem:

The motor input type (pwm, current or velocity) wasn't properly set during stiff <-> compliant transitions, and thus we had misbehaviour when the stiff control output type was different from torque control type as in the ErgoCub configuration.

This should fix the problem (to be tested):
ale-git/icub-firmware@compliant-bugfix

We will soon test the fix and let you know!

@Nicogene
Copy link
Member

Nicogene commented Jun 5, 2024

Tomorrow we will test the @ale-git fix on iCubGenova11 and then we will proceed with the PR in case of positive outcome

cc @GiulioRomualdi @pattacini

@Nicogene
Copy link
Member

Nicogene commented Jun 6, 2024

@GiulioRomualdi the today's test gave a positive outcome, @ale-git will provide soon a PR with the fix!

@GiulioRomualdi
Copy link
Member Author

That's great! Thank you!

@Nicogene
Copy link
Member

Nicogene commented Jun 7, 2024

@GiulioRomualdi on the latest icub-firmware-build@devel you should find the EMS firmware containing the fix, after your positive feedback I think we can close this issue (cc @AntonioConsilvio)

@AntonioConsilvio AntonioConsilvio moved this from On Hold to Review/QA in iCub Tech Support Jun 10, 2024
@GiulioRomualdi
Copy link
Member Author

I flashed robotology/icub-firmware-build@10d4984 on the ergoCubSN002, I can test the fix

@GiulioRomualdi
Copy link
Member Author

We tested on ergoCubSN001. The robot behaved as expected

@AntonioConsilvio
Copy link
Contributor

Thank you all! 🚀

@github-project-automation github-project-automation bot moved this from Review/QA to Done in iCub Tech Support Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ergoCub 1.0 S/N:000 ergoCub robot (prototype) pinned This label prevents an issue from being closed automatically
Projects
Status: Done
Development

No branches or pull requests

8 participants