=== Instruction 1 ===
Is Correct: False
Syntax Pass: False
Code Function: The code defines a function to run a simulation task involving object manipulation. It begins by setting up the environment and resetting the task to its initial state. It optionally initializes video recording for the simulation. The function retrieves the positions of relevant objects, specifically a rubbish item, a bin, and a bottom drawer.

The first step of the task involves pulling the bottom drawer open. If this action is completed successfully, the task proceeds to the next step, which is placing the rubbish into the bin. After attempting to place the rubbish, the function checks if the task is completed and prints the corresponding message. Finally, the environment is shut down to ensure proper cleanup after the task execution. The function is executed when the script is run as the main program.
Similarity: {'ok': False, 'reason': 'LLM JSON parsing failed.'}
Differences: 1. **Nature of Content**: TASK is a formal representation of a planning problem in PDDL (Planning Domain Definition Language), while CODE_FUNC describes a procedural function for simulating a task in a programming context.
2. **Structure**: TASK is structured in terms of domain definitions, types, predicates, and actions, whereas CODE_FUNC is structured as a sequence of procedural steps in a function.
3. **Purpose**: TASK is designed for automated planning and reasoning about actions in a defined domain, while CODE_FUNC is intended for executing a specific simulation task in a programming environment.
4. **Level of Abstraction**: TASK operates at a higher level of abstraction, focusing on the logical relationships and requirements of actions, while CODE_FUNC deals with concrete implementation details and execution flow.
5. **Execution Context**: TASK is meant to be interpreted by a planner or reasoning engine, while CODE_FUNC is meant to be executed in a programming runtime environment.
6. **Action Representation**: In TASK, actions are defined with preconditions and effects, while CODE_FUNC describes actions in a linear sequence without formal preconditions and effects.
7. **Error Handling**: TASK does not explicitly handle errors or exceptions, while CODE_FUNC may include checks for successful completion and error messages.
8. **Initialization**: TASK initializes the state of the world through the `:init` section, while CODE_FUNC initializes the environment and resets the task programmatically.
9. **Output**: TASK does not produce output in the traditional sense; it defines states and transitions, while CODE_FUNC includes print statements to provide feedback on task completion.
10. **Environment Management**: TASK does not include any cleanup or shutdown procedures, while CODE_FUNC explicitly shuts down the environment after task execution.

Refined Code Generated:
-------------------
import numpy as np
from pyrep.objects.shape import Shape
from pyrep.objects.proximity_sensor import ProximitySensor

from env import setup_environment, shutdown_environment
from skill_code import pull, place
from video import init_video_writers, recording_step, recording_get_observation
from object_positions import get_object_positions

def run_skeleton_task():
    '''Generic skeleton for running any task in your simulation.'''
    print("===== Starting Skeleton Task =====")
    
    # === Environment Setup ===
    env, task = setup_environment()
    try:
        # Reset the task to its initial state
        descriptions, obs = task.reset()

        # (Optional) Initialize video writers for capturing your simulation
        init_video_writers(obs)

        # Wrap the task steps for recording (if needed)
        original_step = task.step
        task.step = recording_step(original_step)
        original_get_obs = task.get_observation
        task.get_observation = recording_get_observation(original_get_obs)

        # === Retrieve Object Positions ===
        positions = get_object_positions()

        # Define object positions
        rubbish_pos = positions['item3']  # Assuming item3 is the rubbish
        bin_pos = positions['bin']  # Assuming bin is the target for rubbish
        bottom_anchor_pos = positions['bottom_anchor_pos']  # Position for the bottom drawer

        # Step 1: Pull the bottom drawer open
        print("[Task] Pulling the bottom drawer open.")
        obs, reward, done = pull(
            env,
            task,
            pull_distance=0.1,  # Adjust as necessary for the simulation
            pull_axis='y',  # Assuming pulling along the y-axis
            max_steps=100,
            threshold=0.01,
            timeout=10.0
        )
        if done:
            print("[Task] Task ended after pulling the drawer!")
            return

        # Step 2: Place the rubbish in the bin
        print("[Task] Placing rubbish in the bin.")
        obs, reward, done = place(
            env,
            task,
            target_pos=bin_pos,
            approach_distance=0.15,
            max_steps=100,
            threshold=0.01,
            approach_axis='z',
            timeout=10.0
        )
        if done:
            print("[Task] Task completed successfully! Reward:", reward)
        else:
            print("[Task] Task not completed yet (done=False).")

    finally:
        # Always ensure the environment is properly shutdown
        shutdown_environment(env)

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

