diff --git a/fancy_gym/examples/pd_control_gain_tuning.py b/fancy_gym/examples/pd_control_gain_tuning.py index 407bfa1..71a3ba4 100644 --- a/fancy_gym/examples/pd_control_gain_tuning.py +++ b/fancy_gym/examples/pd_control_gain_tuning.py @@ -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: