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

sdf/1.10/joint.sdf: add screw_thread_pitch #1168

Merged
merged 11 commits into from
Oct 18, 2022
Merged

Conversation

scpeters
Copy link
Member

🦟 Bug fix

Fixes #1125 and adds alternate parameter

Summary

This clarifies the definition (including units and sign convention) of the //joint/thread_pitch parameter in 3f080e6 based on the interpretation of this parameter in gazebo-classic, fixing #1125. Based on the additional discussion in that issue, I have added a new element //joint/screw_thread_pitch with units of meters / revolution that is positive for right-handed threads, and deprecates //joint/thread_pitch in SDFormat 1.10. C++ and python APIs for getting and setting the thread pitch using the new units / sign convention are added as well, while preserving the functionality of the existing API.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Gazebo-classic interprets this parameter with units
of radians / meter with a positive value corresponding
to a left-handed thread.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Deprecate thread_pitch parameter and recommend new
screw_thread_pitch parameter with different units
and sign convention.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
This adds ScrewThreadPitch and SetScrewThreadPitch APIs
for getting and setting the thread pitch using the
units and sign convention of //joint/screw_thread_pitch.
During Joint::Load, the screw_thread_pitch variable
is preferred, while thread_pitch is used otherwise.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
@github-actions github-actions bot added the 🌱 garden Ignition Garden label Sep 23, 2022
@osrf-triage osrf-triage added this to Inbox in Core development Sep 23, 2022
@scpeters scpeters added this to In Review in SDFormat Development TRI Sep 23, 2022
@scpeters scpeters moved this from Inbox to In review in Core development Sep 23, 2022
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
@codecov
Copy link

codecov bot commented Sep 23, 2022

Codecov Report

Merging #1168 (3be0fc1) into sdf13 (bcc2a92) will decrease coverage by 0.00%.
The diff coverage is 88.23%.

@@            Coverage Diff             @@
##            sdf13    #1168      +/-   ##
==========================================
- Coverage   87.26%   87.25%   -0.01%     
==========================================
  Files         125      125              
  Lines       16102    16114      +12     
==========================================
+ Hits        14051    14061      +10     
- Misses       2051     2053       +2     
Impacted Files Coverage Δ
python/src/sdf/pyJoint.cc 64.70% <66.66%> (-0.73%) ⬇️
src/Joint.cc 91.22% <100.00%> (+0.27%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

src/Joint.cc Outdated Show resolved Hide resolved
test/integration/joint_dom.cc Show resolved Hide resolved
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Add param_precedence joint to test file
with identical values for thread_pitch
and screw_thread_pitch and confirm that
the screw_thread_pitch value is used.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
scpeters added a commit to scpeters/drake that referenced this pull request Oct 18, 2022
Depends on gazebosim/sdformat#1168 to provide the
//joint/screw_thread_pitch parameter in SDFormat 1.10
and corresponding Joint::ScrewThreadPitch() that
uses the same units as drake: meters / revolution.
scpeters added a commit to scpeters/drake that referenced this pull request Oct 18, 2022
Depends on gazebosim/sdformat#1168 to provide the
//joint/screw_thread_pitch parameter in SDFormat 1.10
and corresponding Joint::ScrewThreadPitch() that
uses the same units as drake: meters / revolution.
@scpeters
Copy link
Member Author

I've opened RobotLocomotion/drake#18127 as a draft pull request that uses this branch. I'll mark it as ready for review once this PR has been merged and released

@scpeters scpeters merged commit 1c2c2af into sdf13 Oct 18, 2022
Core development automation moved this from In review to Done Oct 18, 2022
@scpeters scpeters deleted the scpeters/screw_thread_pitch branch October 18, 2022 20:40
@scpeters scpeters moved this from In Review to Done in SDFormat Development TRI Oct 18, 2022
scpeters added a commit to scpeters/drake that referenced this pull request Oct 20, 2022
Depends on gazebosim/sdformat#1168 to provide the
//joint/screw_thread_pitch parameter in SDFormat 1.10
and corresponding Joint::ScrewThreadPitch() that
uses the same units as drake: meters / revolution.
scpeters added a commit to scpeters/drake that referenced this pull request Oct 24, 2022
Depends on gazebosim/sdformat#1168 to provide the
//joint/screw_thread_pitch parameter in SDFormat 1.10
and corresponding Joint::ScrewThreadPitch() that
uses the same units as drake: meters / revolution.
scpeters added a commit to scpeters/drake that referenced this pull request Oct 24, 2022
Depends on gazebosim/sdformat#1168 to provide the
//joint/screw_thread_pitch parameter in SDFormat 1.10
and corresponding Joint::ScrewThreadPitch() that
uses the same units as drake: meters / revolution.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌱 garden Ignition Garden
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Clarify definition of //joint/thread_pitch for screw joints
2 participants