-
Notifications
You must be signed in to change notification settings - Fork 95
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
Return positive infinity instead of -1 for boundless positive values #357
Conversation
@mxgrey if you want to amend with a |
Codecov Report
@@ Coverage Diff @@
## sdf10 #357 +/- ##
=======================================
Coverage 87.32% 87.33%
=======================================
Files 60 60
Lines 9216 9220 +4
=======================================
+ Hits 8048 8052 +4
Misses 1168 1168
Continue to review full report at Codecov.
|
@osrf-jenkins run tests please |
@osrf-jenkins run tests please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I just have a minor comment about documentation.
Add example file with default, finite and infinite joint limit values, using both "inf" and "-1" to specify infinite values of the effort and velocity limit. Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
9407890
to
0227719
Compare
I think this doesn't require any downstream changes in ion-physics, since it is already using a similar conversion: |
…azebosim#357) SDFormat has a convention of using -1 to represent positive infinity for symmetric joint limits on velocity and effort. If users of the DOM API are not careful and cognizant of this convention, it can result in confusing bugs that are hard to track down. This PR changes the API behavior so that the API returns positive infinity instead of -1 to represent boundlessly positive values. Hopefully this might save other SDF users from long, confusing debugging sessions. A test is added with an example file with default, finite and infinite joint limit values, using both "inf" and "-1" to specify infinite values of the effort and velocity limit. Signed-off-by: Steve Peters <scpeters@openrobotics.org> Co-authored-by: Michael X. Grey <grey@openrobotics.org>
…357) SDFormat has a convention of using -1 to represent positive infinity for symmetric joint limits on velocity and effort. If users of the DOM API are not careful and cognizant of this convention, it can result in confusing bugs that are hard to track down. This PR changes the API behavior so that the API returns positive infinity instead of -1 to represent boundlessly positive values. Hopefully this might save other SDF users from long, confusing debugging sessions. A test is added with an example file with default, finite and infinite joint limit values, using both "inf" and "-1" to specify infinite values of the effort and velocity limit. Signed-off-by: Steve Peters <scpeters@openrobotics.org> Co-authored-by: Michael X. Grey <grey@openrobotics.org>
…357) SDFormat has a convention of using -1 to represent positive infinity for symmetric joint limits on velocity and effort. If users of the DOM API are not careful and cognizant of this convention, it can result in confusing bugs that are hard to track down. This PR changes the API behavior so that the API returns positive infinity instead of -1 to represent boundlessly positive values. Hopefully this might save other SDF users from long, confusing debugging sessions. A test is added with an example file with default, finite and infinite joint limit values, using both "inf" and "-1" to specify infinite values of the effort and velocity limit. Signed-off-by: Steve Peters <scpeters@openrobotics.org> Co-authored-by: Michael X. Grey <grey@openrobotics.org>
Targeted at
sdf10
, this is a resubmission of #249, which itself was a revival of bitbucket PR 458 per #231. I've added tests in 148d782. cc @mxgreyOriginal description:
SDFormat has a convention of using -1 to represent positive infinity. If users of the DOM API are not careful and cognizant of this convention, it can result in confusing bugs that are hard to track down. My dartsim plugin was exhibiting subtle non-physical behavior after loading structures from SDF, because it had effort and velocity limits of +1 (minimum) and -1 (maximum).
This PR is a suggested tweak to the API behavior so that the API returns positive infinity instead of -1 to represent boundlessly positive values. Hopefully this might save other SDF users from long, confusing debugging sessions.
However, this does deviate from the exact convention of the SDF document specification, so I’d understand if this PR is declined.