-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10505 from EricCousineau-TRI/issue/10207_rbt_attic
py multibody: Separate out attic modules
- Loading branch information
Showing
14 changed files
with
225 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
from .multibody.all import * | ||
from .solvers.all import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,168 @@ | ||
# -*- python -*- | ||
|
||
load("@drake//tools/install:install.bzl", "install") | ||
load("//tools/lint:lint.bzl", "add_lint_tests") | ||
load( | ||
"@drake//tools/skylark:pybind.bzl", | ||
"drake_pybind_library", | ||
"get_drake_py_installs", | ||
"get_pybind_package_info", | ||
) | ||
load( | ||
"@drake//tools/skylark:drake_py.bzl", | ||
"drake_py_library", | ||
) | ||
|
||
package(default_visibility = [ | ||
"//bindings/pydrake:__subpackages__", | ||
]) | ||
|
||
# This determines how `PYTHONPATH` is configured, and how to install the | ||
# bindings. | ||
PACKAGE_INFO = get_pybind_package_info("//bindings") | ||
|
||
drake_py_library( | ||
name = "module_py", | ||
srcs = ["__init__.py"], | ||
imports = PACKAGE_INFO.py_imports, | ||
deps = [ | ||
"//bindings/pydrake:module_py", | ||
], | ||
) | ||
|
||
drake_py_library( | ||
name = "parsers_py", | ||
srcs = ["parsers.py"], | ||
deps = [ | ||
# N.B. This is a package dependency cycle, but hopefully short-lived. | ||
"//bindings/pydrake/multibody:parsing_py", | ||
], | ||
) | ||
|
||
drake_pybind_library( | ||
name = "rigid_body_plant_py", | ||
cc_deps = [ | ||
"//bindings/pydrake:documentation_pybind", | ||
"//bindings/pydrake/systems:systems_pybind", | ||
"//lcmtypes:viewer", | ||
], | ||
cc_srcs = ["rigid_body_plant_py.cc"], | ||
package_info = PACKAGE_INFO, | ||
py_deps = [ | ||
":module_py", | ||
":rigid_body_tree_py", | ||
"//bindings/pydrake:lcm_py", | ||
"//bindings/pydrake/systems:framework_py", | ||
], | ||
) | ||
|
||
drake_pybind_library( | ||
name = "rigid_body_tree_py", | ||
cc_deps = [ | ||
"//bindings/pydrake:autodiff_types_pybind", | ||
"//bindings/pydrake:documentation_pybind", | ||
"//bindings/pydrake/common:type_pack", | ||
], | ||
cc_srcs = ["rigid_body_tree_py.cc"], | ||
package_info = PACKAGE_INFO, | ||
py_deps = [ | ||
":collision_py", | ||
":joints_py", | ||
":module_py", | ||
":parsers_py", | ||
":rigid_body_py", | ||
":shapes_py", | ||
"//bindings/pydrake:autodiffutils_py", | ||
"//bindings/pydrake/common:eigen_geometry_py", | ||
], | ||
) | ||
|
||
drake_pybind_library( | ||
name = "collision_py", | ||
cc_deps = ["//bindings/pydrake:documentation_pybind"], | ||
cc_srcs = ["collision_py.cc"], | ||
package_info = PACKAGE_INFO, | ||
py_deps = [ | ||
":module_py", | ||
":rigid_body_py", | ||
":shapes_py", | ||
], | ||
) | ||
|
||
drake_pybind_library( | ||
name = "joints_py", | ||
cc_deps = [ | ||
"//bindings/pydrake:documentation_pybind", | ||
"//bindings/pydrake/common:eigen_geometry_pybind", | ||
], | ||
cc_srcs = ["joints_py.cc"], | ||
package_info = PACKAGE_INFO, | ||
py_deps = [ | ||
":module_py", | ||
"//bindings/pydrake/common:eigen_geometry_py", | ||
], | ||
) | ||
|
||
drake_pybind_library( | ||
name = "rigid_body_py", | ||
cc_deps = ["//bindings/pydrake:documentation_pybind"], | ||
cc_srcs = ["rigid_body_py.cc"], | ||
package_info = PACKAGE_INFO, | ||
py_deps = [ | ||
":module_py", | ||
":shapes_py", | ||
], | ||
) | ||
|
||
drake_pybind_library( | ||
name = "shapes_py", | ||
cc_deps = ["//bindings/pydrake:documentation_pybind"], | ||
cc_srcs = ["shapes_py.cc"], | ||
package_info = PACKAGE_INFO, | ||
py_deps = [ | ||
":module_py", | ||
"//bindings/pydrake/common:eigen_geometry_py", | ||
], | ||
) | ||
|
||
PY_LIBRARIES_WITH_INSTALL = [ | ||
":collision_py", | ||
":joints_py", | ||
":rigid_body_py", | ||
":rigid_body_plant_py", | ||
":rigid_body_tree_py", | ||
":shapes_py", | ||
] | ||
|
||
PY_LIBRARIES = [ | ||
":module_py", | ||
":parsers_py", | ||
] | ||
|
||
# Symbol roll-up (for user ease). | ||
drake_py_library( | ||
name = "all_py", | ||
srcs = ["all.py"], | ||
deps = PY_LIBRARIES_WITH_INSTALL + PY_LIBRARIES, | ||
) | ||
|
||
# Package roll-up (for Bazel dependencies). | ||
drake_py_library( | ||
name = "multibody", | ||
deps = [":all_py"], | ||
) | ||
|
||
install( | ||
name = "install", | ||
targets = PY_LIBRARIES + [":all_py"], | ||
py_dest = PACKAGE_INFO.py_dest, | ||
deps = get_drake_py_installs(PY_LIBRARIES_WITH_INSTALL), | ||
) | ||
|
||
# NOTE: Unittests on `attic` should not move until the forwarding modules | ||
# outside of the attic are deprecated! | ||
|
||
add_lint_tests( | ||
cpplint_data = ["//bindings/pydrake:.clang-format"], | ||
enable_clang_format_lint = True, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Blank Python module. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from .collision import * | ||
from .joints import * | ||
from .parsers import * | ||
from .rigid_body_plant import * | ||
from .rigid_body_tree import * | ||
from .rigid_body import * | ||
from .shapes import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.