=== Instruction 2 ===
Is Correct: False
Syntax Pass: False
Code Function: The code defines a function to run a simulation task involving object manipulation. It begins by setting up the environment and resetting the task to its initial state. It optionally initializes video recording for the simulation. The function retrieves the positions of various objects, including drawers and a bin.

The task involves two main steps: first, it attempts to pull open a series of drawers (bottom, middle, and top) in order, checking if each one can be successfully opened. If all drawers are locked or cannot be pulled, it reports the failure. 

The second step involves placing rubbish into a designated bin, with a check to confirm if the action is successful. Finally, the environment is shut down properly, and the task concludes with a message indicating the end of the simulation.
Similarity: {'ok': False, 'reason': 'LLM JSON parsing failed.'}
Differences: 1. **Purpose**: 
   - **TASK**: Describes a specific sequence of actions to be performed (pulling open drawers and dropping rubbish).
   - **CODE_FUNC**: Describes a function that implements a simulation of the task, including setup, execution, and shutdown.

2. **Structure**: 
   - **TASK**: Presented in a natural language instruction format.
   - **CODE_FUNC**: Presented in a programming context, detailing the function's logic and flow.

3. **Detail Level**: 
   - **TASK**: Provides high-level instructions without implementation details.
   - **CODE_FUNC**: Includes specific implementation details, such as environment setup, state management, and error handling.

4. **Execution Context**: 
   - **TASK**: Implies a direct execution of actions in a physical or simulated environment.
   - **CODE_FUNC**: Implies a structured execution within a programming environment, including function calls and state management.

5. **Error Handling**: 
   - **TASK**: Does not mention error handling or failure conditions.
   - **CODE_FUNC**: Includes checks for success or failure of actions (e.g., whether drawers can be opened).

6. **Output**: 
   - **TASK**: Does not specify any output or feedback mechanism.
   - **CODE_FUNC**: Concludes with a message indicating the end of the simulation, providing feedback on the task's completion.

7. **Initialization**: 
   - **TASK**: Assumes an initial state without detailing how it is set up.
   - **CODE_FUNC**: Explicitly initializes the environment and resets the task state.

8. **Recording**: 
   - **TASK**: Does not mention any recording or monitoring of the task.
   - **CODE_FUNC**: Optionally initializes video recording for the simulation.

9. **Object Interaction**: 
   - **TASK**: Focuses on the actions to be taken with objects (pulling drawers, dropping rubbish).
   - **CODE_FUNC**: Describes the retrieval of object positions and the sequence of interactions in a more detailed manner.

10. **Sequential Logic**: 
    - **TASK**: Implies a straightforward sequence of actions.
    - **CODE_FUNC**: Details the logic of attempting to pull drawers in order and handling the outcome of each attempt.

11. **Finalization**: 
    - **TASK**: Does not mention any finalization steps.
    - **CODE_FUNC**: Includes a shutdown procedure for the environment after task completion.

12. **Terminology**: 
    - **TASK**: Uses general terms (e.g., "pull open any drawer").
    - **CODE_FUNC**: Uses specific programming and simulation terminology (e.g., "resetting the task", "reporting failure").

In summary, the two representations serve different purposes and contexts, with the TASK being a high-level instruction and the CODE_FUNC providing a detailed implementation of that instruction in a programming environment.

Refined Code Generated:
-------------------
import numpy as np
from pyrep.objects.shape import Shape
from pyrep.objects.proximity_sensor import ProximitySensor

from env import setup_environment, shutdown_environment
from skill_code import *  
from video import init_video_writers, recording_step, recording_get_observation
from object_positions import get_object_positions

def run_skeleton_task():
    '''Generic skeleton for running any task in your simulation.'''
    print("===== Starting Skeleton Task =====")
    
    env, task = setup_environment()
    try:
        descriptions, obs = task.reset()

        init_video_writers(obs)

        original_step = task.step
        task.step = recording_step(original_step)
        original_get_obs = task.get_observation
        task.get_observation = recording_get_observation(original_get_obs)

        positions = get_object_positions()

        rubbish_pos = positions['item3']  
        bin_pos = positions['bin']

        # Step 1: Pull open any drawer that is not locked
        for drawer in ['bottom', 'middle', 'top']:
            print(f"[Task] Attempting to pull the {drawer} drawer.")
            obs, reward, done = pull(env, task, pull_distance=0.1, pull_axis='y', max_steps=100, threshold=0.01, timeout=10.0)
            if done:
                print(f"[Task] {drawer.capitalize()} drawer pulled successfully!")
                break
        else:
            print("[Task] All drawers are locked or could not be pulled.")

        # Step 2: Drop the rubbish into the bin
        print("[Task] Placing rubbish into the bin.")
        obs, reward, done = place(env, task, target_pos=bin_pos, approach_distance=0.15, max_steps=100, threshold=0.01, approach_axis='z', timeout=10.0)
        if done:
            print("[Task] Rubbish placed successfully into the bin!")
        else:
            print("[Task] Failed to place rubbish into the bin.")

    finally:
        shutdown_environment(env)

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

if __name__ == "__main__":
    run_skeleton_task()
-------------------

=== Instruction 3 ===
Is Correct: False
Syntax Pass: False
Code Function: The code defines a function to run a simulation task involving object manipulation. It begins by setting up the environment and resetting the task to its initial state. It optionally initializes video recording for the simulation. The function retrieves the positions of specific objects, including rubbish, a bin, and a drawer. 

The task consists of three main steps: first, it pulls open a drawer; second, it picks up rubbish from a specified position; and third, it places the rubbish into a bin. After each step, it checks if the task is completed and prints appropriate messages. Finally, it ensures that the environment is properly shut down after the task execution. The function is executed when the script is run as the main program.
Similarity: {'ok': False, 'reason': 'LLM JSON parsing failed.'}
Differences: 1. **Purpose**: 
   - TASK describes a specific sequence of actions to be performed (selecting a drawer, picking up rubbish, and disposing of it).
   - CODE_FUNC outlines a function that simulates the execution of the TASK, including setup, execution, and shutdown.

2. **Structure**: 
   - TASK is presented in a PDDL format, defining actions, predicates, and the domain.
   - CODE_FUNC is described in a narrative format, detailing the function's purpose and steps without formal syntax.

3. **Execution Context**: 
   - TASK is a declarative representation of actions and their conditions in a planning domain.
   - CODE_FUNC is an imperative representation that describes how to implement the task programmatically.

4. **Detail Level**: 
   - TASK includes detailed preconditions and effects for each action, specifying the state changes in the environment.
   - CODE_FUNC provides a high-level overview of the steps without detailing the underlying conditions or effects.

5. **Action Specification**: 
   - TASK specifies actions like `pick`, `place`, `pull`, and their parameters in a structured way.
   - CODE_FUNC describes the actions in a more general sense without specifying parameters or conditions.

6. **Environment Interaction**: 
   - TASK defines how the robot interacts with objects and the environment through predicates and actions.
   - CODE_FUNC describes the simulation of these interactions but does not define the interactions formally.

7. **Output**: 
   - TASK does not specify any output or feedback mechanism.
   - CODE_FUNC mentions printing messages to indicate task completion and status.

8. **Initialization**: 
   - TASK does not include initialization steps; it assumes a predefined state.
   - CODE_FUNC explicitly mentions resetting the environment and initializing video recording.

9. **Shutdown Procedure**: 
   - TASK does not include any shutdown or cleanup procedures.
   - CODE_FUNC ensures that the environment is properly shut down after task execution.

10. **Execution Trigger**: 
    - TASK is a static definition that can be used by a planner.
    - CODE_FUNC is designed to be executed as a script, indicating a dynamic execution context.

In summary, the semantic differences between TASK and CODE_FUNC are significant, as they serve different purposes and are structured differently.

Refined Code Generated:
-------------------
import numpy as np
from pyrep.objects.shape import Shape
from pyrep.objects.proximity_sensor import ProximitySensor

from env import setup_environment, shutdown_environment
from skill_code import *
from video import init_video_writers, recording_step, recording_get_observation
from object_positions import get_object_positions

def run_skeleton_task():
    '''Generic skeleton for running any task in your simulation.'''
    print("===== Starting Skeleton Task =====")
    
    # === Environment Setup ===
    env, task = setup_environment()
    try:
        # Reset the task to its initial state
        _, obs = task.reset()

        # (Optional) Initialize video writers for capturing your simulation
        init_video_writers(obs)

        # Wrap the task steps for recording (if needed)
        original_step = task.step
        task.step = recording_step(original_step)
        original_get_obs = task.get_observation
        task.get_observation = recording_get_observation(original_get_obs)

        # === Retrieve Object Positions ===
        positions = get_object_positions()

        # Define object positions
        rubbish_pos = positions['item3']  # Assuming item3 is the rubbish
        bin_pos = positions['bin']  # Assuming bin is the trash can
        drawer_pos = positions['bottom_anchor_pos']  # Assuming we are using the bottom drawer

        # Step 1: Pull the drawer open
        print("[Task] Pulling the drawer open.")
        obs, reward, done = pull(env, task, pull_distance=0.1, pull_axis='y', max_steps=100, threshold=0.01, timeout=10.0)
        if done:
            print("[Task] Task ended after pulling the drawer!")
            return

        # Step 2: Pick up the rubbish
        print("[Task] Picking up the rubbish.")
        obs, reward, done = pick(env, task, target_pos=rubbish_pos, approach_distance=0.15, max_steps=100, threshold=0.01, approach_axis='z', timeout=10.0)
        if done:
            print("[Task] Task ended after picking up the rubbish!")
            return

        # Step 3: Place the rubbish in the bin
        print("[Task] Placing the rubbish in the bin.")
        obs, reward, done = place(env, task, target_pos=bin_pos, approach_distance=0.15, max_steps=100, threshold=0.01, approach_axis='z', timeout=10.0)
        if done:
            print("[Task] Task completed successfully! Reward:", reward)
        else:
            print("[Task] Task not completed yet (done=False).")

    finally:
        # Always ensure the environment is properly shutdown
        shutdown_environment(env)

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

if __name__ == "__main__":
    run_skeleton_task()
-------------------

=== Instruction 4 ===
Is Correct: False
Syntax Pass: False
Code Function: The code defines a function to run a simulation task in a robotic environment. It begins by setting up the environment and resetting the task to its initial state. It optionally initializes video recording for the simulation. The function retrieves the positions of objects in the environment, specifically identifying the location of rubbish and a bin. 

The task consists of three main steps: first, it pulls a drawer to unlock a cabinet; second, it picks up the rubbish; and third, it places the rubbish into the bin. After each step, it checks if the task is completed and prints appropriate messages. Finally, it ensures that the environment is properly shut down after the task execution. The function is executed when the script is run as the main program.
Similarity: {'ok': False, 'reason': 'LLM JSON parsing failed.'}
Differences: 1. **Purpose**: 
   - TASK describes a high-level instruction for a robot to perform specific actions (unlocking a cabinet and disposing of trash).
   - CODE_FUNC outlines a function that implements a simulation of the TASK in a robotic environment.

2. **Structure**: 
   - TASK is presented in a natural language format with a clear sequence of actions.
   - CODE_FUNC is structured as a programming function with defined parameters, logic, and control flow.

3. **Detail Level**: 
   - TASK provides a general overview of what needs to be done without specifying how to achieve it.
   - CODE_FUNC includes specific implementation details, such as initializing the environment, checking task completion, and managing video recording.

4. **Execution Context**: 
   - TASK is a conceptual instruction that can be interpreted and executed by a robot.
   - CODE_FUNC is a concrete implementation that runs in a programming environment, requiring a specific setup to execute.

5. **Action Sequence**: 
   - TASK specifies the actions in a sequential manner (unlocking, throwing away trash).
   - CODE_FUNC describes the actions as part of a function that may include additional steps like checking conditions and printing messages.

6. **Feedback Mechanism**: 
   - TASK does not include any feedback or confirmation of actions taken.
   - CODE_FUNC includes checks for task completion and prints messages to indicate progress.

7. **Environment Interaction**: 
   - TASK assumes the existence of an environment where the actions can be performed.
   - CODE_FUNC explicitly sets up and manages the environment for the simulation.

8. **Error Handling**: 
   - TASK does not address error handling or exceptions.
   - CODE_FUNC may include implicit error handling through checks and conditions during execution.

9. **Output**: 
   - TASK does not produce any output; it is purely an instruction.
   - CODE_FUNC may produce output in the form of printed messages and potentially video recordings.

10. **Implementation Language**: 
    - TASK is written in natural language.
    - CODE_FUNC is written in a programming language (presumably Python or similar).

11. **State Management**: 
    - TASK does not manage or track the state of the environment or objects.
    - CODE_FUNC includes state management by initializing and resetting the environment and tracking object positions.

12. **Completeness**: 
    - TASK is a high-level overview and may lack details necessary for implementation.
    - CODE_FUNC provides a complete implementation of the task, including setup, execution, and teardown.

13. **Modularity**: 
    - TASK is a single instruction without modular components.
    - CODE_FUNC may be part of a larger codebase and can be modular, allowing for reuse and integration with other functions.

14. **User Interaction**: 
    - TASK does not involve user interaction.
    - CODE_FUNC may involve user interaction if it includes prompts or responses during execution.

15. **Focus**: 
    - TASK focuses on the "what" of the actions to be performed.
    - CODE_FUNC focuses on the "how" of executing those actions in a simulated environment.

In summary, the semantic differences between TASK and CODE_FUNC are significant, as TASK is a high-level instruction while CODE_FUNC is a detailed implementation of that instruction in a programming context.

Refined Code Generated:
-------------------
import numpy as np
from pyrep.objects.shape import Shape
from pyrep.objects.proximity_sensor import ProximitySensor

from env import setup_environment, shutdown_environment
from skill_code import pick, place, pull
from video import init_video_writers, recording_step, recording_get_observation
from object_positions import get_object_positions

def run_skeleton_task():
    '''Generic skeleton for running any task in your simulation.'''
    print("===== Starting Skeleton Task =====")
    
    # === Environment Setup ===
    env, task = setup_environment()
    try:
        # Reset the task to its initial state
        _, obs = task.reset()

        # (Optional) Initialize video writers for capturing your simulation
        init_video_writers(obs)

        # Wrap the task steps for recording (if needed)
        original_step = task.step
        task.step = recording_step(original_step)
        original_get_obs = task.get_observation
        task.get_observation = recording_get_observation(original_get_obs)

        # === Retrieve Object Positions ===
        positions = get_object_positions()

        # Define object positions
        rubbish_pos = positions['item1']  # Assuming item1 is the rubbish
        bin_pos = positions['bin']  # Assuming bin is the target for rubbish

        # === Execute the Plan ===
        # Step 1: Pull the drawer to unlock the cabinet
        print("[Task] Pulling the drawer to unlock the cabinet.")
        obs, reward, done = pull(env, task, pull_distance=0.1, pull_axis='y')  # Adjust distance and axis as needed
        if done:
            print("[Task] Task ended after pulling the drawer!")
            return

        # Step 2: Pick up the rubbish
        print("[Task] Picking up the rubbish.")
        obs, reward, done = pick(env, task, target_pos=rubbish_pos, approach_distance=0.15)
        if done:
            print("[Task] Task ended after picking up the rubbish!")
            return

        # Step 3: Place the rubbish in the bin
        print("[Task] Placing the rubbish in the bin.")
        obs, reward, done = place(env, task, target_pos=bin_pos, approach_distance=0.15)
        if done:
            print("[Task] Task completed successfully! Reward:", reward)
        else:
            print("[Task] Task not completed yet (done=False).")

    finally:
        # Always ensure the environment is properly shutdown
        shutdown_environment(env)

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

=== Instruction 5 ===
Is Correct: False
Syntax Pass: False
Code Function: The code defines a function to run a simulation task that involves interacting with objects in an environment. It begins by setting up the environment and resetting the task to its initial state. It optionally initializes video recording for the simulation. The function retrieves the positions of relevant objects, including rubbish, a bin, and a gripper.

The task consists of three main steps: first, it attempts to pull open a drawer; second, it picks up rubbish from a table; and third, it places the rubbish into a bin. After each action, it checks if the action was successful and prints the corresponding message. Finally, the environment is shut down to ensure proper cleanup after the task is completed. The function is executed when the script is run directly.
Similarity: {'ok': False, 'reason': 'LLM JSON parsing failed.'}
Differences: 1. **Purpose**: 
   - **TASK**: Describes a specific instruction for a robot to perform a sequence of actions involving drawers and rubbish.
   - **CODE_FUNC**: Describes a function that implements a simulation of the task, including setup, execution, and cleanup.

