forked from pz4kybsvg/Conception
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
149 lines
4.4 KiB
149 lines
4.4 KiB
load("//tools/skylark:py.bzl", "py_binary", "py_library")
|
|
load("//tools/lint:lint.bzl", "add_lint_tests")
|
|
load(
|
|
"@drake//tools/skylark:drake_runfiles_binary.bzl",
|
|
"drake_runfiles_binary",
|
|
)
|
|
load(
|
|
"@drake_visualizer//:defs.bzl",
|
|
_DRAKE_VISUALIZER_ENABLED = "ENABLED",
|
|
)
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
py_library(
|
|
name = "module_py",
|
|
srcs = ["__init__.py"],
|
|
visibility = [":__subpackages__"],
|
|
deps = ["//:module_py"],
|
|
)
|
|
|
|
_VISUALIZER_MAIN = "{}:drake_visualizer_{}.py".format(
|
|
"//tools/workspace/drake_visualizer",
|
|
"bazel" if _DRAKE_VISUALIZER_ENABLED else "disabled",
|
|
)
|
|
|
|
py_binary(
|
|
name = "drake_visualizer_py",
|
|
srcs = [_VISUALIZER_MAIN],
|
|
data = [
|
|
"//examples:models",
|
|
"@drake_visualizer",
|
|
] if _DRAKE_VISUALIZER_ENABLED else [],
|
|
main = _VISUALIZER_MAIN,
|
|
python_version = "PY3",
|
|
srcs_version = "PY3",
|
|
deps = [
|
|
"//lcmtypes:lcmtypes_drake_py",
|
|
"//tools/workspace/drake_visualizer:builtin_scripts_py",
|
|
"@drake_visualizer//:drake_visualizer_python_deps",
|
|
"@optitrack_driver//lcmtypes:py_optitrack_lcmtypes",
|
|
] if _DRAKE_VISUALIZER_ENABLED else [],
|
|
)
|
|
|
|
drake_runfiles_binary(
|
|
name = "drake_visualizer",
|
|
target = ":drake_visualizer_py",
|
|
)
|
|
|
|
alias(
|
|
name = "meldis",
|
|
actual = "//bindings/pydrake/visualization:meldis",
|
|
)
|
|
|
|
alias(
|
|
name = "model_visualizer",
|
|
actual = "//bindings/pydrake/visualization:model_visualizer",
|
|
)
|
|
|
|
alias(
|
|
name = "mesh_to_model",
|
|
actual = "//bindings/pydrake/multibody:mesh_to_model",
|
|
)
|
|
|
|
# === config_setting rules ===
|
|
|
|
# When this is set, a Drake build will promote some warnings to errors.
|
|
# See drake/tools/cc_toolchain/bazel.rc for details.
|
|
config_setting(
|
|
name = "drake_werror",
|
|
values = {"define": "DRAKE_WERROR=ON"},
|
|
)
|
|
|
|
config_setting(
|
|
name = "with_gurobi",
|
|
values = {"define": "WITH_GUROBI=ON"},
|
|
)
|
|
|
|
config_setting(
|
|
name = "with_mosek",
|
|
values = {"define": "WITH_MOSEK=ON"},
|
|
)
|
|
|
|
config_setting(
|
|
name = "with_snopt",
|
|
values = {"define": "WITH_SNOPT=ON"},
|
|
)
|
|
|
|
# CLP is an open-source solver, and is included in the Drake build by
|
|
# default. The CLP solver is irrelevant to some users of MathematicalProgram,
|
|
# so we provide a hidden switch to shut it off for developers who don't
|
|
# actually need it. This is not a supported configuration. Use at your own
|
|
# risk: --define=NO_CLP=ON
|
|
config_setting(
|
|
name = "no_clp",
|
|
values = {"define": "NO_CLP=ON"},
|
|
)
|
|
|
|
# CSDP is an open-source solver, and is included in the Drake build by default.
|
|
# The CSDP solver is irrelevant to some users of MathematicalProgram, so we
|
|
# provide a hidden switch to shut it off for developers who don't actually need
|
|
# it. This is not a supported configuration. Use at your own risk:
|
|
# --define=NO_CSDP=ON
|
|
config_setting(
|
|
name = "no_csdp",
|
|
values = {"define": "NO_CSDP=ON"},
|
|
)
|
|
|
|
# IPOPT is an open-source solver, and is included in the Drake build by
|
|
# default. The IPOPT solver is irrelevant to some users of MathematicalProgram,
|
|
# so we provide a hidden switch to shut it off for developers who don't
|
|
# actually need it. This is not a supported configuration. Use at your own
|
|
# risk: --define=NO_IPOPT=ON
|
|
config_setting(
|
|
name = "no_ipopt",
|
|
values = {"define": "NO_IPOPT=ON"},
|
|
)
|
|
|
|
# NLOPT is an open-source solver, and is included in the Drake build by
|
|
# default. The NLOPT solver is irrelevant to some users of MathematicalProgram,
|
|
# so we provide a hidden switch to shut it off for developers who don't
|
|
# actually need it. This is not a supported configuration. Use at your own
|
|
# risk: --define=NO_NLOPT=ON
|
|
config_setting(
|
|
name = "no_nlopt",
|
|
values = {"define": "NO_NLOPT=ON"},
|
|
)
|
|
|
|
# OSQP is an open-source solver, and is included in the Drake build by
|
|
# default. The OSQP solver is irrelevant to some users of MathematicalProgram,
|
|
# so we provide a hidden switch to shut it off for developers who don't
|
|
# actually need it. This is not a supported configuration. Use at your own
|
|
# risk: --define=NO_OSQP=ON
|
|
config_setting(
|
|
name = "no_osqp",
|
|
values = {"define": "NO_OSQP=ON"},
|
|
)
|
|
|
|
# SCS is an open-source solver, and is included in the Drake build by default.
|
|
# The SCS solver is irrelevant to some users of MathematicalProgram, so we
|
|
# provide a hidden switch to shut it off for developers who don't actually need
|
|
# it. This is not a supported configuration. Use at your own risk:
|
|
# --define=NO_SCS=ON
|
|
config_setting(
|
|
name = "no_scs",
|
|
values = {"define": "NO_SCS=ON"},
|
|
)
|
|
|
|
add_lint_tests()
|