dart icon indicating copy to clipboard operation
dart copied to clipboard

fix joint stuck at limit bug

Open ufrhaidar opened this issue 1 year ago • 4 comments

Fix https://github.com/dartsim/dart/issues/1683 and https://github.com/gazebosim/gz-sim/issues/1684

result:

https://github.com/dartsim/dart/assets/110574820/2f5d5444-a5ea-47f3-84a2-f94ab83ca3f8


Before creating a pull request

  • [ ] Document new methods and classes
  • [ ] Format new code files using ClangFormat by running make format
  • [ ] Build with -DDART_TREAT_WARNINGS_AS_ERRORS=ON and resolve all the compile warnings

Before merging a pull request

  • [ ] Set version target by selecting a milestone on the right side
  • [ ] Summarize this change in CHANGELOG.md
  • [ ] Add unit test(s) for this change
  • [ ] Add Python bindings for new methods and classes

ufrhaidar avatar Jun 26 '24 07:06 ufrhaidar

Could you please take a look at the test failures?

jslee02 avatar Jun 26 '24 15:06 jslee02

I don't believe that the changes I've done are the correct thing to do. It just was what got the system out of the velocity limit loop (when position is equal to limit).

Deleting the velocity limit section also fixed the issue, but I don't know what effects it will have on other joint types.

Would this change be acceptable?

ufrhaidar avatar Jun 27 '24 04:06 ufrhaidar

@jslee02 what needs to be done now?

ufrhaidar avatar Jul 18 '24 01:07 ufrhaidar

Apologies for the delayed response. I am currently on vacation and will be sporadic in my availability to provide a thorough analysis of this issue and the patch for this PR.

Regarding this PR, as you mentioned, I am also uncertain about the potential side effects of disabling the velocity limit correction for servo motor types. I wonder if there is a better way to address the issue without completely disabling it.

jslee02 avatar Jul 21 '24 10:07 jslee02

@jslee02, are there any updates on this PR? We have a downstream issue https://github.com/gazebosim/gz-sim/issues/1684 that is affected by this.

azeey avatar Sep 08 '25 20:09 azeey

Hey folks -- sorry this took me a bit! I cherry-picked Haidar’s three commits onto a fresh branch off release-6.16 so the original authorship is intact. I also added a focused regression (Issue1683.ServoJointRecoversFromPositionLimits plus a small SDF fixture) that reproduces the stuck-at-limit behaviour from #1683 and #1684: it fails before the patches and passes after they’re applied, while the existing Issue1583 test still passes.

I'll open a new PR with that branch now so it’s easy to review -- happy to adjust anything else you’d like to see.

jslee02 avatar Nov 02 '25 15:11 jslee02

https://github.com/dartsim/dart/pull/2086

jslee02 avatar Nov 02 '25 16:11 jslee02