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

[planning] Match RobotDiagram default time step to MbP's default #21098

Conversation

jwnimmer-tri
Copy link
Collaborator

@jwnimmer-tri jwnimmer-tri commented Mar 5, 2024

This fixes some crashes when using models that need discrete-time-only modeling features, such as implicit PD control.

Closes #21095.


This change is Reviewable

@jwnimmer-tri jwnimmer-tri added the release notes: fix This pull request contains fixes (no new features) label Mar 5, 2024
@jwnimmer-tri jwnimmer-tri force-pushed the robot-diagram-builder-default-time-step branch from e34a368 to 2b8e5fd Compare March 5, 2024 20:59
@svenevs

This comment was marked as resolved.

@jwnimmer-tri

This comment was marked as resolved.

@jwnimmer-tri
Copy link
Collaborator Author

+@rpoyner-tri for feature review, please.

+@calderpg-tri for extra sanity check feature review, please.

+@EricCousineau-TRI for platform review per schedule, please.

+(priority: medium)

FYI Anzu CI passes when run against this PR.

Copy link
Contributor

@calderpg-tri calderpg-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 3 files at r1, 3 of 3 files at r3, all commit messages.
Reviewable status: 1 unresolved discussion, LGTM missing from assignees rpoyner-tri(platform),EricCousineau-TRI(platform),calderpg-tri


planning/robot_diagram_builder.h line 32 at r3 (raw file):

  DRAKE_NO_COPY_NO_MOVE_NO_ASSIGN(RobotDiagramBuilder)

  /** Constructs with the specified time step for the contained plant. */

I think it would be helpful to document the default value here, and why a non-zero value makes sense for uses that aren't simulation.

This fixes some crashes when using models that need discrete-time-only
modeling features, such as implicit PD control.
@jwnimmer-tri jwnimmer-tri force-pushed the robot-diagram-builder-default-time-step branch from a08530d to 326b169 Compare April 4, 2024 18:27
Copy link
Collaborator Author

@jwnimmer-tri jwnimmer-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 3 files at r1, 3 of 3 files at r3, 1 of 1 files at r4, all commit messages.
Reviewable status: 1 unresolved discussion, LGTM missing from assignees rpoyner-tri(platform),EricCousineau-TRI(platform),calderpg-tri


planning/robot_diagram_builder.h line 32 at r3 (raw file):

Previously, calderpg-tri wrote…

I think it would be helpful to document the default value here, and why a non-zero value makes sense for uses that aren't simulation.

Good point; done.

In terms of explaining mimic joint stuff in detail, I'll defer to the MbP documentation to explain it. Lots of users are baffled by it, but I don't want to bite off solving those doc problems in this PR, since we don't have Alejandro available for review.

Copy link
Collaborator Author

@jwnimmer-tri jwnimmer-tri 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: 1 unresolved discussion, LGTM missing from assignees rpoyner-tri(platform),EricCousineau-TRI(platform),calderpg-tri


planning/robot_diagram_builder.h line 32 at r3 (raw file):

Previously, jwnimmer-tri (Jeremy Nimmer) wrote…

Good point; done.

In terms of explaining mimic joint stuff in detail, I'll defer to the MbP documentation to explain it. Lots of users are baffled by it, but I don't want to bite off solving those doc problems in this PR, since we don't have Alejandro available for review.

image.png

Copy link
Contributor

@calderpg-tri calderpg-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:

Reviewed 1 of 1 files at r4, all commit messages.
Reviewable status: LGTM missing from assignees rpoyner-tri(platform),EricCousineau-TRI(platform)

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.

:lgtm: platform

Reviewed 1 of 3 files at r1, 3 of 3 files at r3, 1 of 1 files at r4, all commit messages.
Reviewable status: LGTM missing from assignee rpoyner-tri(platform)

Copy link
Contributor

@rpoyner-tri rpoyner-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:

Reviewed 1 of 3 files at r1, 3 of 3 files at r3, 1 of 1 files at r4, all commit messages.
Reviewable status: :shipit: complete! all discussions resolved, LGTM from assignees rpoyner-tri(platform),EricCousineau-TRI(platform),calderpg-tri

@jwnimmer-tri jwnimmer-tri merged commit c5d9482 into RobotLocomotion:master Apr 4, 2024
10 checks passed
@jwnimmer-tri jwnimmer-tri deleted the robot-diagram-builder-default-time-step branch April 4, 2024 21:44
RussTedrake pushed a commit to RussTedrake/drake that referenced this pull request Dec 15, 2024
…otLocomotion#21098)

This fixes some crashes when using models that need discrete-time-only
modeling features, such as implicit PD control.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: medium release notes: fix This pull request contains fixes (no new features)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

model_visualizer does not support mimic joints or implicit PD controlled joints
5 participants