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

Remove overly cautious warning (#869) #1374

Closed
wants to merge 2 commits into from

Conversation

yurket
Copy link

@yurket yurket commented Jul 18, 2019

Remove overly cautious warning


Before creating a pull request

  • Document new methods and classes (N/A)
  • Format new code files using clang-format (N/A)

Before merging a pull request

  • Set version target by selecting a milestone on the right side (N/A)
  • Summarize this change in CHANGELOG.md (N/A)
  • Add unit test(s) for this change (N/A)

@yurket
Copy link
Author

yurket commented Jul 18, 2019

refers to #869

@codecov
Copy link

codecov bot commented Jul 18, 2019

Codecov Report

Merging #1374 into master will decrease coverage by <.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1374      +/-   ##
==========================================
- Coverage   57.27%   57.27%   -0.01%     
==========================================
  Files         366      366              
  Lines       27432    27427       -5     
==========================================
- Hits        15711    15708       -3     
+ Misses      11721    11719       -2
Impacted Files Coverage Δ
dart/dynamics/detail/GenericJoint.hpp 75.4% <ø> (+0.47%) ⬆️
dart/dynamics/EulerJoint.cpp 69.32% <0%> (-3.69%) ⬇️
dart/dynamics/Skeleton.cpp 66.22% <0%> (+0.16%) ⬆️

@mxgrey
Copy link
Member

mxgrey commented Jul 19, 2019

Thanks for this PR!

I think rather than just removing the warning, we should remove the entire limit check. As it is right now in this PR, the function will quit without allowing the rest position to be set outside the limits. However, there might be a legitimate use case where the rest position is outside of the limits, where the passive dynamics will clamp the joint down onto its joint limit.

For that reason, I would suggest removing all of lines 1470-1474.

@mxgrey
Copy link
Member

mxgrey commented Jul 19, 2019

Also with that change in behavior, I think it would be smart to set up a simple unit test.

The unit test could be as simple as a link attached to the world by a revolute joint where the revolute joint has some lower position limit, and its spring rest position is a lower value than its position limit (note that the spring stiffness should be something positive). Then the unit test can simulate the system for a second or two and check if the link comes to rest at its lower position limit.

@jslee02
Copy link
Member

jslee02 commented Jul 22, 2019

@mxgrey Your suggestions all sound good to me. I think we can merge this PR and address your suggestions as a separate PR.

@mxgrey
Copy link
Member

mxgrey commented Jul 22, 2019

To be honest I think this PR on its own is problematic because it removes a warning without removing behavior that is likely to surprise users. If we merge it in as-is, we risk the possibility that we forget to change this problematic behavior.

@yurket
Copy link
Author

yurket commented Jul 23, 2019

Agree with you, guys. Silent return doesn't look good. I'll add a test for the behavior.

@jslee02 jslee02 added this to the DART 6.10.0 milestone Aug 17, 2019
@jslee02
Copy link
Member

jslee02 commented Sep 20, 2019

Thank you for your contribution. Closing in favor of #1418 that is a rework of this PR addressing @mxgrey's comments.

@jslee02 jslee02 closed this Sep 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants