diff --git a/bindings/pydrake/manipulation/BUILD.bazel b/bindings/pydrake/manipulation/BUILD.bazel index 1a3a155b59c3..bee90e94fb93 100644 --- a/bindings/pydrake/manipulation/BUILD.bazel +++ b/bindings/pydrake/manipulation/BUILD.bazel @@ -38,6 +38,7 @@ drake_pybind_library( package_info = PACKAGE_INFO, py_deps = [ "//bindings/pydrake/systems:framework_py", + "//bindings/pydrake/systems:primitives_py", ], py_srcs = [ "_manipulation_extra.py", diff --git a/bindings/pydrake/manipulation/manipulation_py.cc b/bindings/pydrake/manipulation/manipulation_py.cc index 096098a80c85..dbb1b8c1d02a 100644 --- a/bindings/pydrake/manipulation/manipulation_py.cc +++ b/bindings/pydrake/manipulation/manipulation_py.cc @@ -7,6 +7,7 @@ PYBIND11_MODULE(manipulation, m) { PYDRAKE_PREVENT_PYTHON3_MODULE_REIMPORT(m); py::module::import("pydrake.systems.framework"); + py::module::import("pydrake.systems.primitives"); // The order of these calls matters. Some modules rely on prior definitions. internal::DefineManipulationKukaIiwa(m); diff --git a/bindings/pydrake/multibody/BUILD.bazel b/bindings/pydrake/multibody/BUILD.bazel index 57675312309b..64bde89651e7 100644 --- a/bindings/pydrake/multibody/BUILD.bazel +++ b/bindings/pydrake/multibody/BUILD.bazel @@ -161,6 +161,7 @@ drake_pybind_library( package_info = PACKAGE_INFO, py_deps = [ ":module_py", + ":tree_py", ], ) @@ -198,6 +199,7 @@ drake_pybind_library( py_deps = [ ":module_py", ":plant_py", + "//bindings/pydrake/planning", "//bindings/pydrake/solvers", ], ) @@ -217,6 +219,7 @@ drake_pybind_library( ":module_py", ":plant_py", "//bindings/pydrake/solvers", + "//bindings/pydrake:trajectories_py", ], ) diff --git a/bindings/pydrake/multibody/inverse_kinematics_py.cc b/bindings/pydrake/multibody/inverse_kinematics_py.cc index bb6b543cdbf1..ed8f9ad3c532 100644 --- a/bindings/pydrake/multibody/inverse_kinematics_py.cc +++ b/bindings/pydrake/multibody/inverse_kinematics_py.cc @@ -60,6 +60,7 @@ PYBIND11_MODULE(inverse_kinematics, m) { py::module::import("pydrake.math"); py::module::import("pydrake.multibody.plant"); + py::module::import("pydrake.planning"); py::module::import("pydrake.solvers"); { diff --git a/bindings/pydrake/multibody/optimization_py.cc b/bindings/pydrake/multibody/optimization_py.cc index 48112e8fc13e..6d32cb412cb4 100644 --- a/bindings/pydrake/multibody/optimization_py.cc +++ b/bindings/pydrake/multibody/optimization_py.cc @@ -24,6 +24,7 @@ PYBIND11_MODULE(optimization, m) { py::module::import("pydrake.math"); py::module::import("pydrake.multibody.plant"); py::module::import("pydrake.solvers"); + py::module::import("pydrake.trajectories"); { using Class = CalcGridPointsOptions; diff --git a/bindings/pydrake/multibody/parsing_py.cc b/bindings/pydrake/multibody/parsing_py.cc index 832590d17405..4496c67f6282 100644 --- a/bindings/pydrake/multibody/parsing_py.cc +++ b/bindings/pydrake/multibody/parsing_py.cc @@ -24,6 +24,7 @@ PYBIND11_MODULE(parsing, m) { constexpr auto& doc = pydrake_doc.drake.multibody; py::module::import("pydrake.common.schema"); + py::module::import("pydrake.multibody.tree"); // CollisionFilterGroups { diff --git a/bindings/pydrake/multibody/tree_py.cc b/bindings/pydrake/multibody/tree_py.cc index 4297e30cb060..21dc0384218c 100644 --- a/bindings/pydrake/multibody/tree_py.cc +++ b/bindings/pydrake/multibody/tree_py.cc @@ -1167,6 +1167,7 @@ PYBIND11_MODULE(tree, m) { py::module::import("pydrake.common.eigen_geometry"); py::module::import("pydrake.multibody.math"); + py::module::import("pydrake.systems.framework"); internal::DefineTreeInertia(m); DoScalarIndependentDefinitions(m); diff --git a/bindings/pydrake/systems/BUILD.bazel b/bindings/pydrake/systems/BUILD.bazel index 51eca6782b4a..a2b859cc9a99 100644 --- a/bindings/pydrake/systems/BUILD.bazel +++ b/bindings/pydrake/systems/BUILD.bazel @@ -88,6 +88,7 @@ drake_pybind_library( py_deps = [ ":framework_py", ":module_py", + "//bindings/pydrake:trajectories_py", ], ) @@ -107,6 +108,7 @@ drake_pybind_library( py_deps = [ ":framework_py", ":module_py", + "//bindings/pydrake:trajectories_py", "//bindings/pydrake/solvers", ], ) @@ -140,6 +142,7 @@ drake_pybind_library( py_deps = [ ":framework_py", ":module_py", + ":primitives_py", ], ) diff --git a/bindings/pydrake/systems/analysis_py.cc b/bindings/pydrake/systems/analysis_py.cc index 3540e0582f3a..169051b95fcc 100644 --- a/bindings/pydrake/systems/analysis_py.cc +++ b/bindings/pydrake/systems/analysis_py.cc @@ -44,6 +44,7 @@ PYBIND11_MODULE(analysis, m) { py::module::import("pydrake.systems.framework"); py::module::import("pydrake.solvers"); + py::module::import("pydrake.trajectories"); { using Class = SimulatorConfig; diff --git a/bindings/pydrake/systems/estimators_py.cc b/bindings/pydrake/systems/estimators_py.cc index ba63dd89bdef..4a16f1ffdb22 100644 --- a/bindings/pydrake/systems/estimators_py.cc +++ b/bindings/pydrake/systems/estimators_py.cc @@ -16,6 +16,7 @@ PYBIND11_MODULE(estimators, m) { using drake::systems::System; py::module::import("pydrake.systems.framework"); + py::module::import("pydrake.systems.primitives"); { using Class = LuenbergerObserver; diff --git a/bindings/pydrake/systems/primitives_py.cc b/bindings/pydrake/systems/primitives_py.cc index 63f4daada29a..0f7a3fd0a612 100644 --- a/bindings/pydrake/systems/primitives_py.cc +++ b/bindings/pydrake/systems/primitives_py.cc @@ -52,6 +52,7 @@ PYBIND11_MODULE(primitives, m) { constexpr auto& doc = pydrake_doc.drake.systems; py::module::import("pydrake.systems.framework"); + py::module::import("pydrake.trajectories"); py::enum_( m, "PerceptronActivationType", doc.PerceptronActivationType.doc)