RobotLocomotion / drake

Model-based design and verification for robotics.
https://drake.mit.edu
Other
3.16k stars 1.24k forks source link

[tutorials] MultibodyPlant Tutorial #16643

Open xuchenhan-tri opened 2 years ago

xuchenhan-tri commented 2 years ago

As discussed in #12912, we currently don't have tutorial covering how MbP works. Russ and I started a sketch tutorial in deepnote that touches on the following aspects mentioned in #12912:

The tutorial still needs some polish to be considered finished

@RussTedrake @jwnimmer-tri

jwnimmer-tri commented 2 years ago

The probable best workflow here is to finish editing and collaborating on the tutorial using the online Colab notebook, and then once it's in almost-final shape, to copy it into a Drake PR for review and submission into Drake's drake/tutorials/... folder, at which point we'd also add it to the index.ipynb there.

RussTedrake commented 2 years ago

fwiw -- i've just updated the deepnote tutorial to use Drake's JointSliders instead of the manipulation joint sliders, and removed the dependency on the manipulation repo.

jwnimmer-tri commented 2 years ago

@zachfang as this tutorial gets closer to completion, please tag @aykut-tri to help review it for clarity and a fresh set of eyes. Others of us reviewing it (myself, Xuchen, etc.) are already deeply familiar with MbP; having a mixed-experience audience for review will be super valuable.

jwnimmer-tri commented 2 years ago

The probable best workflow here is to finish editing and collaborating on the tutorial using the online Colab notebook, and then once it's in almost-final shape, to copy it into a Drake PR ...

I didn't say this as clearly as I could -- my suggestion is to do the entire Feature Review phase using Deepnote, and only copy it into a Drake PR once that's finished, and we're on to Platform Review.

jwnimmer-tri commented 2 years ago

I am cleaning up the issues database now. I'm going to close out #12912 as a duplicate of this issue. Thus, I'll consolidate some of its suggestions into this issue.

We don't need to act on these immediately. Once the first pass at this tutorial lands on master, we should revisit all of the ideas above and below, and come up with the goals for a second pass.

From https://github.com/RobotLocomotion/drake/issues/12912#issue-585270143:

From https://github.com/RobotLocomotion/drake/issues/12912#issuecomment-602067832:

From https://github.com/RobotLocomotion/drake/issues/12912#issuecomment-602138523:

jwnimmer-tri commented 2 years ago

Note that I've filed #17132 for a related, collision-specific tutorial.

RussTedrake commented 2 years ago

This seems like the right issue to add one more idea/request:

It would be nice if the authoring multibody plant tutorial could also show people how to author and visualize kinematic frames. I wrote the following utilities, which I find super valuable for this workflow: https://github.com/RussTedrake/manipulation/blob/346038d7fb3b18d439a88be6ed731c6bf19b43de/manipulation/scenarios.py#L367-L421

RussTedrake commented 2 years ago

Also, from slack:

russtedrake in this tutorial, there are a few examples of having the sdf string directly in the jupyter cell... a workflow I like very much. But then you write it to disk and then load it with AddModelFromFile. Why not just AddModelFromString?? I don't mind changing it, but thought I would avoid Chesterton's fence.

jeremy.nimmer Discussed during review at https://github.com/RobotLocomotion/drake/pull/17148#pullrequestreview-971126542. I'd support moving model_inspector into pydrake proper and accepting either filename or string.

jwnimmer-tri commented 1 year ago

It would be nice if the authoring multibody plant tutorial could also show people how to author and visualize kinematic frames. ... I'd support moving model_inspector into pydrake proper and accepting either filename or string.

For the record, that's what #18249 is doing.