Skip to content

Commit

Permalink
Add obj version of meshes
Browse files Browse the repository at this point in the history
  • Loading branch information
sammy-tri committed Apr 13, 2020
1 parent 21c8dc9 commit a902f72
Show file tree
Hide file tree
Showing 7 changed files with 93 additions and 35 deletions.
24 changes: 17 additions & 7 deletions manipulation/models/franka_description/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,27 @@ load(
)
load("//tools/install:install_data.bzl", "install_data")
load("//tools/lint:lint.bzl", "add_lint_tests")
load("@drake//tools/workspace:forward_files.bzl", "forward_files")
load("//tools/workspace/models:files.bzl", "franka_description_mesh_files")

# This package is public so that other packages can refer to
# individual files in model from their bazel rules.
package(
default_visibility = [":__subpackages__"],
default_visibility = ["//visibility:public"],
)

_FRANKA_DESCRIPTION_MESHES = forward_files(
srcs = ["@models//:" + x for x in franka_description_mesh_files()],
dest_prefix = "",
strip_prefix = "@models//:franka_description/",
visibility = ["//visibility:private"],
)

install_data(
extra_prod_models = _FRANKA_DESCRIPTION_MESHES + [
"LICENSE.TXT",
],
)
# === test/ ===

drake_cc_googletest(
Expand All @@ -24,10 +40,4 @@ drake_cc_googletest(
],
)

install_data(
extra_prod_models = [
"LICENSE.TXT",
],
)

