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 b3950a7 commit 4754e55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spinup/backup_gym/gym/envs/classic_control/tworr.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def pseudoInverseMat(A, ld):
return pinvA
return pseudoInverseMat(J,ld), J

def two_link_inverse_kinematics_joint_speeds(dxdt, dydt, q1, q2):
def two_link_inverse_kinematics_joint_speeds(self, dxdt, dydt, q1, q2):
"""
given joint positions and end effector cartesian speed, using kinematics, returns joint speeds
"""
Expand All @@ -184,7 +184,7 @@ def two_link_inverse_kinematics_joint_speeds(dxdt, dydt, q1, q2):
dq2dt = (dydt + gama * dq1dt) / beta
return np.array([dq1dt, dq2dt])

def q_command(r_ee, v_ee, Jpinv, rd, vd, e, dt):
def q_command(self, r_ee, v_ee, Jpinv, rd, vd, e, dt):
"""
PID Traj Tracking Feedback Controller
Inputs:
Expand Down

0 comments on commit 4754e55

Please sign in to comment.