diff --git a/BUILD.bazel b/BUILD.bazel index 702fc2a483a0..0c1aee61d1f4 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -62,11 +62,11 @@ filegroup( "//manipulation/models/iiwa_description:models", "//manipulation/models/jaco_description:models", "//manipulation/models/realsense2_description:models", - "//manipulation/models/tri_homecart:models", "//manipulation/models/ur3e:models", "//manipulation/models/wsg_50_description:models", "//manipulation/models/ycb:models", "//multibody/benchmarks/acrobot:models", + "@drake_models", ], visibility = ["//:__subpackages__"], ) diff --git a/manipulation/models/BUILD.bazel b/manipulation/models/BUILD.bazel index a738ee3ab31e..68efb9c4c598 100644 --- a/manipulation/models/BUILD.bazel +++ b/manipulation/models/BUILD.bazel @@ -10,7 +10,6 @@ install( "//manipulation/models/iiwa_description:install_data", "//manipulation/models/jaco_description:install_data", "//manipulation/models/realsense2_description:install_data", - "//manipulation/models/tri_homecart:install_data", "//manipulation/models/ur3e:install_data", "//manipulation/models/wsg_50_description:install_data", "//manipulation/models/ycb:install_data", diff --git a/manipulation/models/tri_homecart/BUILD.bazel b/manipulation/models/tri_homecart/BUILD.bazel deleted file mode 100644 index ba0bd5b615d1..000000000000 --- a/manipulation/models/tri_homecart/BUILD.bazel +++ /dev/null @@ -1,76 +0,0 @@ -load( - "//tools/skylark:drake_cc.bzl", - "drake_cc_googletest", -) -load("//tools/skylark:drake_data.bzl", "models_filegroup") -load("//tools/install:install_data.bzl", "install_data") -load("//tools/lint:lint.bzl", "add_lint_tests") -load("//tools/workspace/ros_xacro_internal:defs.bzl", "xacro_file") - -package(default_visibility = ["//visibility:public"]) - -xacro_file( - name = "homecart_bimanual.urdf", - src = "homecart_bimanual.urdf.xacro", -) - -xacro_file( - name = "homecart_cutting_board.sdf", - src = "homecart_cutting_board.sdf.xacro", -) - -models_filegroup( - name = "glob_models", - extra_srcs = [ - "homecart_bimanual.urdf", - "homecart_cutting_board.sdf", - "homecart_grippers.dmd.yaml", - "homecart_no_grippers.dmd.yaml", - "homecart.dmd.yaml", - ], - visibility = ["//visibility:private"], -) - -install_data( - name = "install_data", - data = [":glob_models"], -) - -filegroup( - name = "models", - srcs = [ - ":glob_models", - "@drake_models//:tri_homecart/homecart_arm_mount_cantilever.mtl", - "@drake_models//:tri_homecart/homecart_arm_mount_cantilever.obj", - "@drake_models//:tri_homecart/homecart_arm_mount_stack.mtl", - "@drake_models//:tri_homecart/homecart_arm_mount_stack.obj", - "@drake_models//:tri_homecart/homecart_basecart.mtl", - "@drake_models//:tri_homecart/homecart_basecart.obj", - "@drake_models//:tri_homecart/homecart_basecart_wood_color.png", - "@drake_models//:tri_homecart/homecart_baseplate.mtl", - "@drake_models//:tri_homecart/homecart_baseplate.obj", - "@drake_models//:tri_homecart/homecart_bimanual_upper_structure.mtl", - "@drake_models//:tri_homecart/homecart_bimanual_upper_structure.obj", - "@drake_models//:tri_homecart/homecart_cutting_board.mtl", - "@drake_models//:tri_homecart/homecart_cutting_board.obj", - "@drake_models//:tri_homecart/homecart_cutting_board_color.png", - ], -) - -# === test/ === - -drake_cc_googletest( - name = "parse_homecart_test", - srcs = ["test/parse_homecart_test.cc"], - data = [ - ":models", - "//manipulation/models/ur3e:models", - "//manipulation/models/wsg_50_description:models", - ], - deps = [ - "//common:find_resource", - "//multibody/parsing", - ], -) - -add_lint_tests() diff --git a/manipulation/models/tri_homecart/README.md b/manipulation/models/tri_homecart/README.md deleted file mode 100644 index 726699bd8862..000000000000 --- a/manipulation/models/tri_homecart/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# TRI HomeCart - -The HomeCart is a bimanual manipulation station developed at the Toyota -Research Institute (TRI). The model files contained here are all developed by TRI -and distributed under Drake's license. They represent a slightly simplified -version of the model files used internally at TRI (most notably they are using -a simplified version of the grippers). diff --git a/manipulation/models/tri_homecart/homecart.dmd.yaml b/manipulation/models/tri_homecart/homecart.dmd.yaml deleted file mode 100644 index b42291e19bf4..000000000000 --- a/manipulation/models/tri_homecart/homecart.dmd.yaml +++ /dev/null @@ -1,5 +0,0 @@ -directives: -- add_directives: - file: package://drake/manipulation/models/tri_homecart/homecart_no_grippers.dmd.yaml -- add_directives: - file: package://drake/manipulation/models/tri_homecart/homecart_grippers.dmd.yaml diff --git a/manipulation/models/tri_homecart/homecart_bimanual.urdf.xacro b/manipulation/models/tri_homecart/homecart_bimanual.urdf.xacro deleted file mode 100644 index a4f5bd9d38d8..000000000000 --- a/manipulation/models/tri_homecart/homecart_bimanual.urdf.xacro +++ /dev/null @@ -1,422 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/manipulation/models/tri_homecart/homecart_collision_walls.sdf b/manipulation/models/tri_homecart/homecart_collision_walls.sdf deleted file mode 100644 index e85449861b61..000000000000 --- a/manipulation/models/tri_homecart/homecart_collision_walls.sdf +++ /dev/null @@ -1,105 +0,0 @@ - - - - - 0 0 0 0 0 0 - - - 0 0 0 0 0 0 - 0.1 - - 0.00004166666 - 0 - 0 - 0.00004166666 - 0 - 0.00004166666 - - - - - 1.0 0 0 0 0 0 - - - 0.5 2.0 2.0 - - - - 0 0 0 0 - - - - - 1.0 0 0 0 0 0 - - - 0.5 2.0 2.0 - - - - - - -1.0 0 0 0 0 0 - - - 0.5 2.0 2.0 - - - - 0 0 0 0 - - - - - -1.0 0 0 0 0 0 - - - 0.5 2.0 2.0 - - - - - - 0 1.0 0 0 0 0 - - - 2.0 0.5 2.0 - - - - 0 0 0 0 - - - - - 0 1.0 0 0 0 0 - - - 2.0 0.5 2.0 - - - - - - 0 -1.0 0 0 0 0 - - - 2.0 0.5 2.0 - - - - 0 0 0 0 - - - - - 0 -1.0 0 0 0 0 - - - 2.0 0.5 2.0 - - - - - - diff --git a/manipulation/models/tri_homecart/homecart_cutting_board.sdf.xacro b/manipulation/models/tri_homecart/homecart_cutting_board.sdf.xacro deleted file mode 100644 index a9c185cc1a80..000000000000 --- a/manipulation/models/tri_homecart/homecart_cutting_board.sdf.xacro +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - 0 0 0 0 0 0 - 1.0 - - 100 - 0 - 0 - 100 - 0 - 100 - - - - 0 0 0 0 0 0 - - - package://drake_models/tri_homecart/homecart_cutting_board.obj - 1.0 1.0 1.0 - - - - - - 0 0 ${-homecart_cutting_board_height/2.0} 0 0 0 - - - - ${homecart_cutting_board_length} - ${homecart_cutting_board_width} - ${homecart_cutting_board_height} - - - - - 0.3 - 0.3 - 20.0e3 - 200 - - - - - 0 0 ${-homecart_cutting_board_height/2.0} 0 0 0 - - - - ${homecart_cutting_board_length} - ${homecart_cutting_board_width} - ${homecart_cutting_board_height - 0.001} - - - - - 0.3 - 0.3 - 200 - - - - - - diff --git a/manipulation/models/tri_homecart/homecart_grippers.dmd.yaml b/manipulation/models/tri_homecart/homecart_grippers.dmd.yaml deleted file mode 100644 index ee7fa6708494..000000000000 --- a/manipulation/models/tri_homecart/homecart_grippers.dmd.yaml +++ /dev/null @@ -1,41 +0,0 @@ -directives: -# Left Gripper -- add_frame: - name: gripper_left_origin - X_PF: - base_frame: ur3_left::ur_ee_link - translation: [0.06, 0, 0] - rotation: !Rpy { deg: [0, 0, -90] } -- add_model: - name: gripper_left - file: package://drake/manipulation/models/wsg_50_description/sdf/schunk_wsg_50_with_tip.sdf -- add_weld: - parent: gripper_left_origin - child: gripper_left::body -# Right Gripper -- add_frame: - name: gripper_right_origin - X_PF: - base_frame: ur3_right::ur_ee_link - translation: [0.06, 0, 0] - rotation: !Rpy { deg: [0, 0, -90] } -- add_model: - name: gripper_right - file: package://drake/manipulation/models/wsg_50_description/sdf/schunk_wsg_50_with_tip.sdf -- add_weld: - parent: gripper_right_origin - child: gripper_right::body - -# Grasp frames -- add_frame: - name: gripper_left::grasp_frame - X_PF: - base_frame: gripper_left::body_frame - translation: [0.0, 0.11, 0.0] - rotation: !Rpy { deg: [0, 0, 0] } -- add_frame: - name: gripper_right::grasp_frame - X_PF: - base_frame: gripper_right::body_frame - translation: [0.0, 0.11, 0.0] - rotation: !Rpy { deg: [0, 0, 0] } diff --git a/manipulation/models/tri_homecart/homecart_no_grippers.dmd.yaml b/manipulation/models/tri_homecart/homecart_no_grippers.dmd.yaml deleted file mode 100644 index 41cae86904de..000000000000 --- a/manipulation/models/tri_homecart/homecart_no_grippers.dmd.yaml +++ /dev/null @@ -1,119 +0,0 @@ -directives: -- add_frame: - name: homecart_on_world - X_PF: - base_frame: world - translation: [0, 0, 0] - rotation: !Rpy { deg: [0, 0, 0] } - -# Homecart -- add_model: - name: homecart_bimanual - file: package://drake/manipulation/models/tri_homecart/homecart_bimanual.urdf -- add_weld: - parent: homecart_on_world - child: homecart_bimanual::homecart_base_link - -# Homecart Collision Walls -- add_frame: - name: homecart_collision_walls_on_world - X_PF: - base_frame: world - translation: [0.25, 0, 0] - rotation: !Rpy { deg: [0, 0, -90] } -- add_model: - name: homecart_collision_walls - file: package://drake/manipulation/models/tri_homecart/homecart_collision_walls.sdf -- add_weld: - parent: homecart_collision_walls_on_world - child: homecart_collision_walls - -# Left Robot -- add_frame: - name: ur3_left_origin - X_PF: - base_frame: homecart_bimanual::left_arm_base_link - translation: [0, 0, 0] - rotation: !Rpy { deg: [0, 0, 270] } -- add_model: - name: ur3_left - file: package://drake/manipulation/models/ur3e/ur3e_cylinders_collision.urdf -- add_weld: - parent: ur3_left_origin - child: ur3_left::ur_base_link - -# Right Robot -- add_frame: - name: ur3_right_origin - X_PF: - base_frame: homecart_bimanual::right_arm_base_link - translation: [0, 0, 0] - rotation: !Rpy { deg: [0, 0, 270] } -- add_model: - name: ur3_right - file: package://drake/manipulation/models/ur3e/ur3e_cylinders_collision.urdf -- add_weld: - parent: ur3_right_origin - child: ur3_right::ur_base_link - -# Cutting Board -- add_frame: - name: homecart_cutting_board_origin - X_PF: - base_frame: homecart_bimanual::homecart_baseplate_link - translation: [0, 0, 0.0254] - rotation: !Rpy { deg: [0, 0, 0] } -- add_model: - name: homecart_cutting_board - file: package://drake/manipulation/models/tri_homecart/homecart_cutting_board.sdf -- add_weld: - parent: homecart_cutting_board_origin - child: homecart_cutting_board::homecart_cutting_board_link - -# Central cutting board frame -- add_frame: - name: cutting_board_center - X_PF: - base_frame: homecart_cutting_board::homecart_cutting_board_link - translation: [0, 0, 0] - rotation: !Rpy { deg: [0, 0, 0] } - -# Scene camera frames -- add_frame: - name: left_scene_camera - X_PF: - base_frame: homecart_on_world - translation: [0.5, 0.4, 0.97] - rotation: !Rpy { deg: [-145, 0, 180] } -- add_frame: - name: right_scene_camera - X_PF: - base_frame: homecart_on_world - translation: [0.5, -0.4, 0.97] - rotation: !Rpy { deg: [-145, 0, 0] } -- add_frame: - name: center_scene_camera - X_PF: - base_frame: homecart_on_world - translation: [-0.02, 0.0, 0.97] - rotation: !Rpy { deg: [-145, 0, -90] } - -# Helpful frames for areas of good manipulability -- add_frame: - name: assembly_area - X_PF: - base_frame: homecart_on_world - translation: [0.35, 0.0, 0.0254] - rotation: !Rpy { deg: [0, 0, 0] } -- add_frame: - name: left_pick_area - X_PF: - base_frame: homecart_on_world - translation: [0.35, 0.27, 0.0254] - rotation: !Rpy { deg: [0, 0, 0] } -- add_frame: - name: right_pick_area - X_PF: - base_frame: homecart_on_world - translation: [0.35, -0.27, 0.0254] - rotation: !Rpy { deg: [0, 0, 0] } diff --git a/manipulation/models/tri_homecart/test/parse_homecart_test.cc b/manipulation/models/tri_homecart/test/parse_homecart_test.cc deleted file mode 100644 index d23452f24f6a..000000000000 --- a/manipulation/models/tri_homecart/test/parse_homecart_test.cc +++ /dev/null @@ -1,32 +0,0 @@ -#include - -#include - -#include "drake/common/find_resource.h" -#include "drake/multibody/parsing/parser.h" -#include "drake/multibody/parsing/process_model_directives.h" -#include "drake/multibody/plant/multibody_plant.h" - -namespace drake { -namespace manipulation { -namespace { - -GTEST_TEST(ParseHomecartTest, BasicTest) { - multibody::MultibodyPlant plant(0.0); - geometry::SceneGraph scene_graph; - plant.RegisterAsSourceForSceneGraph(&scene_graph); - multibody::Parser parser(&plant); - multibody::parsing::ModelDirectives directives = - multibody::parsing::LoadModelDirectives(FindResourceOrThrow( - "drake/manipulation/models/tri_homecart/homecart.dmd.yaml")); - multibody::parsing::ProcessModelDirectives(directives, &plant, nullptr, - &parser); - plant.Finalize(); - - // 6 positions per ur3e and 2 per wsg. - EXPECT_EQ(plant.num_positions(), 6 + 2 + 6 + 2); -} - -} // namespace -} // namespace manipulation -} // namespace drake diff --git a/multibody/benchmarking/BUILD.bazel b/multibody/benchmarking/BUILD.bazel index b389b3513f4e..cfda04089f02 100644 --- a/multibody/benchmarking/BUILD.bazel +++ b/multibody/benchmarking/BUILD.bazel @@ -81,9 +81,7 @@ drake_cc_googlebench_binary( srcs = ["homecart_global_ik.cc"], add_test_rule = True, data = [ - "//manipulation/models/tri_homecart:models", - "//manipulation/models/ur3e:models", - "//manipulation/models/wsg_50_description:models", + "@drake_models", ], test_tags = gurobi_test_tags(), deps = [ diff --git a/multibody/benchmarking/homecart_global_ik.cc b/multibody/benchmarking/homecart_global_ik.cc index b2353727b941..767525f55d6a 100644 --- a/multibody/benchmarking/homecart_global_ik.cc +++ b/multibody/benchmarking/homecart_global_ik.cc @@ -33,9 +33,8 @@ BENCHMARK_F(HomecartGlobalIkBenchmark, PostureCost)(benchmark::State& state) { geometry::SceneGraph scene_graph; plant.RegisterAsSourceForSceneGraph(&scene_graph); multibody::Parser parser(&plant); - parser.AddModels( - FindResourceOrThrow("drake/manipulation/models/tri_homecart/" - "homecart_no_grippers.dmd.yaml")); + parser.AddModelsFromUrl( + "package://drake_models/tri_homecart/homecart_no_grippers.dmd.yaml"); plant.Finalize(); Eigen::VectorXd q0(plant.num_positions()); diff --git a/tools/workspace/drake_models/BUILD.bazel b/tools/workspace/drake_models/BUILD.bazel index 5618a72c03c0..c8e1ee905210 100644 --- a/tools/workspace/drake_models/BUILD.bazel +++ b/tools/workspace/drake_models/BUILD.bazel @@ -7,11 +7,20 @@ enumerate_filegroup( data = ["@drake_models"], ) +_MODEL_DATA = [ + "@drake_models", + # TODO(jwnimmer-tri) As we incrementally transition model files from + # `package://drake` to `package://drake_models` we have a problem that + # `package://drake_models` depends on `package://drake`. We should aim + # to drop these extra data dependencies after the transition completes. + "//manipulation/models/ur3e:models", + "//manipulation/models/wsg_50_description:models", +] + drake_py_unittest( name = "parse_test", - data = [ + data = _MODEL_DATA + [ ":inventory.txt", - "@drake_models", ], deps = [ "//bindings/pydrake", @@ -19,4 +28,12 @@ drake_py_unittest( ], ) +drake_py_unittest( + name = "tri_homecart_test", + data = _MODEL_DATA, + deps = [ + "//bindings/pydrake", + ], +) + add_lint_tests() diff --git a/tools/workspace/drake_models/repository.bzl b/tools/workspace/drake_models/repository.bzl index 9b056fdf720e..a99e6dcc4142 100644 --- a/tools/workspace/drake_models/repository.bzl +++ b/tools/workspace/drake_models/repository.bzl @@ -6,8 +6,8 @@ def drake_models_repository( github_archive( name = name, repository = "RobotLocomotion/models", - commit = "8cdc23d313c997d7f317de0c6b36014e2906f3c0", - sha256 = "f1b37fb0f82be4b221bac0497d62cc4505afd8ddf9f46062e97f5797b8d73baa", # noqa + commit = "92ed9246562caf6a77a4376b74b41eb777b319c8", + sha256 = "99211fece3f4aec8ad93a93e5d8e0b3e76edf6bdc776335d7a4aec95c7dca004", # noqa build_file = ":package.BUILD.bazel", mirrors = mirrors, ) diff --git a/tools/workspace/drake_models/test/parse_test.py b/tools/workspace/drake_models/test/parse_test.py index aedcfa894cfe..847220b8dc2a 100644 --- a/tools/workspace/drake_models/test/parse_test.py +++ b/tools/workspace/drake_models/test/parse_test.py @@ -69,6 +69,9 @@ def test_all_models(self): models_with_errors = [ # TODO(#19992) for tracking these errors. "package://drake_models/atlas/robotiq_tendons.urdf", + # This file is not designed to be loaded independently from its + # parent file `homecart.dmd.yaml`; it will always error out. + "package://drake_models/tri_homecart/homecart_grippers.dmd.yaml", ] self.assertFalse(set(models_with_errors) - set(all_models)) self.assertFalse(set(models_with_warnings) & set(models_with_errors)) diff --git a/tools/workspace/drake_models/test/tri_homecart_test.py b/tools/workspace/drake_models/test/tri_homecart_test.py new file mode 100644 index 000000000000..dec4e84327e9 --- /dev/null +++ b/tools/workspace/drake_models/test/tri_homecart_test.py @@ -0,0 +1,15 @@ +import unittest + +from pydrake.planning import RobotDiagramBuilder + + +class TestTriHomecart(unittest.TestCase): + + def test(self): + builder = RobotDiagramBuilder() + builder.parser().AddModels( + url="package://drake_models/tri_homecart/homecart.dmd.yaml") + diagram = builder.Build() + + # 6 positions per ur3e and 2 per wsg. + self.assertEqual(diagram.plant().num_positions(), 6 + 2 + 6 + 2)