mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-01 06:07:08 +00:00
MujocoEnv: Include shape in error message (#83)
This commit is contained in:
@@ -153,7 +153,9 @@ class BaseMujocoEnv(gym.Env):
|
||||
"""
|
||||
# Check control input is contained in the action space
|
||||
if np.array(ctrl).shape != self.action_space.shape:
|
||||
raise ValueError("Action dimension mismatch")
|
||||
raise ValueError(
|
||||
f"Action dimension mismatch. Expected {self.action_space.shape}, found {np.array(ctrl).shape}"
|
||||
)
|
||||
self._step_mujoco_simulation(ctrl, n_frames)
|
||||
|
||||
def close(self):
|
||||
|
Reference in New Issue
Block a user