holereacher pmp updates

This commit is contained in:
Maximilian Huettenrauch
2021-04-07 18:18:51 +02:00
parent a3d365033a
commit bafa28edca
3 changed files with 18 additions and 16 deletions
+4 -1
View File
@@ -99,7 +99,10 @@ class HoleReacher(gym.Env):
if self._steps == 199:
reward = - np.linalg.norm(self.end_effector - self.bottom_center_of_hole) ** 2
else:
reward = -self.collision_penalty
if self.collision_penalty != 0:
reward = -self.collision_penalty
else:
reward = - np.linalg.norm(self.end_effector - self.bottom_center_of_hole) ** 2
reward -= 5e-8 * np.sum(acc ** 2)
+3 -3
View File
@@ -134,18 +134,18 @@ def make_holereacher_env_pmp(rank, seed=0):
hole_width=0.15,
hole_depth=1,
hole_x=1,
collision_penalty=1000)
collision_penalty=100)
_env = DetPMPEnvWrapper(_env,
num_dof=5,
num_basis=5,
width=0.005,
width=0.025,
policy_type="velocity",
start_pos=_env.start_pos,
duration=2,
post_traj_time=0,
dt=_env.dt,
weights_scale=0.25,
weights_scale=0.2,
zero_start=True,
zero_goal=False
)