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

Bugfix/urdfparser #1064

Merged
merged 7 commits into from
May 3, 2018
Merged

Bugfix/urdfparser #1064

merged 7 commits into from
May 3, 2018

Conversation

aditya-vk
Copy link
Contributor

@aditya-vk aditya-vk commented May 1, 2018

Continuous Joints have been previously parsed with joint limits set to 0 resulting in incorrect behavior of the joint and relevant functions [For instance, isCyclic()].

This PR corrects the parsing for these joints by setting the joint limits to negative/positive infinity.

To show the behavior:
Commit 456cca0 has a test to show that current implementation has a bug.
Commit 5eff95d provides a fix.
Commit 9d8d316 has the test to show the fix works.


Before creating a pull request

  • Document new methods and classes
  • Format new code files using clang-format

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

@jslee02 jslee02 added this to the DART 6.5.0 milestone May 1, 2018
jslee02
jslee02 previously approved these changes May 1, 2018
Copy link
Member

@jslee02 jslee02 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

I have one nitpick though.

case urdf::Joint::CONTINUOUS:
{
singleDof.mPositionLowerLimits[0] = -math::constantsd::inf();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Could we comment the reason of this overwriting something like:

// We overwrite joint position limits to negative/positive infinities
// for "continuous" joint. This is because the URDF parser ignorantly
// reads joint limits or defaults to zero, which always should be
// infinity for "continuous" joint.

@codecov
Copy link

codecov bot commented May 1, 2018

Codecov Report

Merging #1064 into release-6.5 will increase coverage by 0.03%.
The diff coverage is 100%.

@@               Coverage Diff               @@
##           release-6.5    #1064      +/-   ##
===============================================
+ Coverage        56.57%   56.61%   +0.03%     
===============================================
  Files              316      316              
  Lines            24387    24393       +6     
===============================================
+ Hits             13797    13809      +12     
+ Misses           10590    10584       -6
Impacted Files Coverage Δ
dart/utils/urdf/DartLoader.cpp 75% <100%> (+0.61%) ⬆️
dart/dynamics/detail/GenericJoint.hpp 74.39% <0%> (+0.5%) ⬆️
dart/dynamics/RevoluteJoint.cpp 65.57% <0%> (+3.27%) ⬆️

mxgrey
mxgrey previously approved these changes May 1, 2018
@aditya-vk
Copy link
Contributor Author

Uh oh. Sorry for dismissing reviews with minor updates. Updated CHANGELOG.md and made the test scripts more compact. Should be good to go unless there are issues. :)

mxgrey
mxgrey previously approved these changes May 1, 2018
@jslee02 jslee02 merged commit 1affe88 into dartsim:release-6.5 May 3, 2018
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