diff --git a/alr_envs/utils/mps/mp_wrapper.py b/alr_envs/utils/mps/mp_wrapper.py index c31072f..fc9e0bb 100644 --- a/alr_envs/utils/mps/mp_wrapper.py +++ b/alr_envs/utils/mps/mp_wrapper.py @@ -74,6 +74,7 @@ class MPWrapper(gym.Wrapper, ABC): for t, pos_vel in enumerate(zip(trajectory, velocity)): ac = self.policy.get_action(pos_vel[0], pos_vel[1]) + ac = np.clip(ac, self.env.action_space.low, self.env.action_space.high) obs, rew, done, info = self.env.step(ac) rewards += rew # TODO return all dicts?