Fix wrong argument order in tracking controller call

This commit is contained in:
Leo Kraft 2023-07-13 19:18:43 +02:00
parent 053a17889f
commit a3df09379e

View File

@ -31,8 +31,8 @@ ax = fig.add_subplot(1, 1, 1)
img = ax.imshow(env.env.render(mode="rgb_array"))
fig.show()
for t, pos_vel in enumerate(zip(pos, vel)):
actions = env.tracking_controller.get_action(pos_vel[0], pos_vel[1], env.current_vel, env.current_pos)
for t, (des_pos, des_vel) in enumerate(zip(pos, vel)):
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)
_, _, _, _ = env.env.step(actions)
if t % 15 == 0: