From ff5e999c74de2cba97542c823f1f087bfe1662fa Mon Sep 17 00:00:00 2001 From: RoboNuke Date: Wed, 9 Oct 2024 17:10:13 -0700 Subject: [PATCH] Added before_simulation_step to dict controller --- mani_skill/agents/controllers/base_controller.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mani_skill/agents/controllers/base_controller.py b/mani_skill/agents/controllers/base_controller.py index e68eb16b3..1aa813de3 100644 --- a/mani_skill/agents/controllers/base_controller.py +++ b/mani_skill/agents/controllers/base_controller.py @@ -208,6 +208,10 @@ def __init__( self.single_action_space, n=self.scene.num_envs ) + def before_simulation_step(self): + for controller in self.controllers.values(): + controller.before_simulation_step() + def _initialize_action_space(self): # Explicitly create a list of key-value tuples # Otherwise, spaces.Dict will sort keys if a dict is provided