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

Parse screw joints from SDFormat #18127

Merged
merged 2 commits into from
Oct 24, 2022

Conversation

scpeters
Copy link
Contributor

@scpeters scpeters commented Oct 18, 2022

Part of #17765.

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. The existing thread_pitch parameter (exposed via Joint::ThreadPitch()) has been used in gazebo classic with inverse units and the opposite sign convention.


This change is Reviewable

@EricCousineau-TRI
Copy link
Contributor

Will require minor release of sdformat, which should happen w/in next 2 weeks or so.

@scpeters
Copy link
Contributor Author

Will require minor release of sdformat, which should happen w/in next 2 weeks or so.

the 13.2.0 release has been made, and this is ready for review

Copy link
Contributor

@EricCousineau-TRI EricCousineau-TRI left a comment

Choose a reason for hiding this comment

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

+@EricCousineau-TRI :lgtm_strong:, thanks!
+@ggould-tri for platform review, please!

Reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: LGTM missing from assignee ggould-tri(platform), commits need curation (https://drake.mit.edu/reviewable.html#curated-commits), missing label for release notes (waiting on @ggould-tri)

Copy link
Contributor

@ggould-tri ggould-tri left a comment

Choose a reason for hiding this comment

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

:lgtm:; one obscure comment nit.

Reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: 1 unresolved discussion, commits need curation (https://drake.mit.edu/reviewable.html#curated-commits), missing label for release notes (waiting on @scpeters)


multibody/parsing/detail_sdf_parser.cc line 771 at r1 (raw file):

    case sdf::JointType::SCREW: {
      const double damping = ParseJointDamping(diagnostic, joint_spec);
      // The ScrewThreadPitch() API uses the same units as drake: meters / rev

minor: This comment is a bit misleading from the point of view of Drake's internals, since drake is actually violating its own unit conventions in ScrewJoint (drake by convention uses radians, not revolutions, to express rotation). I've suggested a slight rewording here (and also added the missing end-of-sentence punctuation) but you can decide if or how much of this suggestion to take.

Suggestion:

      // The ScrewThreadPitch() API uses the same representation as
      // Drake's ScrewJoint class (meters / revolution, right-handed).

@scpeters scpeters force-pushed the parsing_sdf_screw_joint branch from a0de6ab to 952b9b5 Compare October 24, 2022 17:16
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 scpeters force-pushed the parsing_sdf_screw_joint branch from 952b9b5 to a5a424a Compare October 24, 2022 17:18
Copy link
Contributor Author

@scpeters scpeters left a comment

Choose a reason for hiding this comment

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

Reviewable status: commits need curation (https://drake.mit.edu/reviewable.html#curated-commits), missing label for release notes (waiting on @EricCousineau-TRI and @ggould-tri)


multibody/parsing/detail_sdf_parser.cc line 771 at r1 (raw file):

Previously, ggould-tri wrote…

minor: This comment is a bit misleading from the point of view of Drake's internals, since drake is actually violating its own unit conventions in ScrewJoint (drake by convention uses radians, not revolutions, to express rotation). I've suggested a slight rewording here (and also added the missing end-of-sentence punctuation) but you can decide if or how much of this suggestion to take.

Done

Copy link
Contributor

@ggould-tri ggould-tri left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: commits need curation (https://drake.mit.edu/reviewable.html#curated-commits), missing label for release notes (waiting on @scpeters)

@ggould-tri ggould-tri added the release notes: feature This pull request contains a new feature label Oct 24, 2022
Copy link
Contributor

@ggould-tri ggould-tri left a comment

Choose a reason for hiding this comment

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

+(release notes: feature)

Reviewable status: commits need curation (https://drake.mit.edu/reviewable.html#curated-commits) (waiting on @scpeters)

@ggould-tri ggould-tri added the status: commits are properly curated https://drake.mit.edu/reviewable.html#curated-commits label Oct 24, 2022
Copy link
Contributor

@ggould-tri ggould-tri left a comment

Choose a reason for hiding this comment

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

+(status: commits are properly curated)

Reviewable status: when planning a "properly curated" merge commit the PR must always be rebased onto latest master (waiting on @scpeters)

@jwnimmer-tri
Copy link
Collaborator

FWIW -- to my first glance, the commits are not really independently revertable so we should squash them in any case.

@ggould-tri ggould-tri added status: squashing now https://drake.mit.edu/reviewable.html#curated-commits and removed status: commits are properly curated https://drake.mit.edu/reviewable.html#curated-commits labels Oct 24, 2022
Copy link
Contributor

@ggould-tri ggould-tri left a comment

Choose a reason for hiding this comment

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

The commits seemed to work when I one-at-a-timed them, but I'm happy to take your caution and get this merged :-) .
-(status: commits are properly curated) +(status: squashing now)

Reviewable status: when planning a "properly curated" merge commit the PR must always be rebased onto latest master (waiting on @scpeters)

@ggould-tri ggould-tri merged commit 69bb37d into RobotLocomotion:master Oct 24, 2022
@jwnimmer-tri
Copy link
Collaborator

The failure mode would be if macOS couldn't build the libsdformat upgrade, then we'd need to revert not only the upgrade but also the new parsing feature.

@scpeters scpeters deleted the parsing_sdf_screw_joint branch October 24, 2022 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release notes: feature This pull request contains a new feature status: squashing now https://drake.mit.edu/reviewable.html#curated-commits
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants