Skip to content

Commit

Permalink
adding tworr with PID and SAC environment, dev, openai#1
Browse files Browse the repository at this point in the history
  • Loading branch information
mahdinobar committed Mar 22, 2024
1 parent eedab2f commit b3950a7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spinup/backup_gym/gym/envs/classic_control/tworr.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ def __init__(self):
self.vyd = 0.05 # m/s
deltax = self.vxd * self.dt * self.MAX_TIMESTEPS
deltay = self.vyd * self.dt * self.MAX_TIMESTEPS
self.xd = np.linspace(self.xd_init, self.xd_init + deltax, MAX_TIMESTEPS + 1, endpoint=True)
self.yd = np.linspace(self.yd_init, self.yd_init + deltay, MAX_TIMESTEPS + 1, endpoint=True)
self.xd = np.linspace(self.xd_init, self.xd_init + deltax, self.MAX_TIMESTEPS + 1, endpoint=True)
self.yd = np.linspace(self.yd_init, self.yd_init + deltay, self.MAX_TIMESTEPS + 1, endpoint=True)

# TODO CHECK
high_s = np.array([0.2, 0.2, 1.5, 1.5, 0.5, 0.5, 1, 1])
Expand Down Expand Up @@ -213,8 +213,8 @@ def seed(self, seed=None):

def reset(self):
# initialize at t=-1
rd_minus1 = np.array([xd[0], yd[0]])
v_minus1 = np.array([vxd, vyd])
rd_minus1 = np.array([self.xd[0], self.yd[0]])
v_minus1 = np.array([self.vxd, self.vyd])
ree_minus1 = rd_minus1
q_hat_soln1, q_hat_soln2 = self.two_link_inverse_kinematics(rd_minus1[0], rd_minus1[1])
q_minus1 = q_hat_soln1
Expand Down

0 comments on commit b3950a7

Please sign in to comment.