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
commit 5ad2942e9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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: