        if done:
            print("[Task] Task ended during pick. Reward:", reward)
            return

        # Step 2: Place the rubbish into the bin
        print("[Task] Placing 'rubbish' into 'bin' at:", bin_pos)
        try:
            obs, reward, done = place(
                env,
                task,
                bin_pos
            )
        except Exception as e:
            print(f"[Error] place action failed: {e}")
            return
        if done:
            print("[Task] Task completed successfully! Reward:", reward)
        else:
            print("[Task] Task not completed. Final reward:", reward)
    finally:
        shutdown_environment(env)

    print("===== End of Skeleton Task =====")


if __name__ == "__main__":
    run_skeleton_task()