Merge pull request #70 from leokraft/fixes/control_tuning

Fix wrong argument order in tracking controller call
This commit is contained in:
Dominik Roth
2023-10-11 13:35:40 +02:00
committed by GitHub
+2 -2
View File
@@ -31,8 +31,8 @@ ax = fig.add_subplot(1, 1, 1)
img = ax.imshow(env.env.render(mode="rgb_array")) img = ax.imshow(env.env.render(mode="rgb_array"))
fig.show() fig.show()
for t, pos_vel in enumerate(zip(pos, vel)): for t, (des_pos, des_vel) in enumerate(zip(pos, vel)):
actions = env.tracking_controller.get_action(pos_vel[0], pos_vel[1], env.current_vel, env.current_pos) actions = env.tracking_controller.get_action(des_pos, des_vel, env.current_pos, env.current_vel)
actions = np.clip(actions, env.env.action_space.low, env.env.action_space.high) actions = np.clip(actions, env.env.action_space.low, env.env.action_space.high)
_, _, _, _ = env.env.step(actions) _, _, _, _ = env.env.step(actions)
if t % 15 == 0: if t % 15 == 0: