From aafb395eb9e159cb03acab21711ee9602bdbe97c Mon Sep 17 00:00:00 2001 From: Duy Ta Date: Tue, 5 May 2026 15:37:23 -0400 Subject: [PATCH 1/9] Sync with new judo API --- pixi.lock | 24 ++++--- pyproject.toml | 2 +- .../{controller.py => controller_node.py} | 2 +- .../{simulation.py => simulation_node.py} | 4 +- ...visualization.py => visualization_node.py} | 2 +- sumo/configs/sumo_default.yaml | 6 +- sumo/controller/controller.py | 4 +- sumo/run_mpc/run_mpc.py | 14 ++-- sumo/tasks/__init__.py | 69 ++++++++++++------- tests/test_imports.py | 6 +- 10 files changed, 77 insertions(+), 56 deletions(-) rename sumo/app/dora/{controller.py => controller_node.py} (89%) rename sumo/app/dora/{simulation.py => simulation_node.py} (75%) rename sumo/app/dora/{visualization.py => visualization_node.py} (86%) diff --git a/pixi.lock b/pixi.lock index 9dfe0dc..f0239dd 100644 --- a/pixi.lock +++ b/pixi.lock @@ -5,6 +5,8 @@ environments: - url: https://conda.anaconda.org/conda-forge/ indexes: - https://pypi.org/simple + options: + pypi-prerelease-mode: if-necessary-or-explicit packages: linux-64: - conda: https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-20_gnu.conda @@ -158,7 +160,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/49/fa/391e437a34e55095173dca5f24070d89cbc233ff85bf1c29c93248c6588d/imageio-2.37.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/69/90/f63fb5873511e014207a475e2bb4e8b2e570d655b00ac19a9a0ca0a385ee/jsonschema-4.26.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/41/45/1a4ed80516f02155c51f51e8cedb3c1902296743db0bbc66608a0db2814f/jsonschema_specifications-2025.9.1-py3-none-any.whl - - pypi: git+https://github.com/bdaiinstitute/judo.git?rev=dta%2Ffix_for_sumo#9acaa753131e982a87e5912bcd638a1281e48ca4 + - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#b326d25ad56497928cfa1fb86a1bbb90bce13653 - pypi: https://files.pythonhosted.org/packages/d0/34/9e591954939276bb679b73773836c6684c22e56d05980e31d52a9a8deb18/lxml-6.0.2-cp313-cp313-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl - pypi: https://files.pythonhosted.org/packages/44/29/c89ab58a20965d630df347999b55306b146473cadd0fb8b7879c85ca7a54/manifold3d-3.4.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl - pypi: https://files.pythonhosted.org/packages/03/30/e54ececd0403a5495c340b693075abec92a6d17dc44283b6cb059534f7ed/mapbox_earcut-2.0.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl @@ -351,7 +353,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/49/fa/391e437a34e55095173dca5f24070d89cbc233ff85bf1c29c93248c6588d/imageio-2.37.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/69/90/f63fb5873511e014207a475e2bb4e8b2e570d655b00ac19a9a0ca0a385ee/jsonschema-4.26.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/41/45/1a4ed80516f02155c51f51e8cedb3c1902296743db0bbc66608a0db2814f/jsonschema_specifications-2025.9.1-py3-none-any.whl - - pypi: git+https://github.com/bdaiinstitute/judo.git?rev=dta%2Ffix_for_sumo#9acaa753131e982a87e5912bcd638a1281e48ca4 + - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#b326d25ad56497928cfa1fb86a1bbb90bce13653 - pypi: https://files.pythonhosted.org/packages/5d/f4/2a94a3d3dfd6c6b433501b8d470a1960a20ecce93245cf2db1706adf6c19/lxml-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl - pypi: https://files.pythonhosted.org/packages/68/d0/b1b5a1dc4db9e4ce844d025a72777a5a2251a33c5a84cff7e64ed9425373/manifold3d-3.4.0-cp313-cp313-macosx_10_14_x86_64.whl - pypi: https://files.pythonhosted.org/packages/8b/7c/c5dd5b255b9828ba5df729e62fdd470a322c938f07ef392ca03c0592bb3a/mapbox_earcut-2.0.0-cp313-cp313-macosx_10_13_x86_64.whl @@ -543,7 +545,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/49/fa/391e437a34e55095173dca5f24070d89cbc233ff85bf1c29c93248c6588d/imageio-2.37.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/69/90/f63fb5873511e014207a475e2bb4e8b2e570d655b00ac19a9a0ca0a385ee/jsonschema-4.26.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/41/45/1a4ed80516f02155c51f51e8cedb3c1902296743db0bbc66608a0db2814f/jsonschema_specifications-2025.9.1-py3-none-any.whl - - pypi: git+https://github.com/bdaiinstitute/judo.git?rev=dta%2Ffix_for_sumo#9acaa753131e982a87e5912bcd638a1281e48ca4 + - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#b326d25ad56497928cfa1fb86a1bbb90bce13653 - pypi: https://files.pythonhosted.org/packages/53/fd/4e8f0540608977aea078bf6d79f128e0e2c2bba8af1acf775c30baa70460/lxml-6.0.2-cp313-cp313-macosx_10_13_universal2.whl - pypi: https://files.pythonhosted.org/packages/f2/b3/47473d3f3bda127569e9615416ff24b1049b74cc08540572a9747e00bbe0/manifold3d-3.4.0-cp313-cp313-macosx_11_0_arm64.whl - pypi: https://files.pythonhosted.org/packages/1a/3f/03f23eac9831e7d0d8da3d6993695a9a3724659c94e9997f6b7aaccc199d/mapbox_earcut-2.0.0-cp313-cp313-macosx_11_0_arm64.whl @@ -583,6 +585,8 @@ environments: - url: https://conda.anaconda.org/conda-forge/ indexes: - https://pypi.org/simple + options: + pypi-prerelease-mode: if-necessary-or-explicit packages: linux-64: - conda: https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-20_gnu.conda @@ -736,7 +740,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/49/fa/391e437a34e55095173dca5f24070d89cbc233ff85bf1c29c93248c6588d/imageio-2.37.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/69/90/f63fb5873511e014207a475e2bb4e8b2e570d655b00ac19a9a0ca0a385ee/jsonschema-4.26.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/41/45/1a4ed80516f02155c51f51e8cedb3c1902296743db0bbc66608a0db2814f/jsonschema_specifications-2025.9.1-py3-none-any.whl - - pypi: git+https://github.com/bdaiinstitute/judo.git?rev=dta%2Ffix_for_sumo#9acaa753131e982a87e5912bcd638a1281e48ca4 + - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#b326d25ad56497928cfa1fb86a1bbb90bce13653 - pypi: https://files.pythonhosted.org/packages/d0/34/9e591954939276bb679b73773836c6684c22e56d05980e31d52a9a8deb18/lxml-6.0.2-cp313-cp313-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl - pypi: https://files.pythonhosted.org/packages/44/29/c89ab58a20965d630df347999b55306b146473cadd0fb8b7879c85ca7a54/manifold3d-3.4.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl - pypi: https://files.pythonhosted.org/packages/03/30/e54ececd0403a5495c340b693075abec92a6d17dc44283b6cb059534f7ed/mapbox_earcut-2.0.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl @@ -929,7 +933,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/49/fa/391e437a34e55095173dca5f24070d89cbc233ff85bf1c29c93248c6588d/imageio-2.37.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/69/90/f63fb5873511e014207a475e2bb4e8b2e570d655b00ac19a9a0ca0a385ee/jsonschema-4.26.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/41/45/1a4ed80516f02155c51f51e8cedb3c1902296743db0bbc66608a0db2814f/jsonschema_specifications-2025.9.1-py3-none-any.whl - - pypi: git+https://github.com/bdaiinstitute/judo.git?rev=dta%2Ffix_for_sumo#9acaa753131e982a87e5912bcd638a1281e48ca4 + - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#b326d25ad56497928cfa1fb86a1bbb90bce13653 - pypi: https://files.pythonhosted.org/packages/5d/f4/2a94a3d3dfd6c6b433501b8d470a1960a20ecce93245cf2db1706adf6c19/lxml-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl - pypi: https://files.pythonhosted.org/packages/68/d0/b1b5a1dc4db9e4ce844d025a72777a5a2251a33c5a84cff7e64ed9425373/manifold3d-3.4.0-cp313-cp313-macosx_10_14_x86_64.whl - pypi: https://files.pythonhosted.org/packages/8b/7c/c5dd5b255b9828ba5df729e62fdd470a322c938f07ef392ca03c0592bb3a/mapbox_earcut-2.0.0-cp313-cp313-macosx_10_13_x86_64.whl @@ -1121,7 +1125,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/49/fa/391e437a34e55095173dca5f24070d89cbc233ff85bf1c29c93248c6588d/imageio-2.37.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/69/90/f63fb5873511e014207a475e2bb4e8b2e570d655b00ac19a9a0ca0a385ee/jsonschema-4.26.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/41/45/1a4ed80516f02155c51f51e8cedb3c1902296743db0bbc66608a0db2814f/jsonschema_specifications-2025.9.1-py3-none-any.whl - - pypi: git+https://github.com/bdaiinstitute/judo.git?rev=dta%2Ffix_for_sumo#9acaa753131e982a87e5912bcd638a1281e48ca4 + - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#b326d25ad56497928cfa1fb86a1bbb90bce13653 - pypi: https://files.pythonhosted.org/packages/53/fd/4e8f0540608977aea078bf6d79f128e0e2c2bba8af1acf775c30baa70460/lxml-6.0.2-cp313-cp313-macosx_10_13_universal2.whl - pypi: https://files.pythonhosted.org/packages/f2/b3/47473d3f3bda127569e9615416ff24b1049b74cc08540572a9747e00bbe0/manifold3d-3.4.0-cp313-cp313-macosx_11_0_arm64.whl - pypi: https://files.pythonhosted.org/packages/1a/3f/03f23eac9831e7d0d8da3d6993695a9a3724659c94e9997f6b7aaccc199d/mapbox_earcut-2.0.0-cp313-cp313-macosx_11_0_arm64.whl @@ -2291,7 +2295,6 @@ packages: requires_dist: - ninja ; extra == 'dev' - pybind11 ; extra == 'dev' - editable: true - conda: https://conda.anaconda.org/conda-forge/linux-64/gcc-14.3.0-h0dff253_18.conda sha256: 9b34b57b06b485e33a40d430f71ac88c8f381673592507cf7161c50ff0832772 md5: 52d6457abc42e320787ada5f9033fa99 @@ -2828,7 +2831,7 @@ packages: requires_dist: - referencing>=0.31.0 requires_python: '>=3.9' -- pypi: git+https://github.com/bdaiinstitute/judo.git?rev=dta%2Ffix_for_sumo#9acaa753131e982a87e5912bcd638a1281e48ca4 +- pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#b326d25ad56497928cfa1fb86a1bbb90bce13653 name: judo-rai version: 0.0.7 requires_dist: @@ -5950,9 +5953,9 @@ packages: - pypi: ./ name: sumo version: 0.0.1 - sha256: 6e64d863aeaaf5de30159112a5dbb8576b2965de95fc9e2e1d5f20d31243c91f + sha256: 6bde2d7c6801519b8e31ea250aded554e33e63286652320915521cd81b7401d7 requires_dist: - - judo-rai @ git+https://github.com/bdaiinstitute/judo.git@dta/fix_for_sumo + - judo-rai @ git+https://github.com/rai-opensource/judo.git@dta/fix_for_sumo - numpy - mujoco>=3.5.0,<3.6.0 - h5py @@ -5961,7 +5964,6 @@ packages: - scipy - pytest ; extra == 'dev' - ruff ; extra == 'dev' - editable: true - pypi: https://files.pythonhosted.org/packages/3a/83/4f5b250220e1a5acd31345a5ec1c95a7769725d0d8135276f399f44062f8/svg_path-7.0-py2.py3-none-any.whl name: svg-path version: '7.0' diff --git a/pyproject.toml b/pyproject.toml index 496aafe..5339377 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ allow-direct-references = true name = "sumo" version = "0.0.1" dependencies = [ - "judo-rai @ git+https://github.com/bdaiinstitute/judo.git@dta/fix_for_sumo", + "judo-rai @ git+https://github.com/rai-opensource/judo.git@dta/fix_for_sumo", "numpy", "mujoco>=3.5.0, <3.6.0", "h5py", diff --git a/sumo/app/dora/controller.py b/sumo/app/dora/controller_node.py similarity index 89% rename from sumo/app/dora/controller.py rename to sumo/app/dora/controller_node.py index 982020e..ca73176 100644 --- a/sumo/app/dora/controller.py +++ b/sumo/app/dora/controller_node.py @@ -1,6 +1,6 @@ # Copyright (c) 2025-2026 Robotics and AI Institute LLC dba RAI Institute. All rights reserved. -from judo.app.dora.controller import ControllerNode as JudoControllerNode +from judo.app.dora.controller_node import ControllerNode as JudoControllerNode import sumo.controller # noqa: F401 -- register controller/optimizer overrides import sumo.tasks # noqa: F401 -- register all sumo tasks diff --git a/sumo/app/dora/simulation.py b/sumo/app/dora/simulation_node.py similarity index 75% rename from sumo/app/dora/simulation.py rename to sumo/app/dora/simulation_node.py index 20c57cc..f5344e2 100644 --- a/sumo/app/dora/simulation.py +++ b/sumo/app/dora/simulation_node.py @@ -1,6 +1,6 @@ # Copyright (c) 2025-2026 Robotics and AI Institute LLC dba RAI Institute. All rights reserved. -from judo.app.dora.simulation import SimulationNode as JudoSimulationNode +from judo.app.dora.simulation_node import SimulationNode as JudoSimulationNode import sumo.tasks # noqa: F401 -- register all sumo tasks from sumo.app.dora.g1_simulation import G1Simulation @@ -10,7 +10,7 @@ class SimulationNode(JudoSimulationNode): """Simulation node with G1 backend support.""" def __init__(self, init_task: str = "spot_box_push", **kwargs) -> None: - kwargs.setdefault("custom_backends", {"mujoco_g1": G1Simulation}) + kwargs.setdefault("backend_registry", {"mujoco_g1": G1Simulation}) super().__init__(init_task=init_task, **kwargs) diff --git a/sumo/app/dora/visualization.py b/sumo/app/dora/visualization_node.py similarity index 86% rename from sumo/app/dora/visualization.py rename to sumo/app/dora/visualization_node.py index 328ac25..d40fc11 100644 --- a/sumo/app/dora/visualization.py +++ b/sumo/app/dora/visualization_node.py @@ -1,6 +1,6 @@ # Copyright (c) 2025-2026 Robotics and AI Institute LLC dba RAI Institute. All rights reserved. -from judo.app.dora.visualization import VisualizationNode as JudoVisualizationNode +from judo.app.dora.visualization_node import VisualizationNode as JudoVisualizationNode import sumo.controller # noqa: F401 -- register controller/optimizer overrides import sumo.tasks # noqa: F401 -- register all sumo tasks diff --git a/sumo/configs/sumo_default.yaml b/sumo/configs/sumo_default.yaml index 19a654e..954e580 100644 --- a/sumo/configs/sumo_default.yaml +++ b/sumo/configs/sumo_default.yaml @@ -5,8 +5,8 @@ task: spot_box_push node_definitions: simulation: - _target_: sumo.app.dora.simulation.SimulationNode + _target_: sumo.app.dora.simulation_node.SimulationNode visualization: - _target_: sumo.app.dora.visualization.VisualizationNode + _target_: sumo.app.dora.visualization_node.VisualizationNode controller: - _target_: sumo.app.dora.controller.ControllerNode + _target_: sumo.app.dora.controller_node.ControllerNode diff --git a/sumo/controller/controller.py b/sumo/controller/controller.py index 308f928..9abfa66 100644 --- a/sumo/controller/controller.py +++ b/sumo/controller/controller.py @@ -18,7 +18,7 @@ def make_controller( init_optimizer: str, task_registration_cfg: DictConfig | None = None, optimizer_registration_cfg: DictConfig | None = None, - rollout_backend: Literal["mujoco"] = "mujoco", + rollout_backend: Literal["mujoco", "mujoco_hierarchical", "mujoco_g1"] = "mujoco", ) -> Controller: """Make a controller with G1 backend support.""" return _judo_make_controller( @@ -27,7 +27,7 @@ def make_controller( task_registration_cfg=task_registration_cfg, optimizer_registration_cfg=optimizer_registration_cfg, rollout_backend=rollout_backend, - custom_rollout_backends={"mujoco_g1": G1RolloutBackend}, + rollout_backend_registry={"mujoco_g1": G1RolloutBackend}, ) diff --git a/sumo/run_mpc/run_mpc.py b/sumo/run_mpc/run_mpc.py index 5eddcb0..fd1e855 100644 --- a/sumo/run_mpc/run_mpc.py +++ b/sumo/run_mpc/run_mpc.py @@ -57,22 +57,22 @@ class RunMPCConfig: def _create_sim(task_name: str): """Create the right simulation backend for a task.""" - task_cls, _ = get_registered_tasks()[task_name] - default_backend = getattr(task_cls, "default_backend", None) + task_entry = get_registered_tasks()[task_name] + simulation_backend = task_entry.simulation_backend - if default_backend == "mujoco_g1": + if simulation_backend == "mujoco_g1": require_g1_extensions() return G1Simulation(init_task=task_name) - if task_cls().uses_locomotion_policy: + if simulation_backend == "mujoco_hierarchical": require_mujoco_extensions() from judo.simulation import get_simulation_backend - return get_simulation_backend("mujoco_policy")(init_task=task_name) + return get_simulation_backend("mujoco_hierarchical")(init_task=task_name) from judo.simulation import get_simulation_backend - return get_simulation_backend("mujoco")(init_task=task_name) + return get_simulation_backend(simulation_backend)(init_task=task_name) def _make_condition_checker(method): @@ -246,7 +246,7 @@ def run_mpc(config: RunMPCConfig) -> list[dict]: # Create controller controller_config = ControllerConfig() controller_config.set_override(config.init_task) - controller = Controller(controller_config, task, optimizer, custom_rollout_backends={"mujoco_g1": G1RolloutBackend}) + controller = Controller(controller_config, task, optimizer, rollout_backend_registry={"mujoco_g1": G1RolloutBackend}) # Set up visualization viser_model = None diff --git a/sumo/tasks/__init__.py b/sumo/tasks/__init__.py index b834161..3bfedd2 100644 --- a/sumo/tasks/__init__.py +++ b/sumo/tasks/__init__.py @@ -1,6 +1,7 @@ # Copyright (c) 2025-2026 Robotics and AI Institute LLC dba RAI Institute. All rights reserved. -from judo.tasks import get_registered_tasks, register_task +from judo.tasks import TaskRegistration, get_registered_tasks, register_task +from judo.tasks.spot.spot_constants import SPOT_LOCOMOTION_POLICY_PATH G1_TASK_NAMES = ( "g1_base", @@ -16,11 +17,23 @@ from sumo.tasks.g1.g1_door import G1Door, G1DoorConfig from sumo.tasks.g1.g1_table_push import G1TablePush, G1TablePushConfig -register_task("g1_base", G1Base, G1BaseConfig) -register_task("g1_box", G1Box, G1BoxConfig) -register_task("g1_chair_push", G1ChairPush, G1ChairPushConfig) -register_task("g1_door", G1Door, G1DoorConfig) -register_task("g1_table_push", G1TablePush, G1TablePushConfig) +register_task("g1_base", G1Base, G1BaseConfig, rollout_backend="mujoco_g1", simulation_backend="mujoco_g1") +register_task("g1_box", G1Box, G1BoxConfig, rollout_backend="mujoco_g1", simulation_backend="mujoco_g1") +register_task( + "g1_chair_push", + G1ChairPush, + G1ChairPushConfig, + rollout_backend="mujoco_g1", + simulation_backend="mujoco_g1", +) +register_task("g1_door", G1Door, G1DoorConfig, rollout_backend="mujoco_g1", simulation_backend="mujoco_g1") +register_task( + "g1_table_push", + G1TablePush, + G1TablePushConfig, + rollout_backend="mujoco_g1", + simulation_backend="mujoco_g1", +) SPOT_TASK_NAMES = ( "spot_base", @@ -63,29 +76,35 @@ from sumo.tasks.spot.spot_tire_stack import SpotTireStack, SpotTireStackConfig from sumo.tasks.spot.spot_tire_upright import SpotTireUpright, SpotTireUprightConfig -register_task("spot_base", SpotBase, SpotBaseConfig) -register_task("spot_box_push", SpotBoxPush, SpotBoxPushConfig) -register_task("spot_chair_push", SpotChairPush, SpotChairPushConfig) -register_task("spot_cone_push", SpotConePush, SpotConePushConfig) -register_task("spot_rack_push", SpotRackPush, SpotRackPushConfig) -register_task("spot_tire_push", SpotTirePush, SpotTirePushConfig) -register_task("spot_box_upright", SpotBoxUpright, SpotBoxUprightConfig) -register_task("spot_chair_upright", SpotChairUpright, SpotChairUprightConfig) -register_task("spot_cone_upright", SpotConeUpright, SpotConeUprightConfig) -register_task("spot_rack_upright", SpotRackUpright, SpotRackUprightConfig) -register_task("spot_tire_upright", SpotTireUpright, SpotTireUprightConfig) -register_task("spot_chair_ramp", SpotChairRamp, SpotChairRampConfig) -register_task("spot_barrier_upright", SpotBarrierUpright, SpotBarrierUprightConfig) -register_task("spot_barrier_drag", SpotBarrierDrag, SpotBarrierDragConfig) -register_task("spot_tire_roll", SpotTireRoll, SpotTireRollConfig) -register_task("spot_tire_stack", SpotTireStack, SpotTireStackConfig) -register_task("spot_tire_rack_drag", SpotTireRackDrag, SpotTireRackDragConfig) -register_task("spot_rugged_box_push", SpotRuggedBoxPush, SpotRuggedBoxPushConfig) +_SPOT_REGISTRATION_KWARGS = { + "rollout_backend": "mujoco_hierarchical", + "simulation_backend": "mujoco_hierarchical", + "locomotion_policy_path": str(SPOT_LOCOMOTION_POLICY_PATH), +} + +register_task("spot_base", SpotBase, SpotBaseConfig, **_SPOT_REGISTRATION_KWARGS) +register_task("spot_box_push", SpotBoxPush, SpotBoxPushConfig, **_SPOT_REGISTRATION_KWARGS) +register_task("spot_chair_push", SpotChairPush, SpotChairPushConfig, **_SPOT_REGISTRATION_KWARGS) +register_task("spot_cone_push", SpotConePush, SpotConePushConfig, **_SPOT_REGISTRATION_KWARGS) +register_task("spot_rack_push", SpotRackPush, SpotRackPushConfig, **_SPOT_REGISTRATION_KWARGS) +register_task("spot_tire_push", SpotTirePush, SpotTirePushConfig, **_SPOT_REGISTRATION_KWARGS) +register_task("spot_box_upright", SpotBoxUpright, SpotBoxUprightConfig, **_SPOT_REGISTRATION_KWARGS) +register_task("spot_chair_upright", SpotChairUpright, SpotChairUprightConfig, **_SPOT_REGISTRATION_KWARGS) +register_task("spot_cone_upright", SpotConeUpright, SpotConeUprightConfig, **_SPOT_REGISTRATION_KWARGS) +register_task("spot_rack_upright", SpotRackUpright, SpotRackUprightConfig, **_SPOT_REGISTRATION_KWARGS) +register_task("spot_tire_upright", SpotTireUpright, SpotTireUprightConfig, **_SPOT_REGISTRATION_KWARGS) +register_task("spot_chair_ramp", SpotChairRamp, SpotChairRampConfig, **_SPOT_REGISTRATION_KWARGS) +register_task("spot_barrier_upright", SpotBarrierUpright, SpotBarrierUprightConfig, **_SPOT_REGISTRATION_KWARGS) +register_task("spot_barrier_drag", SpotBarrierDrag, SpotBarrierDragConfig, **_SPOT_REGISTRATION_KWARGS) +register_task("spot_tire_roll", SpotTireRoll, SpotTireRollConfig, **_SPOT_REGISTRATION_KWARGS) +register_task("spot_tire_stack", SpotTireStack, SpotTireStackConfig, **_SPOT_REGISTRATION_KWARGS) +register_task("spot_tire_rack_drag", SpotTireRackDrag, SpotTireRackDragConfig, **_SPOT_REGISTRATION_KWARGS) +register_task("spot_rugged_box_push", SpotRuggedBoxPush, SpotRuggedBoxPushConfig, **_SPOT_REGISTRATION_KWARGS) SUMO_TASK_NAMES = G1_TASK_NAMES + SPOT_TASK_NAMES -def get_sumo_registered_tasks() -> dict[str, tuple[type, type]]: +def get_sumo_registered_tasks() -> dict[str, TaskRegistration]: """Return only the task registrations owned by sumo.""" registered_tasks = get_registered_tasks() return {task_name: registered_tasks[task_name] for task_name in SUMO_TASK_NAMES if task_name in registered_tasks} diff --git a/tests/test_imports.py b/tests/test_imports.py index ee2483a..a401c66 100644 --- a/tests/test_imports.py +++ b/tests/test_imports.py @@ -124,8 +124,8 @@ def test_sumo_run_mpc_import(): def test_sumo_dora_imports(): - from sumo.app.dora.controller import ControllerNode - from sumo.app.dora.simulation import G1Simulation, SimulationNode + from sumo.app.dora.controller_node import ControllerNode + from sumo.app.dora.simulation_node import G1Simulation, SimulationNode assert ControllerNode is not None assert SimulationNode is not None @@ -151,7 +151,7 @@ def test_prefer_active_env_libs(monkeypatch, tmp_path): def test_simulation_backend_resolution_is_lazy(): - from sumo.app.dora import simulation as simulation_module + from sumo.app.dora import simulation_node as simulation_module # G1Simulation is defined locally in sumo assert hasattr(simulation_module, "G1Simulation") From 93aa625d46b1a48d09a5fa92c96e6423552ab80a Mon Sep 17 00:00:00 2001 From: Duy Ta Date: Tue, 5 May 2026 19:22:59 -0400 Subject: [PATCH 2/9] upgrade mujoco version, add action for full clean --- README.md | 16 +++++++++ pixi.lock | 61 ++++++++++++++++++----------------- pyproject.toml | 40 +++++++++++++++++++++-- sumo/controller/controller.py | 2 -- 4 files changed, 86 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 3c10bf4..5fb2943 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,22 @@ pixi run build If you prefer named environments, `pixi install -e dev` is equivalent for this repo, and the corresponding task form is `pixi run -e dev ...`. +### Cleaning the build + +If native extensions misbehave (e.g. after a mujoco / judo / pybind11 version +bump, or if you see odd shape mismatches between Python and the C++ rollout +backend), wipe the build artifacts before rebuilding: + +```bash +# Remove C++ build dirs, deployed .so files, and __pycache__ directories +pixi run clean-build +pixi run build + +# Full reset: also removes .judo-src/ and .pixi/ (forces fresh clone + reinstall) +pixi run clean-all +pixi run build # auto-runs `pixi install` first +``` + ## Run ```bash diff --git a/pixi.lock b/pixi.lock index f0239dd..ed4ad61 100644 --- a/pixi.lock +++ b/pixi.lock @@ -160,12 +160,12 @@ environments: - pypi: https://files.pythonhosted.org/packages/49/fa/391e437a34e55095173dca5f24070d89cbc233ff85bf1c29c93248c6588d/imageio-2.37.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/69/90/f63fb5873511e014207a475e2bb4e8b2e570d655b00ac19a9a0ca0a385ee/jsonschema-4.26.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/41/45/1a4ed80516f02155c51f51e8cedb3c1902296743db0bbc66608a0db2814f/jsonschema_specifications-2025.9.1-py3-none-any.whl - - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#b326d25ad56497928cfa1fb86a1bbb90bce13653 + - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#3307be1ad0f1dca757fcd2e4f594f5d5197ba647 - pypi: https://files.pythonhosted.org/packages/d0/34/9e591954939276bb679b73773836c6684c22e56d05980e31d52a9a8deb18/lxml-6.0.2-cp313-cp313-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl - pypi: https://files.pythonhosted.org/packages/44/29/c89ab58a20965d630df347999b55306b146473cadd0fb8b7879c85ca7a54/manifold3d-3.4.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl - pypi: https://files.pythonhosted.org/packages/03/30/e54ececd0403a5495c340b693075abec92a6d17dc44283b6cb059534f7ed/mapbox_earcut-2.0.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl - pypi: https://files.pythonhosted.org/packages/28/83/36557b04cfdc317ed8a525c4993b23e43a8fbcddaddd78619112ca07138c/msgspec-0.20.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl - - pypi: https://files.pythonhosted.org/packages/16/47/93c7ac3a9630b49c55d76b0d02aa565543e2f62cecd885f8f574f5c745e7/mujoco-3.5.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl + - pypi: https://files.pythonhosted.org/packages/6e/48/c8cd52847d8a973fc606910a5467b8b7b68fa763afbe91f41d87123f957c/mujoco-3.6.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl - pypi: https://files.pythonhosted.org/packages/9e/c9/b2622292ea83fbb4ec318f5b9ab867d0a28ab43c5717bb85b0a5f6b3b0a4/networkx-3.6.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/e3/94/1843518e420fa3ed6919835845df698c7e27e183cb997394e4a670973a65/omegaconf-2.3.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/71/24/538bff45bde96535d7d998c6fed1a751c75ac7c53c37c90dc2601b243893/pillow-12.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl @@ -353,12 +353,12 @@ environments: - pypi: https://files.pythonhosted.org/packages/49/fa/391e437a34e55095173dca5f24070d89cbc233ff85bf1c29c93248c6588d/imageio-2.37.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/69/90/f63fb5873511e014207a475e2bb4e8b2e570d655b00ac19a9a0ca0a385ee/jsonschema-4.26.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/41/45/1a4ed80516f02155c51f51e8cedb3c1902296743db0bbc66608a0db2814f/jsonschema_specifications-2025.9.1-py3-none-any.whl - - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#b326d25ad56497928cfa1fb86a1bbb90bce13653 + - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#3307be1ad0f1dca757fcd2e4f594f5d5197ba647 - pypi: https://files.pythonhosted.org/packages/5d/f4/2a94a3d3dfd6c6b433501b8d470a1960a20ecce93245cf2db1706adf6c19/lxml-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl - pypi: https://files.pythonhosted.org/packages/68/d0/b1b5a1dc4db9e4ce844d025a72777a5a2251a33c5a84cff7e64ed9425373/manifold3d-3.4.0-cp313-cp313-macosx_10_14_x86_64.whl - pypi: https://files.pythonhosted.org/packages/8b/7c/c5dd5b255b9828ba5df729e62fdd470a322c938f07ef392ca03c0592bb3a/mapbox_earcut-2.0.0-cp313-cp313-macosx_10_13_x86_64.whl - pypi: https://files.pythonhosted.org/packages/8a/d1/b902d38b6e5ba3bdddbec469bba388d647f960aeed7b5b3623a8debe8a76/msgspec-0.20.0-cp313-cp313-macosx_10_13_x86_64.whl - - pypi: https://files.pythonhosted.org/packages/87/2a/371033684e4ddcda47c97661fb6e9617c0e5e3749af082a9b4d5d1bf9f27/mujoco-3.5.0-cp313-cp313-macosx_10_16_x86_64.whl + - pypi: https://files.pythonhosted.org/packages/29/0e/f3ea1fc9d1a25f19b173b13c23797805480cdb0a1026d43cf6b37dc2de6e/mujoco-3.6.0-cp313-cp313-macosx_10_16_x86_64.whl - pypi: https://files.pythonhosted.org/packages/9e/c9/b2622292ea83fbb4ec318f5b9ab867d0a28ab43c5717bb85b0a5f6b3b0a4/networkx-3.6.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/e3/94/1843518e420fa3ed6919835845df698c7e27e183cb997394e4a670973a65/omegaconf-2.3.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/14/a1/16c4b823838ba4c9c52c0e6bbda903a3fe5a1bdbf1b8eb4fff7156f3e318/pillow-12.1.1-cp313-cp313-macosx_10_13_x86_64.whl @@ -545,12 +545,12 @@ environments: - pypi: https://files.pythonhosted.org/packages/49/fa/391e437a34e55095173dca5f24070d89cbc233ff85bf1c29c93248c6588d/imageio-2.37.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/69/90/f63fb5873511e014207a475e2bb4e8b2e570d655b00ac19a9a0ca0a385ee/jsonschema-4.26.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/41/45/1a4ed80516f02155c51f51e8cedb3c1902296743db0bbc66608a0db2814f/jsonschema_specifications-2025.9.1-py3-none-any.whl - - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#b326d25ad56497928cfa1fb86a1bbb90bce13653 + - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#3307be1ad0f1dca757fcd2e4f594f5d5197ba647 - pypi: https://files.pythonhosted.org/packages/53/fd/4e8f0540608977aea078bf6d79f128e0e2c2bba8af1acf775c30baa70460/lxml-6.0.2-cp313-cp313-macosx_10_13_universal2.whl - pypi: https://files.pythonhosted.org/packages/f2/b3/47473d3f3bda127569e9615416ff24b1049b74cc08540572a9747e00bbe0/manifold3d-3.4.0-cp313-cp313-macosx_11_0_arm64.whl - pypi: https://files.pythonhosted.org/packages/1a/3f/03f23eac9831e7d0d8da3d6993695a9a3724659c94e9997f6b7aaccc199d/mapbox_earcut-2.0.0-cp313-cp313-macosx_11_0_arm64.whl - pypi: https://files.pythonhosted.org/packages/57/b6/eff0305961a1d9447ec2b02f8c73c8946f22564d302a504185b730c9a761/msgspec-0.20.0-cp313-cp313-macosx_11_0_arm64.whl - - pypi: https://files.pythonhosted.org/packages/6f/c9/26bd4979d503d03f7a6ded851c3094a5708cb534cf0dc80b4db6672da2b0/mujoco-3.5.0-cp313-cp313-macosx_11_0_arm64.whl + - pypi: https://files.pythonhosted.org/packages/25/f2/2cbeabc6b69110e743100f550ec00ae8c60352b6975cf95470add299ed7a/mujoco-3.6.0-cp313-cp313-macosx_11_0_arm64.whl - pypi: https://files.pythonhosted.org/packages/9e/c9/b2622292ea83fbb4ec318f5b9ab867d0a28ab43c5717bb85b0a5f6b3b0a4/networkx-3.6.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/e3/94/1843518e420fa3ed6919835845df698c7e27e183cb997394e4a670973a65/omegaconf-2.3.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/bb/ad/ad9dc98ff24f485008aa5cdedaf1a219876f6f6c42a4626c08bc4e80b120/pillow-12.1.1-cp313-cp313-macosx_11_0_arm64.whl @@ -740,12 +740,12 @@ environments: - pypi: https://files.pythonhosted.org/packages/49/fa/391e437a34e55095173dca5f24070d89cbc233ff85bf1c29c93248c6588d/imageio-2.37.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/69/90/f63fb5873511e014207a475e2bb4e8b2e570d655b00ac19a9a0ca0a385ee/jsonschema-4.26.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/41/45/1a4ed80516f02155c51f51e8cedb3c1902296743db0bbc66608a0db2814f/jsonschema_specifications-2025.9.1-py3-none-any.whl - - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#b326d25ad56497928cfa1fb86a1bbb90bce13653 + - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#3307be1ad0f1dca757fcd2e4f594f5d5197ba647 - pypi: https://files.pythonhosted.org/packages/d0/34/9e591954939276bb679b73773836c6684c22e56d05980e31d52a9a8deb18/lxml-6.0.2-cp313-cp313-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl - pypi: https://files.pythonhosted.org/packages/44/29/c89ab58a20965d630df347999b55306b146473cadd0fb8b7879c85ca7a54/manifold3d-3.4.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl - pypi: https://files.pythonhosted.org/packages/03/30/e54ececd0403a5495c340b693075abec92a6d17dc44283b6cb059534f7ed/mapbox_earcut-2.0.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl - pypi: https://files.pythonhosted.org/packages/28/83/36557b04cfdc317ed8a525c4993b23e43a8fbcddaddd78619112ca07138c/msgspec-0.20.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl - - pypi: https://files.pythonhosted.org/packages/16/47/93c7ac3a9630b49c55d76b0d02aa565543e2f62cecd885f8f574f5c745e7/mujoco-3.5.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl + - pypi: https://files.pythonhosted.org/packages/6e/48/c8cd52847d8a973fc606910a5467b8b7b68fa763afbe91f41d87123f957c/mujoco-3.6.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl - pypi: https://files.pythonhosted.org/packages/9e/c9/b2622292ea83fbb4ec318f5b9ab867d0a28ab43c5717bb85b0a5f6b3b0a4/networkx-3.6.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/e3/94/1843518e420fa3ed6919835845df698c7e27e183cb997394e4a670973a65/omegaconf-2.3.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/71/24/538bff45bde96535d7d998c6fed1a751c75ac7c53c37c90dc2601b243893/pillow-12.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl @@ -933,12 +933,12 @@ environments: - pypi: https://files.pythonhosted.org/packages/49/fa/391e437a34e55095173dca5f24070d89cbc233ff85bf1c29c93248c6588d/imageio-2.37.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/69/90/f63fb5873511e014207a475e2bb4e8b2e570d655b00ac19a9a0ca0a385ee/jsonschema-4.26.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/41/45/1a4ed80516f02155c51f51e8cedb3c1902296743db0bbc66608a0db2814f/jsonschema_specifications-2025.9.1-py3-none-any.whl - - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#b326d25ad56497928cfa1fb86a1bbb90bce13653 + - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#3307be1ad0f1dca757fcd2e4f594f5d5197ba647 - pypi: https://files.pythonhosted.org/packages/5d/f4/2a94a3d3dfd6c6b433501b8d470a1960a20ecce93245cf2db1706adf6c19/lxml-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl - pypi: https://files.pythonhosted.org/packages/68/d0/b1b5a1dc4db9e4ce844d025a72777a5a2251a33c5a84cff7e64ed9425373/manifold3d-3.4.0-cp313-cp313-macosx_10_14_x86_64.whl - pypi: https://files.pythonhosted.org/packages/8b/7c/c5dd5b255b9828ba5df729e62fdd470a322c938f07ef392ca03c0592bb3a/mapbox_earcut-2.0.0-cp313-cp313-macosx_10_13_x86_64.whl - pypi: https://files.pythonhosted.org/packages/8a/d1/b902d38b6e5ba3bdddbec469bba388d647f960aeed7b5b3623a8debe8a76/msgspec-0.20.0-cp313-cp313-macosx_10_13_x86_64.whl - - pypi: https://files.pythonhosted.org/packages/87/2a/371033684e4ddcda47c97661fb6e9617c0e5e3749af082a9b4d5d1bf9f27/mujoco-3.5.0-cp313-cp313-macosx_10_16_x86_64.whl + - pypi: https://files.pythonhosted.org/packages/29/0e/f3ea1fc9d1a25f19b173b13c23797805480cdb0a1026d43cf6b37dc2de6e/mujoco-3.6.0-cp313-cp313-macosx_10_16_x86_64.whl - pypi: https://files.pythonhosted.org/packages/9e/c9/b2622292ea83fbb4ec318f5b9ab867d0a28ab43c5717bb85b0a5f6b3b0a4/networkx-3.6.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/e3/94/1843518e420fa3ed6919835845df698c7e27e183cb997394e4a670973a65/omegaconf-2.3.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/14/a1/16c4b823838ba4c9c52c0e6bbda903a3fe5a1bdbf1b8eb4fff7156f3e318/pillow-12.1.1-cp313-cp313-macosx_10_13_x86_64.whl @@ -1125,12 +1125,12 @@ environments: - pypi: https://files.pythonhosted.org/packages/49/fa/391e437a34e55095173dca5f24070d89cbc233ff85bf1c29c93248c6588d/imageio-2.37.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/69/90/f63fb5873511e014207a475e2bb4e8b2e570d655b00ac19a9a0ca0a385ee/jsonschema-4.26.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/41/45/1a4ed80516f02155c51f51e8cedb3c1902296743db0bbc66608a0db2814f/jsonschema_specifications-2025.9.1-py3-none-any.whl - - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#b326d25ad56497928cfa1fb86a1bbb90bce13653 + - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#3307be1ad0f1dca757fcd2e4f594f5d5197ba647 - pypi: https://files.pythonhosted.org/packages/53/fd/4e8f0540608977aea078bf6d79f128e0e2c2bba8af1acf775c30baa70460/lxml-6.0.2-cp313-cp313-macosx_10_13_universal2.whl - pypi: https://files.pythonhosted.org/packages/f2/b3/47473d3f3bda127569e9615416ff24b1049b74cc08540572a9747e00bbe0/manifold3d-3.4.0-cp313-cp313-macosx_11_0_arm64.whl - pypi: https://files.pythonhosted.org/packages/1a/3f/03f23eac9831e7d0d8da3d6993695a9a3724659c94e9997f6b7aaccc199d/mapbox_earcut-2.0.0-cp313-cp313-macosx_11_0_arm64.whl - pypi: https://files.pythonhosted.org/packages/57/b6/eff0305961a1d9447ec2b02f8c73c8946f22564d302a504185b730c9a761/msgspec-0.20.0-cp313-cp313-macosx_11_0_arm64.whl - - pypi: https://files.pythonhosted.org/packages/6f/c9/26bd4979d503d03f7a6ded851c3094a5708cb534cf0dc80b4db6672da2b0/mujoco-3.5.0-cp313-cp313-macosx_11_0_arm64.whl + - pypi: https://files.pythonhosted.org/packages/25/f2/2cbeabc6b69110e743100f550ec00ae8c60352b6975cf95470add299ed7a/mujoco-3.6.0-cp313-cp313-macosx_11_0_arm64.whl - pypi: https://files.pythonhosted.org/packages/9e/c9/b2622292ea83fbb4ec318f5b9ab867d0a28ab43c5717bb85b0a5f6b3b0a4/networkx-3.6.1-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/e3/94/1843518e420fa3ed6919835845df698c7e27e183cb997394e4a670973a65/omegaconf-2.3.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/bb/ad/ad9dc98ff24f485008aa5cdedaf1a219876f6f6c42a4626c08bc4e80b120/pillow-12.1.1-cp313-cp313-macosx_11_0_arm64.whl @@ -2831,18 +2831,20 @@ packages: requires_dist: - referencing>=0.31.0 requires_python: '>=3.9' -- pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#b326d25ad56497928cfa1fb86a1bbb90bce13653 +- pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#3307be1ad0f1dca757fcd2e4f594f5d5197ba647 name: judo-rai - version: 0.0.7 + version: 0.1.0 requires_dist: - dora-utils - - mujoco>=3.5.0 + - h5py + - mujoco>=3.6.0,<3.7 - numpy - pillow - pycparser - requests - rich - robot-descriptions + - tyro - scipy - viser>=1.0.0 - furo ; extra == 'docs' @@ -2859,6 +2861,7 @@ packages: - pyright ; extra == 'dev' - pytest ; extra == 'dev' - pytest-cov ; extra == 'dev' + - pytest-timeout ; extra == 'dev' - pytest-xdist ; extra == 'dev' - ruff ; extra == 'dev' - twine ; extra == 'dev' @@ -4526,10 +4529,10 @@ packages: - tomli-w ; extra == 'toml' - pyyaml ; extra == 'yaml' requires_python: '>=3.9' -- pypi: https://files.pythonhosted.org/packages/16/47/93c7ac3a9630b49c55d76b0d02aa565543e2f62cecd885f8f574f5c745e7/mujoco-3.5.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl +- pypi: https://files.pythonhosted.org/packages/25/f2/2cbeabc6b69110e743100f550ec00ae8c60352b6975cf95470add299ed7a/mujoco-3.6.0-cp313-cp313-macosx_11_0_arm64.whl name: mujoco - version: 3.5.0 - sha256: a956520adb275ce8e878da29e2586eac3affc7b7ac772065ef01f2380a9e8784 + version: 3.6.0 + sha256: d593e9373a61db82a506485f7f34533fb6d7e2bff7602f2310aa03e3a93b292f requires_dist: - absl-py - etils[epath] @@ -4548,11 +4551,11 @@ packages: - typing-extensions ; extra == 'sysid' - usd-core ; extra == 'usd' - pillow ; extra == 'usd' - requires_python: '>=3.9' -- pypi: https://files.pythonhosted.org/packages/6f/c9/26bd4979d503d03f7a6ded851c3094a5708cb534cf0dc80b4db6672da2b0/mujoco-3.5.0-cp313-cp313-macosx_11_0_arm64.whl + requires_python: '>=3.10' +- pypi: https://files.pythonhosted.org/packages/29/0e/f3ea1fc9d1a25f19b173b13c23797805480cdb0a1026d43cf6b37dc2de6e/mujoco-3.6.0-cp313-cp313-macosx_10_16_x86_64.whl name: mujoco - version: 3.5.0 - sha256: 82416804ae96c69ed779330bd4f4af0a43632e2bbbcc60e5b193642db48e84ca + version: 3.6.0 + sha256: 29c8c05061798fc3b80269ab3661fa915b890e9623bda4bc6bc9e237db81e885 requires_dist: - absl-py - etils[epath] @@ -4571,11 +4574,11 @@ packages: - typing-extensions ; extra == 'sysid' - usd-core ; extra == 'usd' - pillow ; extra == 'usd' - requires_python: '>=3.9' -- pypi: https://files.pythonhosted.org/packages/87/2a/371033684e4ddcda47c97661fb6e9617c0e5e3749af082a9b4d5d1bf9f27/mujoco-3.5.0-cp313-cp313-macosx_10_16_x86_64.whl + requires_python: '>=3.10' +- pypi: https://files.pythonhosted.org/packages/6e/48/c8cd52847d8a973fc606910a5467b8b7b68fa763afbe91f41d87123f957c/mujoco-3.6.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl name: mujoco - version: 3.5.0 - sha256: 74b05ec4a6a3d728b2da6944d2ae17cac4af9b7a9293f2c2e9e7332fa7535714 + version: 3.6.0 + sha256: 5dc7adceab3a7dbf8b4d52176d4aa629aca5f83dfce5ae06abc1a8c93980d67b requires_dist: - absl-py - etils[epath] @@ -4594,7 +4597,7 @@ packages: - typing-extensions ; extra == 'sysid' - usd-core ; extra == 'usd' - pillow ; extra == 'usd' - requires_python: '>=3.9' + requires_python: '>=3.10' - conda: https://conda.anaconda.org/conda-forge/linux-64/ncurses-6.5-h2d0b736_3.conda sha256: 3fde293232fa3fca98635e1167de6b7c7fda83caf24b9d6c91ec9eefb4f4d586 md5: 47e340acb35de30501a76c7c799c41d7 @@ -5953,11 +5956,11 @@ packages: - pypi: ./ name: sumo version: 0.0.1 - sha256: 6bde2d7c6801519b8e31ea250aded554e33e63286652320915521cd81b7401d7 + sha256: a6621f840a2144d82b22a2d29ede5ec1bee54f1e9a8b4ba72b46affc46fd0faf requires_dist: - judo-rai @ git+https://github.com/rai-opensource/judo.git@dta/fix_for_sumo - numpy - - mujoco>=3.5.0,<3.6.0 + - mujoco>=3.6.0,<3.7 - h5py - tyro - tqdm diff --git a/pyproject.toml b/pyproject.toml index 5339377..a1d07a8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ version = "0.0.1" dependencies = [ "judo-rai @ git+https://github.com/rai-opensource/judo.git@dta/fix_for_sumo", "numpy", - "mujoco>=3.5.0, <3.6.0", + "mujoco>=3.6.0,<3.7", "h5py", "tyro", "tqdm", @@ -74,7 +74,7 @@ sumo = "sumo" cmd = """ sh -c ' if [ ! -d .judo-src ]; then - git clone --depth 1 --branch dta/fix_for_sumo https://github.com/bdaiinstitute/judo.git .judo-src + git clone --depth 1 --branch dta/fix_for_sumo https://github.com/rai-opensource/judo.git .judo-src fi && sed -i.bak "s|libonnxruntime.so\\*|libonnxruntime.*|" .judo-src/mujoco_extensions/CMakeLists.txt && mkdir -p .judo-src/build && @@ -127,6 +127,42 @@ depends-on = ["build-g1-ext", "build-judo-ext"] cwd = "g1_extensions" cmd = "rm -rf build/" +# Remove all C++ build artifacts (g1_extensions and judo mujoco_extensions), +# the installed extension .so files in site-packages, and Python caches. +# Use this when mujoco / judo / pybind11 versions change to avoid stale objects. +[tool.pixi.tasks.clean-build] +cmd = """ +sh -c ' +set -e +rm -rf g1_extensions/build/ +rm -rf .judo-src/build/ +rm -f .judo-src/mujoco_extensions/policy_rollout/policy_rollout_pybind*.so +SITE=$(python -c "import site; print(site.getsitepackages()[0])" 2>/dev/null || true) +if [ -n "$SITE" ]; then + rm -f "$SITE"/mujoco_extensions/policy_rollout/policy_rollout_pybind*.so + rm -f "$SITE"/g1_extensions/_g1_extensions*.so +fi +find . -path ./.pixi -prune -o -type d -name __pycache__ -print -exec rm -rf {} + 2>/dev/null || true +echo "Cleaned C++ build artifacts and Python caches." +' +""" + +# Full nuke: clean-build + remove the cloned judo source AND the entire pixi env. +# Forces fresh judo clone and full reinstall on next `pixi install` / `pixi run build`. +# Use when judo git revision in pixi.lock has been updated or when site-packages +# may have stale judo files. +[tool.pixi.tasks.clean-all] +depends-on = ["clean-build"] +cmd = """ +sh -c ' +set -e +rm -rf .judo-src +rm -rf .pixi +rm -rf outputs/ run_mpc/results/ out/ +echo "Full clean done. Run: pixi install && pixi run build" +' +""" + [tool.pytest.ini_options] markers = [ "g1_extensions: marks tests that require the optional g1_extensions extension", diff --git a/sumo/controller/controller.py b/sumo/controller/controller.py index 9abfa66..9615345 100644 --- a/sumo/controller/controller.py +++ b/sumo/controller/controller.py @@ -18,7 +18,6 @@ def make_controller( init_optimizer: str, task_registration_cfg: DictConfig | None = None, optimizer_registration_cfg: DictConfig | None = None, - rollout_backend: Literal["mujoco", "mujoco_hierarchical", "mujoco_g1"] = "mujoco", ) -> Controller: """Make a controller with G1 backend support.""" return _judo_make_controller( @@ -26,7 +25,6 @@ def make_controller( init_optimizer=init_optimizer, task_registration_cfg=task_registration_cfg, optimizer_registration_cfg=optimizer_registration_cfg, - rollout_backend=rollout_backend, rollout_backend_registry={"mujoco_g1": G1RolloutBackend}, ) From c0ce874c05ff0fae84de6f65efff4cd435010aa9 Mon Sep 17 00:00:00 2001 From: Duy Ta Date: Tue, 5 May 2026 19:32:46 -0400 Subject: [PATCH 3/9] fix tests --- sumo/controller/controller.py | 2 -- sumo/run_mpc/run_mpc.py | 4 +++- tests/test_tasks.py | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sumo/controller/controller.py b/sumo/controller/controller.py index 9615345..64bde2f 100644 --- a/sumo/controller/controller.py +++ b/sumo/controller/controller.py @@ -4,8 +4,6 @@ from __future__ import annotations -from typing import Literal - from judo.controller.controller import Controller, ControllerConfig, make_spline from judo.controller.controller import make_controller as _judo_make_controller from omegaconf import DictConfig diff --git a/sumo/run_mpc/run_mpc.py b/sumo/run_mpc/run_mpc.py index fd1e855..a626685 100644 --- a/sumo/run_mpc/run_mpc.py +++ b/sumo/run_mpc/run_mpc.py @@ -246,7 +246,9 @@ def run_mpc(config: RunMPCConfig) -> list[dict]: # Create controller controller_config = ControllerConfig() controller_config.set_override(config.init_task) - controller = Controller(controller_config, task, optimizer, rollout_backend_registry={"mujoco_g1": G1RolloutBackend}) + controller = Controller( + controller_config, task, optimizer, rollout_backend_registry={"mujoco_g1": G1RolloutBackend} + ) # Set up visualization viser_model = None diff --git a/tests/test_tasks.py b/tests/test_tasks.py index ff2a05f..ede2e3f 100644 --- a/tests/test_tasks.py +++ b/tests/test_tasks.py @@ -435,10 +435,10 @@ def test_spot_task_ctrlrange(task_cls, config_cls): @pytest.mark.parametrize("task_name", REGISTERED_SPOT_TASK_NAMES) def test_registered_spot_task_instantiation(task_name): - task_cls, config_cls = get_registered_tasks()[task_name] - task = task_cls() + registration = get_registered_tasks()[task_name] + task = registration.task_type() assert task.model is not None - assert isinstance(task.config, config_cls) + assert isinstance(task.config, registration.task_config_type) @pytest.mark.g1_extensions From 95bd39b20df07d0f15f5e578cab58666eee7e5c2 Mon Sep 17 00:00:00 2001 From: Duy Ta Date: Tue, 5 May 2026 19:35:06 -0400 Subject: [PATCH 4/9] remove default_backend --- sumo/tasks/g1/g1_base.py | 1 - 1 file changed, 1 deletion(-) diff --git a/sumo/tasks/g1/g1_base.py b/sumo/tasks/g1/g1_base.py index 99b3b4e..244e2e5 100644 --- a/sumo/tasks/g1/g1_base.py +++ b/sumo/tasks/g1/g1_base.py @@ -85,7 +85,6 @@ class G1Base(Task[ConfigT], Generic[ConfigT]): """Base class for G1 tasks.""" config_t: type[G1BaseConfig] = G1BaseConfig # type: ignore[assignment] - default_backend = "mujoco_g1" # Use G1-specific backend def _process_spec(self) -> None: """No-op for G1 tasks (meshes are local).""" From 871e4d30eedf0912cb4461f2b26eb43534f6c808 Mon Sep 17 00:00:00 2001 From: Duy Ta Date: Wed, 6 May 2026 10:25:29 -0400 Subject: [PATCH 5/9] precommit --- pixi.lock | 2 +- pyproject.toml | 1 + sumo/tasks/g1/g1_box.py | 6 ++---- sumo/tasks/g1/g1_chair_push.py | 6 ++---- sumo/tasks/g1/g1_door.py | 6 ++---- sumo/tasks/g1/g1_table_push.py | 6 ++---- 6 files changed, 10 insertions(+), 17 deletions(-) diff --git a/pixi.lock b/pixi.lock index ed4ad61..491c63b 100644 --- a/pixi.lock +++ b/pixi.lock @@ -5956,7 +5956,7 @@ packages: - pypi: ./ name: sumo version: 0.0.1 - sha256: a6621f840a2144d82b22a2d29ede5ec1bee54f1e9a8b4ba72b46affc46fd0faf + sha256: fdadb279c9654192c908a9ac3728a5db5bf6fca7a5cf55052f36f44f2fa68fa7 requires_dist: - judo-rai @ git+https://github.com/rai-opensource/judo.git@dta/fix_for_sumo - numpy diff --git a/pyproject.toml b/pyproject.toml index a1d07a8..ddc4e0b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -236,4 +236,5 @@ exclude = [ "**/__pycache__", ] stubPath = "typings" +useLibraryCodeForTypes = true reportAttributeAccessIssue = "warning" diff --git a/sumo/tasks/g1/g1_box.py b/sumo/tasks/g1/g1_box.py index fde2b6f..1e93e25 100644 --- a/sumo/tasks/g1/g1_box.py +++ b/sumo/tasks/g1/g1_box.py @@ -190,13 +190,11 @@ def reset_pose(self) -> np.ndarray: ] ) - def success( - self, model: MjModel, data: MjData, config: G1BoxConfig, metadata: dict[str, Any] | None = None - ) -> bool: + def success(self, model: MjModel, data: MjData, metadata: dict[str, Any] | None = None) -> bool: """Check if the box is in the goal position.""" object_pos = data.qpos[..., self.object_pose_idx[0:2]] # XY only object_vel = data.qvel[..., self.object_vel_idx[0:3]] - goal_pos = np.array(config.goal_position[:2]) # XY only + goal_pos = np.array(self.config.goal_position[:2]) # XY only position_check = np.linalg.norm(object_pos - goal_pos, axis=-1, ord=np.inf) < POSITION_TOLERANCE velocity_check = np.linalg.norm(object_vel, axis=-1) < VELOCITY_TOLERANCE return position_check and velocity_check diff --git a/sumo/tasks/g1/g1_chair_push.py b/sumo/tasks/g1/g1_chair_push.py index 7df9429..e373759 100644 --- a/sumo/tasks/g1/g1_chair_push.py +++ b/sumo/tasks/g1/g1_chair_push.py @@ -184,13 +184,11 @@ def reset_pose(self) -> np.ndarray: ] ) - def success( - self, model: MjModel, data: MjData, config: G1ChairPushConfig, metadata: dict[str, Any] | None = None - ) -> bool: + def success(self, model: MjModel, data: MjData, metadata: dict[str, Any] | None = None) -> bool: """Check if the chair is in the goal position.""" object_pos = data.qpos[..., self.object_pose_idx[0:2]] # XY only object_vel = data.qvel[..., self.object_vel_idx[0:3]] - goal_pos = np.array(config.goal_position[:2]) # XY only + goal_pos = np.array(self.config.goal_position[:2]) # XY only position_check = np.linalg.norm(object_pos - goal_pos, axis=-1, ord=np.inf) < POSITION_TOLERANCE velocity_check = np.linalg.norm(object_vel, axis=-1) < VELOCITY_TOLERANCE return position_check and velocity_check diff --git a/sumo/tasks/g1/g1_door.py b/sumo/tasks/g1/g1_door.py index 5beb930..cf58164 100644 --- a/sumo/tasks/g1/g1_door.py +++ b/sumo/tasks/g1/g1_door.py @@ -208,12 +208,10 @@ def reset_pose(self) -> np.ndarray: ] ) - def success( - self, model: MjModel, data: MjData, config: G1DoorConfig, metadata: dict[str, Any] | None = None - ) -> bool: + def success(self, model: MjModel, data: MjData, metadata: dict[str, Any] | None = None) -> bool: """Check if the robot has reached the target XY position.""" body_pos = data.qpos[..., self.body_pose_idx[0:2]] # Get XY position only - goal_pos = np.array(config.goal_position[:2]) # Get XY goal only + goal_pos = np.array(self.config.goal_position[:2]) # Get XY goal only position_check = np.linalg.norm(body_pos - goal_pos, axis=-1) < POSITION_TOLERANCE return bool(position_check) diff --git a/sumo/tasks/g1/g1_table_push.py b/sumo/tasks/g1/g1_table_push.py index 7fb7bf4..b9f2e81 100644 --- a/sumo/tasks/g1/g1_table_push.py +++ b/sumo/tasks/g1/g1_table_push.py @@ -177,13 +177,11 @@ def reset_pose(self) -> np.ndarray: ] ) - def success( - self, model: MjModel, data: MjData, config: G1TablePushConfig, metadata: dict[str, Any] | None = None - ) -> bool: + def success(self, model: MjModel, data: MjData, metadata: dict[str, Any] | None = None) -> bool: """Check if the table is in the goal position.""" object_pos = data.qpos[..., self.object_pose_idx[0:2]] # XY only object_vel = data.qvel[..., self.object_vel_idx[0:3]] - goal_pos = np.array(config.goal_position[:2]) # XY only + goal_pos = np.array(self.config.goal_position[:2]) # XY only position_check = np.linalg.norm(object_pos - goal_pos, axis=-1, ord=np.inf) < POSITION_TOLERANCE velocity_check = np.linalg.norm(object_vel, axis=-1) < VELOCITY_TOLERANCE return position_check and velocity_check From 4121e98a07dd8fa3daf5961647a3f0403b625046 Mon Sep 17 00:00:00 2001 From: Duy Ta Date: Thu, 7 May 2026 15:20:45 -0400 Subject: [PATCH 6/9] update judo --- pixi.lock | 14 +++++++------- pyproject.toml | 6 ++++++ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/pixi.lock b/pixi.lock index 491c63b..c1c19d4 100644 --- a/pixi.lock +++ b/pixi.lock @@ -160,7 +160,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/49/fa/391e437a34e55095173dca5f24070d89cbc233ff85bf1c29c93248c6588d/imageio-2.37.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/69/90/f63fb5873511e014207a475e2bb4e8b2e570d655b00ac19a9a0ca0a385ee/jsonschema-4.26.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/41/45/1a4ed80516f02155c51f51e8cedb3c1902296743db0bbc66608a0db2814f/jsonschema_specifications-2025.9.1-py3-none-any.whl - - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#3307be1ad0f1dca757fcd2e4f594f5d5197ba647 + - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#e0d14bf04a5051be7f84516b6779afbf9d0a7760 - pypi: https://files.pythonhosted.org/packages/d0/34/9e591954939276bb679b73773836c6684c22e56d05980e31d52a9a8deb18/lxml-6.0.2-cp313-cp313-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl - pypi: https://files.pythonhosted.org/packages/44/29/c89ab58a20965d630df347999b55306b146473cadd0fb8b7879c85ca7a54/manifold3d-3.4.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl - pypi: https://files.pythonhosted.org/packages/03/30/e54ececd0403a5495c340b693075abec92a6d17dc44283b6cb059534f7ed/mapbox_earcut-2.0.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl @@ -353,7 +353,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/49/fa/391e437a34e55095173dca5f24070d89cbc233ff85bf1c29c93248c6588d/imageio-2.37.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/69/90/f63fb5873511e014207a475e2bb4e8b2e570d655b00ac19a9a0ca0a385ee/jsonschema-4.26.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/41/45/1a4ed80516f02155c51f51e8cedb3c1902296743db0bbc66608a0db2814f/jsonschema_specifications-2025.9.1-py3-none-any.whl - - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#3307be1ad0f1dca757fcd2e4f594f5d5197ba647 + - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#e0d14bf04a5051be7f84516b6779afbf9d0a7760 - pypi: https://files.pythonhosted.org/packages/5d/f4/2a94a3d3dfd6c6b433501b8d470a1960a20ecce93245cf2db1706adf6c19/lxml-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl - pypi: https://files.pythonhosted.org/packages/68/d0/b1b5a1dc4db9e4ce844d025a72777a5a2251a33c5a84cff7e64ed9425373/manifold3d-3.4.0-cp313-cp313-macosx_10_14_x86_64.whl - pypi: https://files.pythonhosted.org/packages/8b/7c/c5dd5b255b9828ba5df729e62fdd470a322c938f07ef392ca03c0592bb3a/mapbox_earcut-2.0.0-cp313-cp313-macosx_10_13_x86_64.whl @@ -545,7 +545,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/49/fa/391e437a34e55095173dca5f24070d89cbc233ff85bf1c29c93248c6588d/imageio-2.37.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/69/90/f63fb5873511e014207a475e2bb4e8b2e570d655b00ac19a9a0ca0a385ee/jsonschema-4.26.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/41/45/1a4ed80516f02155c51f51e8cedb3c1902296743db0bbc66608a0db2814f/jsonschema_specifications-2025.9.1-py3-none-any.whl - - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#3307be1ad0f1dca757fcd2e4f594f5d5197ba647 + - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#e0d14bf04a5051be7f84516b6779afbf9d0a7760 - pypi: https://files.pythonhosted.org/packages/53/fd/4e8f0540608977aea078bf6d79f128e0e2c2bba8af1acf775c30baa70460/lxml-6.0.2-cp313-cp313-macosx_10_13_universal2.whl - pypi: https://files.pythonhosted.org/packages/f2/b3/47473d3f3bda127569e9615416ff24b1049b74cc08540572a9747e00bbe0/manifold3d-3.4.0-cp313-cp313-macosx_11_0_arm64.whl - pypi: https://files.pythonhosted.org/packages/1a/3f/03f23eac9831e7d0d8da3d6993695a9a3724659c94e9997f6b7aaccc199d/mapbox_earcut-2.0.0-cp313-cp313-macosx_11_0_arm64.whl @@ -740,7 +740,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/49/fa/391e437a34e55095173dca5f24070d89cbc233ff85bf1c29c93248c6588d/imageio-2.37.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/69/90/f63fb5873511e014207a475e2bb4e8b2e570d655b00ac19a9a0ca0a385ee/jsonschema-4.26.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/41/45/1a4ed80516f02155c51f51e8cedb3c1902296743db0bbc66608a0db2814f/jsonschema_specifications-2025.9.1-py3-none-any.whl - - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#3307be1ad0f1dca757fcd2e4f594f5d5197ba647 + - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#e0d14bf04a5051be7f84516b6779afbf9d0a7760 - pypi: https://files.pythonhosted.org/packages/d0/34/9e591954939276bb679b73773836c6684c22e56d05980e31d52a9a8deb18/lxml-6.0.2-cp313-cp313-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl - pypi: https://files.pythonhosted.org/packages/44/29/c89ab58a20965d630df347999b55306b146473cadd0fb8b7879c85ca7a54/manifold3d-3.4.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl - pypi: https://files.pythonhosted.org/packages/03/30/e54ececd0403a5495c340b693075abec92a6d17dc44283b6cb059534f7ed/mapbox_earcut-2.0.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl @@ -933,7 +933,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/49/fa/391e437a34e55095173dca5f24070d89cbc233ff85bf1c29c93248c6588d/imageio-2.37.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/69/90/f63fb5873511e014207a475e2bb4e8b2e570d655b00ac19a9a0ca0a385ee/jsonschema-4.26.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/41/45/1a4ed80516f02155c51f51e8cedb3c1902296743db0bbc66608a0db2814f/jsonschema_specifications-2025.9.1-py3-none-any.whl - - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#3307be1ad0f1dca757fcd2e4f594f5d5197ba647 + - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#e0d14bf04a5051be7f84516b6779afbf9d0a7760 - pypi: https://files.pythonhosted.org/packages/5d/f4/2a94a3d3dfd6c6b433501b8d470a1960a20ecce93245cf2db1706adf6c19/lxml-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl - pypi: https://files.pythonhosted.org/packages/68/d0/b1b5a1dc4db9e4ce844d025a72777a5a2251a33c5a84cff7e64ed9425373/manifold3d-3.4.0-cp313-cp313-macosx_10_14_x86_64.whl - pypi: https://files.pythonhosted.org/packages/8b/7c/c5dd5b255b9828ba5df729e62fdd470a322c938f07ef392ca03c0592bb3a/mapbox_earcut-2.0.0-cp313-cp313-macosx_10_13_x86_64.whl @@ -1125,7 +1125,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/49/fa/391e437a34e55095173dca5f24070d89cbc233ff85bf1c29c93248c6588d/imageio-2.37.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/69/90/f63fb5873511e014207a475e2bb4e8b2e570d655b00ac19a9a0ca0a385ee/jsonschema-4.26.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/41/45/1a4ed80516f02155c51f51e8cedb3c1902296743db0bbc66608a0db2814f/jsonschema_specifications-2025.9.1-py3-none-any.whl - - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#3307be1ad0f1dca757fcd2e4f594f5d5197ba647 + - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#e0d14bf04a5051be7f84516b6779afbf9d0a7760 - pypi: https://files.pythonhosted.org/packages/53/fd/4e8f0540608977aea078bf6d79f128e0e2c2bba8af1acf775c30baa70460/lxml-6.0.2-cp313-cp313-macosx_10_13_universal2.whl - pypi: https://files.pythonhosted.org/packages/f2/b3/47473d3f3bda127569e9615416ff24b1049b74cc08540572a9747e00bbe0/manifold3d-3.4.0-cp313-cp313-macosx_11_0_arm64.whl - pypi: https://files.pythonhosted.org/packages/1a/3f/03f23eac9831e7d0d8da3d6993695a9a3724659c94e9997f6b7aaccc199d/mapbox_earcut-2.0.0-cp313-cp313-macosx_11_0_arm64.whl @@ -2831,7 +2831,7 @@ packages: requires_dist: - referencing>=0.31.0 requires_python: '>=3.9' -- pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#3307be1ad0f1dca757fcd2e4f594f5d5197ba647 +- pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#e0d14bf04a5051be7f84516b6779afbf9d0a7760 name: judo-rai version: 0.1.0 requires_dist: diff --git a/pyproject.toml b/pyproject.toml index ddc4e0b..ded3481 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -127,6 +127,12 @@ depends-on = ["build-g1-ext", "build-judo-ext"] cwd = "g1_extensions" cmd = "rm -rf build/" +# Re-resolve the judo-rai git dependency to the latest commit on its tracked +# branch, then rebuild C++ extensions. Use this when the judo branch has new +# commits and `pixi install` keeps installing the old pinned commit. +[tool.pixi.tasks.update-judo] +cmd = "pixi update judo-rai && pixi run clean-build && pixi run build" + # Remove all C++ build artifacts (g1_extensions and judo mujoco_extensions), # the installed extension .so files in site-packages, and Python caches. # Use this when mujoco / judo / pybind11 versions change to avoid stale objects. From ffa561da9e759b7ee66d6d03fa177160ead99e8c Mon Sep 17 00:00:00 2001 From: Duy Ta Date: Thu, 7 May 2026 17:54:02 -0400 Subject: [PATCH 7/9] update lock file --- pixi.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pixi.lock b/pixi.lock index c1c19d4..15b0d61 100644 --- a/pixi.lock +++ b/pixi.lock @@ -160,7 +160,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/49/fa/391e437a34e55095173dca5f24070d89cbc233ff85bf1c29c93248c6588d/imageio-2.37.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/69/90/f63fb5873511e014207a475e2bb4e8b2e570d655b00ac19a9a0ca0a385ee/jsonschema-4.26.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/41/45/1a4ed80516f02155c51f51e8cedb3c1902296743db0bbc66608a0db2814f/jsonschema_specifications-2025.9.1-py3-none-any.whl - - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#e0d14bf04a5051be7f84516b6779afbf9d0a7760 + - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#a2da9f51804ba79881740b5de266991dfbfaed9f - pypi: https://files.pythonhosted.org/packages/d0/34/9e591954939276bb679b73773836c6684c22e56d05980e31d52a9a8deb18/lxml-6.0.2-cp313-cp313-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl - pypi: https://files.pythonhosted.org/packages/44/29/c89ab58a20965d630df347999b55306b146473cadd0fb8b7879c85ca7a54/manifold3d-3.4.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl - pypi: https://files.pythonhosted.org/packages/03/30/e54ececd0403a5495c340b693075abec92a6d17dc44283b6cb059534f7ed/mapbox_earcut-2.0.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl @@ -353,7 +353,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/49/fa/391e437a34e55095173dca5f24070d89cbc233ff85bf1c29c93248c6588d/imageio-2.37.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/69/90/f63fb5873511e014207a475e2bb4e8b2e570d655b00ac19a9a0ca0a385ee/jsonschema-4.26.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/41/45/1a4ed80516f02155c51f51e8cedb3c1902296743db0bbc66608a0db2814f/jsonschema_specifications-2025.9.1-py3-none-any.whl - - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#e0d14bf04a5051be7f84516b6779afbf9d0a7760 + - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#a2da9f51804ba79881740b5de266991dfbfaed9f - pypi: https://files.pythonhosted.org/packages/5d/f4/2a94a3d3dfd6c6b433501b8d470a1960a20ecce93245cf2db1706adf6c19/lxml-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl - pypi: https://files.pythonhosted.org/packages/68/d0/b1b5a1dc4db9e4ce844d025a72777a5a2251a33c5a84cff7e64ed9425373/manifold3d-3.4.0-cp313-cp313-macosx_10_14_x86_64.whl - pypi: https://files.pythonhosted.org/packages/8b/7c/c5dd5b255b9828ba5df729e62fdd470a322c938f07ef392ca03c0592bb3a/mapbox_earcut-2.0.0-cp313-cp313-macosx_10_13_x86_64.whl @@ -545,7 +545,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/49/fa/391e437a34e55095173dca5f24070d89cbc233ff85bf1c29c93248c6588d/imageio-2.37.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/69/90/f63fb5873511e014207a475e2bb4e8b2e570d655b00ac19a9a0ca0a385ee/jsonschema-4.26.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/41/45/1a4ed80516f02155c51f51e8cedb3c1902296743db0bbc66608a0db2814f/jsonschema_specifications-2025.9.1-py3-none-any.whl - - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#e0d14bf04a5051be7f84516b6779afbf9d0a7760 + - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#a2da9f51804ba79881740b5de266991dfbfaed9f - pypi: https://files.pythonhosted.org/packages/53/fd/4e8f0540608977aea078bf6d79f128e0e2c2bba8af1acf775c30baa70460/lxml-6.0.2-cp313-cp313-macosx_10_13_universal2.whl - pypi: https://files.pythonhosted.org/packages/f2/b3/47473d3f3bda127569e9615416ff24b1049b74cc08540572a9747e00bbe0/manifold3d-3.4.0-cp313-cp313-macosx_11_0_arm64.whl - pypi: https://files.pythonhosted.org/packages/1a/3f/03f23eac9831e7d0d8da3d6993695a9a3724659c94e9997f6b7aaccc199d/mapbox_earcut-2.0.0-cp313-cp313-macosx_11_0_arm64.whl @@ -740,7 +740,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/49/fa/391e437a34e55095173dca5f24070d89cbc233ff85bf1c29c93248c6588d/imageio-2.37.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/69/90/f63fb5873511e014207a475e2bb4e8b2e570d655b00ac19a9a0ca0a385ee/jsonschema-4.26.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/41/45/1a4ed80516f02155c51f51e8cedb3c1902296743db0bbc66608a0db2814f/jsonschema_specifications-2025.9.1-py3-none-any.whl - - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#e0d14bf04a5051be7f84516b6779afbf9d0a7760 + - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#a2da9f51804ba79881740b5de266991dfbfaed9f - pypi: https://files.pythonhosted.org/packages/d0/34/9e591954939276bb679b73773836c6684c22e56d05980e31d52a9a8deb18/lxml-6.0.2-cp313-cp313-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl - pypi: https://files.pythonhosted.org/packages/44/29/c89ab58a20965d630df347999b55306b146473cadd0fb8b7879c85ca7a54/manifold3d-3.4.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl - pypi: https://files.pythonhosted.org/packages/03/30/e54ececd0403a5495c340b693075abec92a6d17dc44283b6cb059534f7ed/mapbox_earcut-2.0.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl @@ -933,7 +933,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/49/fa/391e437a34e55095173dca5f24070d89cbc233ff85bf1c29c93248c6588d/imageio-2.37.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/69/90/f63fb5873511e014207a475e2bb4e8b2e570d655b00ac19a9a0ca0a385ee/jsonschema-4.26.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/41/45/1a4ed80516f02155c51f51e8cedb3c1902296743db0bbc66608a0db2814f/jsonschema_specifications-2025.9.1-py3-none-any.whl - - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#e0d14bf04a5051be7f84516b6779afbf9d0a7760 + - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#a2da9f51804ba79881740b5de266991dfbfaed9f - pypi: https://files.pythonhosted.org/packages/5d/f4/2a94a3d3dfd6c6b433501b8d470a1960a20ecce93245cf2db1706adf6c19/lxml-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl - pypi: https://files.pythonhosted.org/packages/68/d0/b1b5a1dc4db9e4ce844d025a72777a5a2251a33c5a84cff7e64ed9425373/manifold3d-3.4.0-cp313-cp313-macosx_10_14_x86_64.whl - pypi: https://files.pythonhosted.org/packages/8b/7c/c5dd5b255b9828ba5df729e62fdd470a322c938f07ef392ca03c0592bb3a/mapbox_earcut-2.0.0-cp313-cp313-macosx_10_13_x86_64.whl @@ -1125,7 +1125,7 @@ environments: - pypi: https://files.pythonhosted.org/packages/49/fa/391e437a34e55095173dca5f24070d89cbc233ff85bf1c29c93248c6588d/imageio-2.37.3-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/69/90/f63fb5873511e014207a475e2bb4e8b2e570d655b00ac19a9a0ca0a385ee/jsonschema-4.26.0-py3-none-any.whl - pypi: https://files.pythonhosted.org/packages/41/45/1a4ed80516f02155c51f51e8cedb3c1902296743db0bbc66608a0db2814f/jsonschema_specifications-2025.9.1-py3-none-any.whl - - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#e0d14bf04a5051be7f84516b6779afbf9d0a7760 + - pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#a2da9f51804ba79881740b5de266991dfbfaed9f - pypi: https://files.pythonhosted.org/packages/53/fd/4e8f0540608977aea078bf6d79f128e0e2c2bba8af1acf775c30baa70460/lxml-6.0.2-cp313-cp313-macosx_10_13_universal2.whl - pypi: https://files.pythonhosted.org/packages/f2/b3/47473d3f3bda127569e9615416ff24b1049b74cc08540572a9747e00bbe0/manifold3d-3.4.0-cp313-cp313-macosx_11_0_arm64.whl - pypi: https://files.pythonhosted.org/packages/1a/3f/03f23eac9831e7d0d8da3d6993695a9a3724659c94e9997f6b7aaccc199d/mapbox_earcut-2.0.0-cp313-cp313-macosx_11_0_arm64.whl @@ -2831,7 +2831,7 @@ packages: requires_dist: - referencing>=0.31.0 requires_python: '>=3.9' -- pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#e0d14bf04a5051be7f84516b6779afbf9d0a7760 +- pypi: git+https://github.com/rai-opensource/judo.git?rev=dta%2Ffix_for_sumo#a2da9f51804ba79881740b5de266991dfbfaed9f name: judo-rai version: 0.1.0 requires_dist: @@ -5956,7 +5956,7 @@ packages: - pypi: ./ name: sumo version: 0.0.1 - sha256: fdadb279c9654192c908a9ac3728a5db5bf6fca7a5cf55052f36f44f2fa68fa7 + sha256: afeaae9ec5d83aedda06fca4132d15682a7ff30fcaec8d1ae0f6c2abee3a76cf requires_dist: - judo-rai @ git+https://github.com/rai-opensource/judo.git@dta/fix_for_sumo - numpy From 43f998e74bbecebf0c57be02377b7d6c1623b892 Mon Sep 17 00:00:00 2001 From: Duy Ta Date: Thu, 7 May 2026 18:13:24 -0400 Subject: [PATCH 8/9] review --- pixi.lock | 3 ++- pyproject.toml | 1 + sumo/tasks/g1/g1_box.py | 4 ++-- sumo/tasks/g1/g1_chair_push.py | 4 ++-- sumo/tasks/g1/g1_door.py | 4 ++-- sumo/tasks/g1/g1_table_push.py | 4 ++-- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/pixi.lock b/pixi.lock index 15b0d61..19c3d15 100644 --- a/pixi.lock +++ b/pixi.lock @@ -5956,7 +5956,7 @@ packages: - pypi: ./ name: sumo version: 0.0.1 - sha256: afeaae9ec5d83aedda06fca4132d15682a7ff30fcaec8d1ae0f6c2abee3a76cf + sha256: 867132b3a5ffdc637c26de5a712f9028e1e8bdbd6c0a01e773ccfee51a930fe6 requires_dist: - judo-rai @ git+https://github.com/rai-opensource/judo.git@dta/fix_for_sumo - numpy @@ -5967,6 +5967,7 @@ packages: - scipy - pytest ; extra == 'dev' - ruff ; extra == 'dev' + requires_python: '>=3.10' - pypi: https://files.pythonhosted.org/packages/3a/83/4f5b250220e1a5acd31345a5ec1c95a7769725d0d8135276f399f44062f8/svg_path-7.0-py2.py3-none-any.whl name: svg-path version: '7.0' diff --git a/pyproject.toml b/pyproject.toml index ded3481..6e270c6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,6 +8,7 @@ allow-direct-references = true [project] name = "sumo" version = "0.0.1" +requires-python = ">=3.10" dependencies = [ "judo-rai @ git+https://github.com/rai-opensource/judo.git@dta/fix_for_sumo", "numpy", diff --git a/sumo/tasks/g1/g1_box.py b/sumo/tasks/g1/g1_box.py index 1e93e25..763420d 100644 --- a/sumo/tasks/g1/g1_box.py +++ b/sumo/tasks/g1/g1_box.py @@ -200,8 +200,8 @@ def success(self, model: MjModel, data: MjData, metadata: dict[str, Any] | None return position_check and velocity_check def failure( - self, model: MjModel, data: MjData, config: G1BoxConfig, metadata: dict[str, Any] | None = None + self, model: MjModel, data: MjData, metadata: dict[str, Any] | None = None ) -> bool: """Check if G1 has fallen.""" body_height = data.qpos[..., self.body_pose_idx[2]] - return bool(body_height <= config.fall_threshold) + return bool(body_height <= self.config.fall_threshold) diff --git a/sumo/tasks/g1/g1_chair_push.py b/sumo/tasks/g1/g1_chair_push.py index e373759..5b54687 100644 --- a/sumo/tasks/g1/g1_chair_push.py +++ b/sumo/tasks/g1/g1_chair_push.py @@ -194,8 +194,8 @@ def success(self, model: MjModel, data: MjData, metadata: dict[str, Any] | None return position_check and velocity_check def failure( - self, model: MjModel, data: MjData, config: G1ChairPushConfig, metadata: dict[str, Any] | None = None + self, model: MjModel, data: MjData, metadata: dict[str, Any] | None = None ) -> bool: """Check if G1 has fallen.""" body_height = data.qpos[..., self.body_pose_idx[2]] - return bool(body_height <= config.fall_threshold) + return bool(body_height <= self.config.fall_threshold) diff --git a/sumo/tasks/g1/g1_door.py b/sumo/tasks/g1/g1_door.py index cf58164..1594080 100644 --- a/sumo/tasks/g1/g1_door.py +++ b/sumo/tasks/g1/g1_door.py @@ -216,8 +216,8 @@ def success(self, model: MjModel, data: MjData, metadata: dict[str, Any] | None return bool(position_check) def failure( - self, model: MjModel, data: MjData, config: G1DoorConfig, metadata: dict[str, Any] | None = None + self, model: MjModel, data: MjData, metadata: dict[str, Any] | None = None ) -> bool: """Check if G1 has fallen.""" body_height = data.qpos[..., self.body_pose_idx[2]] - return bool(body_height <= config.fall_threshold) + return bool(body_height <= self.config.fall_threshold) diff --git a/sumo/tasks/g1/g1_table_push.py b/sumo/tasks/g1/g1_table_push.py index b9f2e81..a3f16fb 100644 --- a/sumo/tasks/g1/g1_table_push.py +++ b/sumo/tasks/g1/g1_table_push.py @@ -187,8 +187,8 @@ def success(self, model: MjModel, data: MjData, metadata: dict[str, Any] | None return position_check and velocity_check def failure( - self, model: MjModel, data: MjData, config: G1TablePushConfig, metadata: dict[str, Any] | None = None + self, model: MjModel, data: MjData, metadata: dict[str, Any] | None = None ) -> bool: """Check if G1 has fallen.""" body_height = data.qpos[..., self.body_pose_idx[2]] - return bool(body_height <= config.fall_threshold) + return bool(body_height <= self.config.fall_threshold) From 3a1ab1298bc0d240c9e04a0c0b3a85110312610e Mon Sep 17 00:00:00 2001 From: Duy Ta Date: Thu, 7 May 2026 18:16:28 -0400 Subject: [PATCH 9/9] precommit --- sumo/tasks/g1/g1_box.py | 4 +--- sumo/tasks/g1/g1_chair_push.py | 4 +--- sumo/tasks/g1/g1_door.py | 4 +--- sumo/tasks/g1/g1_table_push.py | 4 +--- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/sumo/tasks/g1/g1_box.py b/sumo/tasks/g1/g1_box.py index 763420d..1d109c7 100644 --- a/sumo/tasks/g1/g1_box.py +++ b/sumo/tasks/g1/g1_box.py @@ -199,9 +199,7 @@ def success(self, model: MjModel, data: MjData, metadata: dict[str, Any] | None velocity_check = np.linalg.norm(object_vel, axis=-1) < VELOCITY_TOLERANCE return position_check and velocity_check - def failure( - self, model: MjModel, data: MjData, metadata: dict[str, Any] | None = None - ) -> bool: + def failure(self, model: MjModel, data: MjData, metadata: dict[str, Any] | None = None) -> bool: """Check if G1 has fallen.""" body_height = data.qpos[..., self.body_pose_idx[2]] return bool(body_height <= self.config.fall_threshold) diff --git a/sumo/tasks/g1/g1_chair_push.py b/sumo/tasks/g1/g1_chair_push.py index 5b54687..ac1c441 100644 --- a/sumo/tasks/g1/g1_chair_push.py +++ b/sumo/tasks/g1/g1_chair_push.py @@ -193,9 +193,7 @@ def success(self, model: MjModel, data: MjData, metadata: dict[str, Any] | None velocity_check = np.linalg.norm(object_vel, axis=-1) < VELOCITY_TOLERANCE return position_check and velocity_check - def failure( - self, model: MjModel, data: MjData, metadata: dict[str, Any] | None = None - ) -> bool: + def failure(self, model: MjModel, data: MjData, metadata: dict[str, Any] | None = None) -> bool: """Check if G1 has fallen.""" body_height = data.qpos[..., self.body_pose_idx[2]] return bool(body_height <= self.config.fall_threshold) diff --git a/sumo/tasks/g1/g1_door.py b/sumo/tasks/g1/g1_door.py index 1594080..7a1f953 100644 --- a/sumo/tasks/g1/g1_door.py +++ b/sumo/tasks/g1/g1_door.py @@ -215,9 +215,7 @@ def success(self, model: MjModel, data: MjData, metadata: dict[str, Any] | None position_check = np.linalg.norm(body_pos - goal_pos, axis=-1) < POSITION_TOLERANCE return bool(position_check) - def failure( - self, model: MjModel, data: MjData, metadata: dict[str, Any] | None = None - ) -> bool: + def failure(self, model: MjModel, data: MjData, metadata: dict[str, Any] | None = None) -> bool: """Check if G1 has fallen.""" body_height = data.qpos[..., self.body_pose_idx[2]] return bool(body_height <= self.config.fall_threshold) diff --git a/sumo/tasks/g1/g1_table_push.py b/sumo/tasks/g1/g1_table_push.py index a3f16fb..05ba260 100644 --- a/sumo/tasks/g1/g1_table_push.py +++ b/sumo/tasks/g1/g1_table_push.py @@ -186,9 +186,7 @@ def success(self, model: MjModel, data: MjData, metadata: dict[str, Any] | None velocity_check = np.linalg.norm(object_vel, axis=-1) < VELOCITY_TOLERANCE return position_check and velocity_check - def failure( - self, model: MjModel, data: MjData, metadata: dict[str, Any] | None = None - ) -> bool: + def failure(self, model: MjModel, data: MjData, metadata: dict[str, Any] | None = None) -> bool: """Check if G1 has fallen.""" body_height = data.qpos[..., self.body_pose_idx[2]] return bool(body_height <= self.config.fall_threshold)