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

[manipulation] Add UR3e model and TRI Homecart #17387

Merged
merged 1 commit into from
Jul 13, 2022

Conversation

RussTedrake
Copy link
Contributor

@RussTedrake RussTedrake commented Jun 12, 2022

This PR only contains a test that verifies that the model can be
parsed correctly (through model directives, etc). But in a follow-up
PR I will use this as a Drake example of bimanual motion planning with
Graph of Convex Sets.

These models were derived from the Anzu versions; with a few changes:

  • Anzu has "left/right" variants of the ur3e models, which set tighter
    joint limits for the homecart configuration. I felt that it was a
    little inelegant to put those in the ur3e directory (they should be
    homecart specific). We can add them later if need be.

  • I've used the simple wsg gripper models that were already in Drake
    instead of the fancier models in anzu.

  • I've named the directory tri_homecart instead of homecart.

+@rcory for feature review, please.
fyi @ToffeeAlbina-TRI , @BenBurchfiel-TRI

image

This image confirms that the grasp frames are correct
image


This change is Reviewable

@RussTedrake RussTedrake added component: planning and control Optimization-based planning and control, and search- and sampling-based planning release notes: feature This pull request contains a new feature labels Jun 12, 2022
@RussTedrake
Copy link
Contributor Author

tools/workspace/models_internal/repository.bzl line 12 at r1 (raw file):

        repository = "RussTedrake/models",
        commit = "a48aa6422741ef819cda9843e8896d02a35986e8",
        sha256 = "ef7ebcd30ba9e751ac7b1fa26c0a799e533b98e8fd3b9fd5aa422bcc8c945c57",  # noqa

Working temporary SHA1 until the models PR RobotLocomotion/models#18 is merged.

Copy link
Contributor

@rcory rcory 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 19 of 19 files at r1, all commit messages.
Reviewable status: 1 unresolved discussion, needs platform reviewer assigned, needs at least two assigned reviewers (waiting on @RussTedrake)

Copy link
Contributor

@rcory rcory left a comment

Choose a reason for hiding this comment

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

+@xuchenhan-tri for platform review, please.

Reviewable status: 1 unresolved discussion, LGTM missing from assignee xuchenhan-tri(platform) (waiting on @RussTedrake and @xuchenhan-tri)

@jwnimmer-tri
Copy link
Collaborator

See #17395. As written currently, this PR adds approximately 18 MiB to our wheels, which will break the next monthly release.

@RussTedrake
Copy link
Contributor Author

Seems like #15774 is the current proposed solution? Should we increase it's priority?

Copy link
Contributor

@xuchenhan-tri xuchenhan-tri left a comment

Choose a reason for hiding this comment

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

Platform review done with a couple of comments.

Pending the issue of wheel size and the upstream RobotLocomotion/models#18 that this PR depends on.

Reviewed 19 of 19 files at r1, all commit messages.
Reviewable status: 3 unresolved discussions, LGTM missing from assignee xuchenhan-tri(platform) (waiting on @RussTedrake)

a discussion (no related file):
nit, The tri_homecart directory would benefit from a short README similar to the one in the ur3e directory to describe what the model is composed of. Something along the line of the commit message would probably do.


a discussion (no related file):
It seems like the ur3e model is missing a basic smoke test.


@jwnimmer-tri
Copy link
Collaborator

Seems like #15774 is the current proposed solution? Should we increase it's priority?

That ticket will take many weeks to finish, both because it is non-trivial and because there are more urgent issues that trump it on the board. I assume you want this PR to land more quickly than that?


The easiest answer is to not install these model files. If the forthcoming example itself will not be installed, then there is no reason why its data files need to be installed.


The next-easiest answer is to exclude these models from the wheel build (only), ala:

# TODO(mwoehlke-kitware) We need to remove these to keep the wheel from being
# too large, but (per above), the whole of share/drake shouldn't be in the
# wheel.
rm -rf \
${WHEEL_DIR}/pydrake/share/drake/manipulation/models/ycb/meshes/*.png \
${WHEEL_DIR}/pydrake/share/drake/examples/atlas

Be careful, though. Even though only the wheel has an enforced upper size limit, we still don't want our apt, tgz, nor docker releases to become unreasonably large, either.

Copy link
Contributor Author

@RussTedrake RussTedrake left a comment

Choose a reason for hiding this comment

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

I've updated this with the new .urdf.xacro files from @IanTheEngineer , and addressed the simple comments.

I still need to decide the right course of action on whether to install the files (and remove from pip wheels) or not. And I'm collating the updated (smaller filesize) versions of the geometries/textures on the models PR).

Reviewable status: 2 unresolved discussions, LGTM missing from assignee xuchenhan-tri(platform) (waiting on @rcory, @RussTedrake, and @xuchenhan-tri)

a discussion (no related file):

Previously, xuchenhan-tri wrote…

nit, The tri_homecart directory would benefit from a short README similar to the one in the ur3e directory to describe what the model is composed of. Something along the line of the commit message would probably do.

Done.


a discussion (no related file):

Previously, xuchenhan-tri wrote…

It seems like the ur3e model is missing a basic smoke test.

Done. (but note that none of the other robot models have them; like iiwa, panda, etc)


Copy link
Contributor

@xuchenhan-tri xuchenhan-tri left a comment

Choose a reason for hiding this comment

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

These changes seem quite significant and perhaps require a feature reviewer to take a look? I can make another platform pass when everything is sorted out.

Reviewed 3 of 8 files at r2.
Reviewable status: 1 unresolved discussion, LGTM missing from assignee xuchenhan-tri(platform) (waiting on @rcory, @RussTedrake, and @xuchenhan-tri)

a discussion (no related file):

Previously, RussTedrake (Russ Tedrake) wrote…

Done. (but note that none of the other robot models have them; like iiwa, panda, etc)

Thanks.

I suppose the absence of a smoke test is more of an oversight than intention. Having a smoke test gives us better confidence to modify the models in the future.


Copy link
Contributor Author

@RussTedrake RussTedrake left a comment

Choose a reason for hiding this comment

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

Per discussion with @jwnimmer-tri , I've gone ahead and left the files to be installed and removed them from the pip wheels.
This is fine for the short term, and we feel that #9498 (and #13942) are the right longer-term solution.

@xuchenhan-tri -- I'm waiting on the updated model files for the corresponding models repo PR; once those land I will find an additional feature reviewer who's not on vacation/leave.

Reviewable status: 1 unresolved discussion, LGTM missing from assignee xuchenhan-tri(platform) (waiting on @rcory, @RussTedrake, and @xuchenhan-tri)

@RussTedrake RussTedrake force-pushed the homecart branch 2 times, most recently from 970722f to e4928bb Compare July 12, 2022 11:42
Copy link
Contributor Author

@RussTedrake RussTedrake left a comment

Choose a reason for hiding this comment

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

I've received the updated mesh files from Cody (now the homecart assets are only ~2MB). I believe this PR is now ready to go.

All of my existing feature reviewers are OOO.
+@ggould-tri for additional feature review, please.

Reviewable status: 1 unresolved discussion, LGTM missing from assignees xuchenhan-tri(platform),ggould-tri(platform) (waiting on @ggould-tri, @rcory, @RussTedrake, and @xuchenhan-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.

I'm sorry this has taken so long and you've been stung by the vacation schedule. I'll look into this today and should have it reviewed by early afternoon.

Reviewable status: 1 unresolved discussion, LGTM missing from assignees ggould-tri(platform),xuchenhan-tri(platform) (waiting on @ggould-tri, @rcory, @RussTedrake, and @xuchenhan-tri)

Copy link
Collaborator

@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.

For reference, the ur3e meshes are 14M uncompressed (similar to franka at 17M, iiwa7 at 13M, and iiwa14 at 10M) and the homecart is 2M uncompressed.

Reviewable status: 2 unresolved discussions, LGTM missing from assignees ggould-tri(platform),xuchenhan-tri(platform) (waiting on @ggould-tri, @rcory, @RussTedrake, and @xuchenhan-tri)


tools/install/install_data.bzl line 51 at r4 (raw file):

        "vtp",
        "xml",
        "yaml",

The new glob pattern catches too many things. As of this PR, the following unwanted files are part of the installed image:

share/drake/examples/acrobot/acrobot_input_named_vector.yaml
share/drake/examples/acrobot/acrobot_params_named_vector.yaml
share/drake/examples/acrobot/acrobot_state_named_vector.yaml
share/drake/examples/acrobot/spong_controller_params_named_vector.yaml
share/drake/examples/atlas/config/control_config_hardware.yaml
share/drake/examples/atlas/config/control_config_sim.yaml
share/drake/examples/atlas/config/urdf_modifications_no_hands.yaml
share/drake/examples/atlas/config/urdf_modifications_robotiq_hands.yaml
share/drake/examples/atlas/config/urdf_modifications_robotiq_tendons.yaml
share/drake/examples/atlas/config/urdf_modifications_robotiq_weight.yaml
share/drake/examples/compass_gait/compass_gait_continuous_state_named_vector.yaml
share/drake/examples/compass_gait/compass_gait_params_named_vector.yaml
share/drake/examples/multibody/cart_pole/cart_pole_params_named_vector.yaml
share/drake/examples/pendulum/pendulum_input_named_vector.yaml
share/drake/examples/pendulum/pendulum_params_named_vector.yaml

You can inspect the list of installed files via bazel run //:install -- --list /no/such/path.

Most likely, the fix will be to undo this change and opt-in to extra_prod_models in a couple places.

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.

minor notes (mostly TRI-internal bits that don't make sense out of context)

Reviewed 12 of 19 files at r1, 8 of 8 files at r2, 1 of 1 files at r3, 2 of 2 files at r4, all commit messages.
Reviewable status: 12 unresolved discussions, LGTM missing from assignees ggould-tri(platform),xuchenhan-tri(platform) (waiting on @RussTedrake)


manipulation/models/tri_homecart/BUILD.bazel line 14 at r4 (raw file):

# This package is public so that other packages can refer to
# individual files in model from their bazel rules.

typo? In any case hard to understand.

Suggestion:

these models

manipulation/models/tri_homecart/BUILD.bazel line 44 at r4 (raw file):

    src = "homecart_cutting_board.sdf.xacro",
)

minor; author's discretion.
This seems like it might benefit from an explanatory comment. Sample text below.

Code snippet:

# Forward the homecart models from `RobotLocomotion/models` (and the
# corresponding `@models_internal//` bazel module) so that they appear
# in this directory for bazel `deps` or `FindResource` purposes.

manipulation/models/tri_homecart/homecart_bimanual.urdf.xacro line 200 at r4 (raw file):

  </joint>
  <!-- Add the upper structure board centered on the top leftmost
       corner (from the robot's perspective) corner nearest to the

typo


manipulation/models/tri_homecart/homecart_cutting_board.sdf.xacro line 48 at r4 (raw file):

           and a rigid surface, with the rigid one slightly inset.  This means
           that:
            * `item_fixups.cc` can assign different items to the different

minor: item_fixups.cc does not exist in this codebase.

Suggestion:

user code

manipulation/models/tri_homecart/homecart_cutting_board.sdf.xacro line 52 at r4 (raw file):

            * Objects without special collision filtering will not penetrate
              far enough into the cutting board to cause pathological collision
              shapes ("chiseling" and "submarining").

minor: These terms have no meaning to the wider drake community.


manipulation/models/tri_homecart/README.md line 1 at r4 (raw file):

# TRI HomeCart

FYI: Thank you for this file!


manipulation/models/ur3e/BUILD.bazel line 14 at r4 (raw file):

# This package is public so that other packages can refer to
# individual files in model from their bazel rules.

minor: Same remark as above

Code quote:

in model from

manipulation/models/ur3e/BUILD.bazel line 50 at r4 (raw file):

    ],
)

minor: Same remark as above


manipulation/models/ur3e/README.md line 12 at r4 (raw file):

  - Cylinders + spheres 
  - Spheres only (which works better w/ some collision checking frameworks)
  

typo extra whitespace.


manipulation/models/ur3e/ur3e.urdf.xacro line 12 at r4 (raw file):

<!--
  TODO(calderpg, sam.creasey, ggould) The acceleration limits in this file are wrong.

minor: These are TRI usernames, not public github usernames.

Suggestion:

calderpg-tri, sammy-tri, ggould-tri

manipulation/models/ur3e/ur3e.urdf.xacro line 14 at r4 (raw file):

  TODO(calderpg, sam.creasey, ggould) The acceleration limits in this file are wrong.
  Try to find the right value, which may need to coordinate with the driver.
-->

Minor: There is no public driver.

Suggestion:

  Try to find the right value.
-->

@jwnimmer-tri
Copy link
Collaborator

Once the final changes are in, please launch a linux-focal-unprovisioned-gcc-wheel-experimental-snopt-mosek-release to double-check against possible wheel build regressions.

Copy link
Contributor Author

@RussTedrake RussTedrake 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: 2 unresolved discussions, LGTM missing from assignees ggould-tri(platform),xuchenhan-tri(platform) (waiting on @ggould-tri, @jwnimmer-tri, @rcory, @RussTedrake, and @xuchenhan-tri)


tools/install/install_data.bzl line 51 at r4 (raw file):

Previously, jwnimmer-tri (Jeremy Nimmer) wrote…

The new glob pattern catches too many things. As of this PR, the following unwanted files are part of the installed image:

share/drake/examples/acrobot/acrobot_input_named_vector.yaml
share/drake/examples/acrobot/acrobot_params_named_vector.yaml
share/drake/examples/acrobot/acrobot_state_named_vector.yaml
share/drake/examples/acrobot/spong_controller_params_named_vector.yaml
share/drake/examples/atlas/config/control_config_hardware.yaml
share/drake/examples/atlas/config/control_config_sim.yaml
share/drake/examples/atlas/config/urdf_modifications_no_hands.yaml
share/drake/examples/atlas/config/urdf_modifications_robotiq_hands.yaml
share/drake/examples/atlas/config/urdf_modifications_robotiq_tendons.yaml
share/drake/examples/atlas/config/urdf_modifications_robotiq_weight.yaml
share/drake/examples/compass_gait/compass_gait_continuous_state_named_vector.yaml
share/drake/examples/compass_gait/compass_gait_params_named_vector.yaml
share/drake/examples/multibody/cart_pole/cart_pole_params_named_vector.yaml
share/drake/examples/pendulum/pendulum_input_named_vector.yaml
share/drake/examples/pendulum/pendulum_params_named_vector.yaml

You can inspect the list of installed files via bazel run //:install -- --list /no/such/path.

Most likely, the fix will be to undo this change and opt-in to extra_prod_models in a couple places.

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 1 of 19 files at r1, 7 of 7 files at r5, all commit messages.
Reviewable status: 2 unresolved discussions, LGTM missing from assignees ggould-tri(platform),xuchenhan-tri(platform) (waiting on @jwnimmer-tri and @RussTedrake)


tools/workspace/models_internal/repository.bzl line 12 at r1 (raw file):

Previously, RussTedrake (Russ Tedrake) wrote…

Working temporary SHA1 until the models PR RobotLocomotion/models#18 is merged.

Reviewing that PR now.

Copy link
Collaborator

@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 1 of 7 files at r5.
Reviewable status: 1 unresolved discussion, LGTM missing from assignees ggould-tri(platform),xuchenhan-tri(platform) (waiting on @RussTedrake)

This PR only contains a test that verifies that the model can be
parsed correctly (through model directives, etc). But in a follow-up
PR I will use this as a Drake example of bimanual motion planning with
Graph of Convex Sets.

These models were derived from the Anzu versions; with a few changes:

- Anzu has "left/right" variants of the ur3e models, which set tighter
joint limits for the homecart configuration.  I felt that it was a
little inelegant to put those in the ur3e directory (they should be
homecart specific).  We can add them later if need be.

- I've used the simple wsg gripper models that were already in Drake
instead of the fancier models in anzu.

- I've named the directory `tri_homecart` instead of `homecart`.

- I've manually removed the installed .obj and .png files from the pip
wheels; otherwise it would cause our wheels to exceed the 100MB limit.

- The model files have been optimized by Cody to get the filesize for the homecart-specific model files down to ~ 2MB.
@RussTedrake
Copy link
Contributor Author

@drake-jenkins-bot linux-focal-unprovisioned-gcc-wheel-experimental-snopt-mosek-release please

Copy link
Contributor Author

@RussTedrake RussTedrake left a comment

Choose a reason for hiding this comment

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

I believe all steps are complete and this is now ready to merge pending final reviewer approvals.

Reviewable status: LGTM missing from assignees ggould-tri(platform),xuchenhan-tri(platform) (waiting on @ggould-tri)


tools/workspace/models_internal/repository.bzl line 12 at r1 (raw file):

Previously, ggould-tri wrote…

Reviewing that PR now.

Done. The PR has merged, and I've pointed this back to the RobotLocomotion/models.

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:

Reviewed 1 of 1 files at r6, all commit messages.
Reviewable status: LGTM missing from assignee xuchenhan-tri(platform) (waiting on @RussTedrake)

Copy link
Contributor

@xuchenhan-tri xuchenhan-tri left a comment

Choose a reason for hiding this comment

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

platform :lgtm: pending CI failure.

Seems like docker is unhappy, but I don't know enough about it to triage.

Reviewed 3 of 8 files at r2, 1 of 1 files at r3, 1 of 2 files at r4, 6 of 7 files at r5, 1 of 1 files at r6, all commit messages.
Reviewable status: :shipit: complete! all discussions resolved, LGTM from assignees ggould-tri(platform),rcory,xuchenhan-tri(platform) (waiting on @RussTedrake)


-- commits line 24 at r6:
BTW, you may want to linebreak here at 72 char.


manipulation/models/ur3e/README.md line 12 at r4 (raw file):

Previously, ggould-tri wrote…

typo extra whitespace.

Looks like the whitespace is still there.

@xuchenhan-tri
Copy link
Contributor

+(status: do not merge) for now (CI failure)

@jwnimmer-tri
Copy link
Collaborator

The wheel failure was a regression from earlier today. I'm investigating.

@jwnimmer-tri
Copy link
Collaborator

@drake-jenkins-bot linux-focal-unprovisioned-gcc-wheel-experimental-snopt-mosek-release please

Copy link
Contributor

@xuchenhan-tri xuchenhan-tri left a comment

Choose a reason for hiding this comment

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

Thanks for the fix @jwnimmer-tri !

Reviewable status: :shipit: complete! all discussions resolved, LGTM from assignees ggould-tri(platform),rcory,xuchenhan-tri(platform) (waiting on @RussTedrake)

@xuchenhan-tri xuchenhan-tri merged commit 5969b87 into RobotLocomotion:master Jul 13, 2022
@RussTedrake RussTedrake deleted the homecart branch July 14, 2022 10:01
@jwnimmer-tri
Copy link
Collaborator

tools/wheel/image/build-wheel.sh line 101 at r6 (raw file):

rm -rf \
    ${WHEEL_DATA_DIR}/manipulation/models/franka_description/meshes \
    ${WHEEL_DATA_DIR}/manipulation/models/tri-homecart/*.obj \

Oops! Typo here tri-homecart vs tri_homecart. We've been installing the homecart meshes in the wheels all of these months! I guess they squeaked by within the PyPI hard cap.

I'll clean it up as part of the #15774 epic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: planning and control Optimization-based planning and control, and search- and sampling-based planning release notes: feature This pull request contains a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants