This commit is contained in:
Michel Breyer 2021-03-12 18:20:52 +01:00
parent 9d95152a4c
commit 3786f86f67
2 changed files with 2 additions and 4 deletions

View File

@ -7,8 +7,8 @@ class CartesianPoseController:
self.x_d = x0
self.kp = np.ones(6) * 5.0
def set_target(self, x_d):
self.x_d = x_d
def set_target(self, pose):
self.x_d = pose
def update(self, q, dq):
x = self.model.pose(q)

View File

@ -6,7 +6,6 @@ from robot_sim import *
from utils import *
# parameters
gui = True
dt = 1.0 / 60.0
@ -22,7 +21,6 @@ controller = CartesianPoseController(model, x0)
marker = InteractiveMarkerWrapper("target", "panda_link0", x0)
# run the control loop
while True:
controller.set_target(marker.pose)
q, dq = env.arm.get_state()