Skip to content

Commit

Permalink
[examples] Move punyo files into drake_models (RobotLocomotion#21231)
Browse files Browse the repository at this point in the history
Ditch the "models" subdir (moving spatula up one level).

Remove unwanted install rules for these files.

Fix image naming for consistency.

[workspace] Upgrade drake_models to latest commit.
  • Loading branch information
jwnimmer-tri authored and RussTedrake committed Dec 15, 2024
1 parent b8ffc85 commit a75a5ce
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 262 deletions.
2 changes: 1 addition & 1 deletion bindings/pydrake/visualization/test/meldis_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ def test_hydroelastic_geometry(self):
lcm = dut._lcm
diagram = self._make_diagram(
resource="drake/examples/hydroelastic/"
"spatula_slip_control/models/spatula.sdf",
"spatula_slip_control/spatula.sdf",
visualizer_params=DrakeVisualizerParams(
show_hydroelastic=True,
role=Role.kProximity),
Expand Down
1 change: 0 additions & 1 deletion examples/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ drake_cc_binary(
# process and loaded into //tools:meldis's model database by default.
INSTALLED_MODEL_PACKAGES = [
"//examples/acrobot",
"//examples/hydroelastic/spatula_slip_control",
"//examples/kuka_iiwa_arm/models",
"//examples/multibody/cart_pole",
"//examples/pendulum",
Expand Down
13 changes: 1 addition & 12 deletions examples/hydroelastic/spatula_slip_control/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,28 +1,17 @@
load("//tools/skylark:drake_cc.bzl", "drake_cc_binary")
load("//tools/lint:lint.bzl", "add_lint_tests")
load("//tools/skylark:drake_data.bzl", "models_filegroup")
load("//tools/install:install_data.bzl", "install_data")

models_filegroup(
name = "glob_models",
glob_exclude = ["images/**/*"],
visibility = ["//visibility:private"],
)

install_data(
name = "install_data",
data = [":glob_models"],
visibility = ["//visibility:public"],
)

filegroup(
name = "models",
srcs = [
":glob_models",
"@drake_models//:wsg_50_hydro_bubble/meshes/bubble_finger.mtl",
"@drake_models//:wsg_50_hydro_bubble/meshes/bubble_finger.obj",
"@drake_models//:wsg_50_hydro_bubble/meshes/ellipsoid_bubble_geometry.mtl", # noqa
"@drake_models//:wsg_50_hydro_bubble/meshes/ellipsoid_bubble_geometry.obj", # noqa
],
visibility = ["//visibility:public"],
)
Expand All @@ -33,7 +22,7 @@ drake_cc_binary(
add_test_rule = True,
data = [
":models",
"//manipulation/models/wsg_50_description:models",
"@drake_models//:wsg_50_description",
],
test_rule_args = [
"--simulation_sec=0.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/hydroelastic/spatula_slip_control/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ collision (aka, proximity) geometries or both as shown
in the following picture.
Click on `illustration` or `proximity` as you wish.

![spatula_3](images/spatula3.jpg)
![spatula_3](images/spatula_3.jpg)

## Playback simulation

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ int DoMain() {
// Parse the gripper and spatula models.
multibody::Parser parser(&plant, &scene_graph);
parser.AddModelsFromUrl(
"package://drake/examples/hydroelastic/spatula_slip_control/models/"
"package://drake_models/wsg_50_description/sdf/"
"schunk_wsg_50_hydro_bubble.sdf");
parser.AddModelsFromUrl(
"package://drake/examples/hydroelastic/spatula_slip_control/models/"
"package://drake/examples/hydroelastic/spatula_slip_control/"
"spatula.sdf");
// Pose the gripper and weld it to the world.
const math::RigidTransform<double> X_WF0 = math::RigidTransform<double>(
Expand Down
4 changes: 2 additions & 2 deletions tools/workspace/drake_models/repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ def drake_models_repository(
github_archive(
name = name,
repository = "RobotLocomotion/models",
commit = "0d6d1a407c07ea21526013ec58e7a27c29cc5664",
sha256 = "e87e71a72e41b8a52c815ea4795dc762332a0424e77d29fb58e6c99cc8762a2f", # noqa
commit = "db9c78f538fb1cd519098a6d6422c3f179415eb6",
sha256 = "f3a630b78671f52412e2b5b54dc4ac26c855a88af8c49df0e2f9a9d36f20b570", # noqa
build_file = ":package.BUILD.bazel",
mirrors = mirrors,
)

0 comments on commit a75a5ce

Please sign in to comment.