Added proper action clipping to MP
This commit is contained in:
parent
746d408a76
commit
6b0dfd7c24
@ -74,6 +74,7 @@ class MPWrapper(gym.Wrapper, ABC):
|
|||||||
|
|
||||||
for t, pos_vel in enumerate(zip(trajectory, velocity)):
|
for t, pos_vel in enumerate(zip(trajectory, velocity)):
|
||||||
ac = self.policy.get_action(pos_vel[0], pos_vel[1])
|
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)
|
obs, rew, done, info = self.env.step(ac)
|
||||||
rewards += rew
|
rewards += rew
|
||||||
# TODO return all dicts?
|
# TODO return all dicts?
|
||||||
|
Loading…
Reference in New Issue
Block a user