fix small reacher issues for optimal control
This commit is contained in:
parent
c0502cf1d4
commit
a9460f15fd
@ -89,12 +89,14 @@ class ALRReacherEnv(MujocoEnv, utils.EzPickle):
|
||||
|
||||
class ALRReacherOptCtrlEnv(ALRReacherEnv):
|
||||
def __init__(self, steps_before_reward=200, n_links=5, balance=False):
|
||||
super(ALRReacherOptCtrlEnv, self).__init__(steps_before_reward, n_links, balance)
|
||||
self.goal = np.array([0.1, 0.1])
|
||||
super(ALRReacherOptCtrlEnv, self).__init__(steps_before_reward, n_links, balance)
|
||||
|
||||
def _get_obs(self):
|
||||
theta = self.sim.data.qpos.flat[:self.n_links]
|
||||
tip_pos = self.get_body_com("fingertip")
|
||||
return np.concatenate([
|
||||
tip_pos[:2],
|
||||
theta,
|
||||
self.sim.data.qvel.flat[:self.n_links], # this is angular velocity
|
||||
])
|
||||
|
Loading…
Reference in New Issue
Block a user