From 19bf8d29b0b0b83fe8a01dd08c4278f715b5d49f Mon Sep 17 00:00:00 2001 From: Ke Wang Date: Wed, 3 Jan 2024 15:38:31 +0000 Subject: [PATCH] fix video recording and seq_len bugs in humanoidamp --- isaacgymenvs/learning/common_agent.py | 3 ++- isaacgymenvs/tasks/amp/humanoid_amp_base.py | 7 +++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/isaacgymenvs/learning/common_agent.py b/isaacgymenvs/learning/common_agent.py index 5a032d7b0..8fc9b2e28 100644 --- a/isaacgymenvs/learning/common_agent.py +++ b/isaacgymenvs/learning/common_agent.py @@ -74,10 +74,11 @@ def __init__(self, base_name, params): self.init_rnn_from_model(self.model) self.last_lr = float(self.last_lr) + self.seq_len = config['seq_len'] self.optimizer = optim.Adam(self.model.parameters(), float(self.last_lr), eps=1e-08, weight_decay=self.weight_decay) - if self.has_central_value: + if self.has_central_value: cv_config = { 'state_shape' : torch_ext.shape_whc_to_cwh(self.state_shape), 'value_size' : self.value_size, diff --git a/isaacgymenvs/tasks/amp/humanoid_amp_base.py b/isaacgymenvs/tasks/amp/humanoid_amp_base.py index 9b1bc5f22..b5a41c36a 100644 --- a/isaacgymenvs/tasks/amp/humanoid_amp_base.py +++ b/isaacgymenvs/tasks/amp/humanoid_amp_base.py @@ -389,12 +389,11 @@ def post_physics_step(self): return - def render(self): + def render(self, mode="rgb_array"): if self.viewer and self.camera_follow: self._update_camera() - - super().render() - return + + return super().render(mode=mode) def _build_key_body_ids_tensor(self, env_ptr, actor_handle): body_ids = []