add_lint_tests()
10 changes: 6 additions & 4 deletions manipulation/models/franka_description/urdf/hand.urdf
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
<robot name="hand">
<link name="panda_hand">
<visual>
<origin rpy="1.57079632679 0 0"/>
<geometry>
<mesh filename="package://franka_description/meshes/visual/hand.dae"/>
<mesh filename="package://franka_description/meshes/visual/hand.obj"/>
</geometry>
</visual>
<collision>
Expand Down Expand Up @@ -49,16 +50,17 @@
</link>
<link name="panda_leftfinger">
<visual>
<origin rpy="1.57079632679 0 0"/>
<geometry>
<mesh filename="package://franka_description/meshes/visual/finger.dae"/>
<mesh filename="package://franka_description/meshes/visual/finger.obj"/>
</geometry>
</visual>
</link>
<link name="panda_rightfinger">
<visual>
<origin rpy="0 0 3.14159265359" xyz="0 0 0"/>
<origin rpy="1.57079632679 0 3.14159265359" xyz="0 0 0"/>
<geometry>
<mesh filename="package://franka_description/meshes/visual/finger.dae"/>
<mesh filename="package://franka_description/meshes/visual/finger.obj"/>
</geometry>
</visual>
</link>
Expand Down
24 changes: 16 additions & 8 deletions manipulation/models/franka_description/urdf/panda_arm.urdf
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
<robot name="panda">
<link name="panda_link0">
<visual>
<origin rpy="1.57079632679 0 0"/>
<geometry>
<mesh filename="package://franka_description/meshes/visual/link0.dae"/>
<mesh filename="package://franka_description/meshes/visual/link0.obj"/>
</geometry>
</visual>
<collision>
Expand All @@ -31,8 +32,9 @@
</link>
<link name="panda_link1">
<visual>
<origin rpy="1.57079632679 0 0"/>
<geometry>
<mesh filename="package://franka_description/meshes/visual/link1.dae"/>
<mesh filename="package://franka_description/meshes/visual/link1.obj"/>
</geometry>
</visual>
<collision>
Expand Down Expand Up @@ -64,8 +66,9 @@
</joint>
<link name="panda_link2">
<visual>
<origin rpy="1.57079632679 0 0"/>
<geometry>
<mesh filename="package://franka_description/meshes/visual/link2.dae"/>
<mesh filename="package://franka_description/meshes/visual/link2.obj"/>
</geometry>
</visual>
<collision>
Expand Down Expand Up @@ -97,8 +100,9 @@
</joint>
<link name="panda_link3">
<visual>
<origin rpy="1.57079632679 0 0"/>
<geometry>
<mesh filename="package://franka_description/meshes/visual/link3.dae"/>
<mesh filename="package://franka_description/meshes/visual/link3.obj"/>
</geometry>
</visual>
<collision>
Expand Down Expand Up @@ -130,8 +134,9 @@
</joint>
<link name="panda_link4">
<visual>
<origin rpy="1.57079632679 0 0"/>
<geometry>
<mesh filename="package://franka_description/meshes/visual/link4.dae"/>
<mesh filename="package://franka_description/meshes/visual/link4.obj"/>
</geometry>
</visual>
<collision>
Expand Down Expand Up @@ -163,8 +168,9 @@
</joint>
<link name="panda_link5">
<visual>
<origin rpy="1.57079632679 0 0"/>
<geometry>
<mesh filename="package://franka_description/meshes/visual/link5.dae"/>
<mesh filename="package://franka_description/meshes/visual/link5.obj"/>
</geometry>
</visual>
<collision>
Expand Down Expand Up @@ -214,8 +220,9 @@
</joint>
<link name="panda_link6">
<visual>
<origin rpy="1.57079632679 0 0"/>
<geometry>
<mesh filename="package://franka_description/meshes/visual/link6.dae"/>
<mesh filename="package://franka_description/meshes/visual/link6.obj"/>
</geometry>
</visual>
<collision>
Expand Down Expand Up @@ -247,8 +254,9 @@
</joint>
<link name="panda_link7">
<visual>
<origin rpy="1.57079632679 0 0"/>
<geometry>
<mesh filename="package://franka_description/meshes/visual/link7.dae"/>
<mesh filename="package://franka_description/meshes/visual/link7.obj"/>
</geometry>
</visual>
<collision>
Expand Down
36 changes: 23 additions & 13 deletions manipulation/models/franka_description/urdf/panda_arm_hand.urdf
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
<robot name="panda">
<link name="panda_link0">
<visual>
<origin rpy="1.57079632679 0 0"/>
<geometry>
<mesh filename="package://franka_description/meshes/visual/link0.dae"/>
<mesh filename="package://franka_description/meshes/visual/link0.obj"/>
</geometry>
</visual>
<collision>
Expand All @@ -31,8 +32,9 @@
</link>
<link name="panda_link1">
<visual>
<origin rpy="1.57079632679 0 0"/>
<geometry>
<mesh filename="package://franka_description/meshes/visual/link1.dae"/>
<mesh filename="package://franka_description/meshes/visual/link1.obj"/>
</geometry>
</visual>
<collision>
Expand Down Expand Up @@ -64,8 +66,9 @@
</joint>
<link name="panda_link2">
<visual>
<origin rpy="1.57079632679 0 0"/>
<geometry>
<mesh filename="package://franka_description/meshes/visual/link2.dae"/>
<mesh filename="package://franka_description/meshes/visual/link2.obj"/>
</geometry>
</visual>
<collision>
Expand Down Expand Up @@ -97,8 +100,9 @@
</joint>
<link name="panda_link3">
<visual>
<origin rpy="1.57079632679 0 0"/>
<geometry>
<mesh filename="package://franka_description/meshes/visual/link3.dae"/>
<mesh filename="package://franka_description/meshes/visual/link3.obj"/>
</geometry>
</visual>
<collision>
Expand Down Expand Up @@ -130,8 +134,9 @@
</joint>
<link name="panda_link4">
<visual>
<geometry>
<mesh filename="package://franka_description/meshes/visual/link4.dae"/>
<origin rpy="1.57079632679 0 0"/>
<geometry>
<mesh filename="package://franka_description/meshes/visual/link4.obj"/>
</geometry>
</visual>
<collision>
Expand Down Expand Up @@ -163,8 +168,9 @@
</joint>
<link name="panda_link5">
<visual>
<origin rpy="1.57079632679 0 0"/>
<geometry>
<mesh filename="package://franka_description/meshes/visual/link5.dae"/>
<mesh filename="package://franka_description/meshes/visual/link5.obj"/>
</geometry>
</visual>
<collision>
Expand Down Expand Up @@ -214,8 +220,9 @@
</joint>
<link name="panda_link6">
<visual>
<origin rpy="1.57079632679 0 0"/>
<geometry>
<mesh filename="package://franka_description/meshes/visual/link6.dae"/>
<mesh filename="package://franka_description/meshes/visual/link6.obj"/>
</geometry>
</visual>
<collision>
Expand Down Expand Up @@ -247,8 +254,9 @@
</joint>
<link name="panda_link7">
<visual>
<origin rpy="1.57079632679 0 0"/>
<geometry>
<mesh filename="package://franka_description/meshes/visual/link7.dae"/>
<mesh filename="package://franka_description/meshes/visual/link7.obj"/>
</geometry>
</visual>
<collision>
Expand Down Expand Up @@ -380,8 +388,9 @@
</transmission>
<link name="panda_hand">
<visual>
<origin rpy="1.57079632679 0 0"/>
<geometry>
<mesh filename="package://franka_description/meshes/visual/hand.dae"/>
<mesh filename="package://franka_description/meshes/visual/hand.obj"/>
</geometry>
</visual>
<collision>
Expand Down Expand Up @@ -423,16 +432,17 @@
</link>
<link name="panda_leftfinger">
<visual>
<origin rpy="1.57079632679 0 0"/>
<geometry>
<mesh filename="package://franka_description/meshes/visual/finger.dae"/>
<mesh filename="package://franka_description/meshes/visual/finger.obj"/>
</geometry>
</visual>
</link>
<link name="panda_rightfinger">
<visual>
<origin rpy="0 0 3.14159265359" xyz="0 0 0"/>
<origin rpy="1.57079632679 0 3.14159265359" xyz="0 0 0"/>
<geometry>
<mesh filename="package://franka_description/meshes/visual/finger.dae"/>
<mesh filename="package://franka_description/meshes/visual/finger.obj"/>
</geometry>
</visual>
</link>
Expand Down
25 changes: 25 additions & 0 deletions tools/workspace/models/files.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,28 @@ def ycb_mesh_files():
"ycb/meshes/010_potted_meat_can_textured.png",
"ycb/meshes/LICENSE.txt",
]

