forked from RobotLocomotion/drake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.bazel
49 lines (39 loc) · 1.04 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# -*- python -*-
load(
"@drake//tools/skylark:drake_cc.bzl",
"drake_cc_googletest",
)
load("//tools/lint:lint.bzl", "add_lint_tests")
load("//tools/install:install_data.bzl", "install_data")
package(default_visibility = ["//visibility:public"])
# Convert the *.stl meshes to *.obj meshes, because many geometry and
# visualization tools in Drake only support *.obj meshes.
_STLS = glob(
["models/**/*.stl"],
allow_empty = False,
)
_OBJS = [x[:-3] + "obj" for x in _STLS]
[
genrule(
name = obj + "_genrule",
srcs = [stl],
outs = [obj],
cmd = "$(location //manipulation/util:stl2obj) --input $< --output $@",
tools = ["//manipulation/util:stl2obj"],
visibility = ["//visibility:private"],
)
for stl, obj in zip(_STLS, _OBJS)
]
# === test/ ===
drake_cc_googletest(
name = "load_pr2_simplified_test",
data = [":models"],
deps = [
"//common:find_resource",
"//multibody/parsing",
],
)
install_data(
extra_prod_models = _OBJS,
)
add_lint_tests()