2. **Structure**: 
   - **TASK**: Presented in a PDDL (Planning Domain Definition Language) format, defining actions, predicates, and the problem domain.
   - **CODE_FUNC**: Described in a narrative format, outlining the steps of a function without formal PDDL structure.

3. **Detail Level**: 
   - **TASK**: Provides detailed definitions of actions, preconditions, and effects in a formalized manner.
   - **CODE_FUNC**: Summarizes the task steps without detailing the underlying logic or conditions for each action.

4. **Execution Context**: 
   - **TASK**: Focuses on the planning aspect of the robot's actions, defining how the robot should behave in a given scenario.
   - **CODE_FUNC**: Focuses on the execution of the task in a simulated environment, including setup and teardown processes.

5. **Action Specification**: 
   - **TASK**: Specifies actions like `pick`, `place`, `pull`, and their conditions in a structured way.
   - **CODE_FUNC**: Mentions actions in a more general sense without detailing the conditions or effects associated with them.

6. **Outcome Handling**: 
   - **TASK**: Does not specify how to handle the outcomes of actions beyond their effects.
   - **CODE_FUNC**: Includes checks for the success of actions and prints messages based on those outcomes.

7. **Environment Interaction**: 
   - **TASK**: Focuses on the logical representation of actions and states in a planning domain.
   - **CODE_FUNC**: Describes the interaction with the environment, including the initialization of video recording and cleanup.

8. **Language and Format**: 
   - **TASK**: Uses formal PDDL syntax and terminology.
   - **CODE_FUNC**: Uses informal descriptive language to explain the function's purpose and steps.

9. **Initialization**: 
   - **TASK**: Initialization is implied through the PDDL problem definition.
   - **CODE_FUNC**: Explicitly mentions resetting the task to its initial state and setting up the environment.

10. **Finalization**: 
    - **TASK**: Does not include a finalization step.
    - **CODE_FUNC**: Includes a step to shut down the environment after task completion.

In summary, the two representations serve different purposes: one is for planning and defining actions in a formalized way, while the other is for executing those actions in a simulated environment.

Refined Code Generated:
-------------------
import numpy as np
from pyrep.objects.shape import Shape
from pyrep.objects.proximity_sensor import ProximitySensor

from env import setup_environment, shutdown_environment
from skill_code import *
from video import init_video_writers, recording_step, recording_get_observation
from object_positions import get_object_positions

def run_skeleton_task():
    '''Generic skeleton for running any task in your simulation.'''
    print("===== Starting Skeleton Task =====")
    
    # === Environment Setup ===
    env, task = setup_environment()
    try:
        # Reset the task to its initial state
        _, obs = task.reset()

        # (Optional) Initialize video writers for capturing your simulation
        init_video_writers(obs)

        # Wrap the task steps for recording (if needed)
        original_step = task.step
        task.step = recording_step(original_step)
        original_get_obs = task.get_observation
        task.get_observation = recording_get_observation(original_get_obs)

        # === Retrieve Object Positions ===
        positions = get_object_positions()

        # Define object positions
        rubbish_pos = positions['item1']  # Assuming 'item1' is the rubbish
        bin_pos = positions['bin']  # Assuming 'bin' is the disposal location
        gripper_pos = positions['gripper']  # Assuming 'gripper' is the gripper position

        # Step 1: Pull open any available drawer
        print("[Task] Pulling open the drawer.")
        obs, _, done = pull(env, task, pull_distance=0.1, pull_axis='y')  # Adjust pull distance and axis as needed
        if done:
            print("[Task] Drawer opened successfully!")
        else:
            print("[Task] Failed to open the drawer.")

        # Step 2: Pick up the rubbish from the table
        print("[Task] Picking up the rubbish.")
        obs, _, done = pick(env, task, target_pos=rubbish_pos, approach_distance=0.15)
        if done:
            print("[Task] Rubbish picked successfully!")
        else:
            print("[Task] Failed to pick up the rubbish.")

        # Step 3: Place the rubbish in the bin
        print("[Task] Placing the rubbish in the bin.")
        obs, _, done = place(env, task, target_pos=bin_pos, approach_distance=0.15)
        if done:
            print("[Task] Rubbish placed in the bin successfully!")
        else:
            print("[Task] Failed to place the rubbish in the bin.")

    finally:
        # Always ensure the environment is properly shutdown
        shutdown_environment(env)

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

if __name__ == "__main__":
    run_skeleton_task()
-------------------