def franka_description_mesh_files():
return [
"franka_description/LICENSE",
"franka_description/meshes/visual/finger.mtl",
"franka_description/meshes/visual/finger.obj",
"franka_description/meshes/visual/hand.mtl",
"franka_description/meshes/visual/hand.obj",
"franka_description/meshes/visual/link0.mtl",
"franka_description/meshes/visual/link0.obj",
"franka_description/meshes/visual/link1.mtl",
"franka_description/meshes/visual/link1.obj",
"franka_description/meshes/visual/link2.mtl",
"franka_description/meshes/visual/link2.obj",
"franka_description/meshes/visual/link3.mtl",
"franka_description/meshes/visual/link3.obj",
"franka_description/meshes/visual/link4.mtl",
"franka_description/meshes/visual/link4.obj",
"franka_description/meshes/visual/link5.mtl",
"franka_description/meshes/visual/link5.obj",
"franka_description/meshes/visual/link6.mtl",
"franka_description/meshes/visual/link6.obj",
"franka_description/meshes/visual/link7.mtl",
"franka_description/meshes/visual/link7.obj",
]
5 changes: 4 additions & 1 deletion tools/workspace/models/package.BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package(default_visibility = ["//visibility:private"])

exports_files(
srcs = glob(["ycb/meshes/*"]) or fail("No match"),
srcs = glob([
"ycb/meshes/**",
"franka_description/**",
]) or fail("No match"),
visibility = ["//visibility:public"],
)
4 changes: 2 additions & 2 deletions tools/workspace/models/repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ def models_repository(
github_archive(
name = name,
repository = "RobotLocomotion/models",
commit = "456a2df373c4a7afeaebcd269efb9f6e86ec5579",
sha256 = "708a1689a1911fdf0d79776cc238ac23618ce6b9eb8c4b49bd740909db82cff6", # noqa
commit = "3a4627b5207de76c2f86a13f522da87cac882730",
sha256 = "c6d02c310a47922ac5b4f9ddbe6a800e13cd8e37b534c73bc5e1b216261d36ba", # noqa
build_file = "@drake//tools/workspace/models:package.BUILD.bazel",
mirrors = mirrors,
)

0 comments on commit a902f72

Please sign in to comment.