=== Instruction 1 ===
Is Correct: False
Syntax Pass: False
Code Function: The code defines a function to run a simulation task involving picking and placing items. It begins by setting up the environment and resetting the task to its initial state. Video recording is optionally initialized to capture the simulation. The function retrieves the positions of various objects, including two items and a plate.

The task consists of a series of steps where the program picks up items from a table and places them on a plate. Specifically, it first picks "item1," places it on the plate, then picks "tomato1," places it on the plate, followed by picking "item2" and placing it on the plate. After each action, the function checks if the task is completed and prints appropriate messages. Finally, the environment is shut down to ensure proper cleanup after the task execution.
Similarity: {'ok': False, 'reason': 'LLM JSON parsing failed.'}
Differences: 1. **Purpose**: TASK describes a high-level instruction for a robot to perform, while CODE_FUNC outlines a specific implementation of that instruction in a programming context.
2. **Level of Abstraction**: TASK is an abstract directive without implementation details, whereas CODE_FUNC provides a concrete sequence of operations and logic to achieve the task.
3. **Context**: TASK is presented in a planning domain definition language (PDDL) format, focusing on the planning aspects of robot actions. CODE_FUNC is written in a programming language context, detailing the execution of the task.
4. **Components**: TASK includes definitions of actions, predicates, and initial conditions in a PDDL domain, while CODE_FUNC includes procedural steps, function calls, and possibly error handling.
5. **Execution Flow**: TASK does not specify the order of actions beyond the instruction, while CODE_FUNC explicitly outlines the sequence of picking and placing items.
6. **Environment Setup**: TASK defines the initial state of the environment in terms of predicates, while CODE_FUNC describes the setup and reset of the simulation environment programmatically.
7. **Output Handling**: TASK does not mention any output or feedback mechanism, while CODE_FUNC includes checks for task completion and prints messages based on the execution status.
8. **Simulation Aspect**: CODE_FUNC explicitly mentions video recording and simulation management, which is not present in TASK.

Overall, the two serve different purposes and operate at different levels of detail and abstraction.

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
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
        item1_pos = positions['item1']
        item2_pos = positions['item2']
        tomato1_pos = positions['tomato1']
        plate_pos = positions['plate']

        # === Execute the Plan ===
        # Step 1: Pick item1 from the table
        print("[Task] Picking item1 from the table.")
        obs, reward, done = pick(
            env,
            task,
            target_pos=item1_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 item1!")
            return

        # Step 2: Place item1 on the plate
        print("[Task] Placing item1 on the plate.")
        obs, reward, done = place(
            env,
            task,
            target_pos=plate_pos,
            approach_distance=0.15,
            max_steps=100,
            threshold=0.01,
            approach_axis='z',
            timeout=10.0
        )
        if done:
            print("[Task] Task ended after placing item1!")
            return

        # Step 3: Pick tomato1 from the table
        print("[Task] Picking tomato1 from the table.")
        obs, reward, done = pick(
            env,
            task,
            target_pos=tomato1_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 tomato1!")
            return

        # Step 4: Place tomato1 on the plate
        print("[Task] Placing tomato1 on the plate.")
        obs, reward, done = place(
            env,
            task,
            target_pos=plate_pos,
            approach_distance=0.15,
            max_steps=100,
            threshold=0.01,
            approach_axis='z',
            timeout=10.0
        )
        if done:
            print("[Task] Task ended after placing tomato1!")
            return

        # Step 5: Pick item2 from the table
        print("[Task] Picking item2 from the table.")
        obs, reward, done = pick(
            env,
            task,
            target_pos=item2_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 item2!")
            return

        # Step 6: Place item2 on the plate
        print("[Task] Placing item2 on the plate.")
        obs, reward, done = place(
            env,
            task,
            target_pos=plate_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 picking and placing objects. It begins by setting up the environment and resetting the task to its initial state. It initializes video recording capabilities to capture the simulation. The function retrieves the positions of objects, specifically two tomatoes and a plate. 

The task consists of four main steps: first, it picks the first tomato from the table; second, it places that tomato onto the plate; third, it picks the second tomato from the table; and finally, it places the second tomato onto the plate. After each action, it checks if the task is completed and prints appropriate messages. 

Regardless of the outcome, the environment is shut down at the end of the task. 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 defines a specific instruction for a robot to follow, while CODE_FUNC describes a function that implements a simulation of that instruction.
2. **Structure**: TASK is structured in PDDL (Planning Domain Definition Language) format, focusing on actions, preconditions, and effects, whereas CODE_FUNC is written in a programming language format, detailing the steps of a simulation.
3. **Level of Abstraction**: TASK operates at a higher level of abstraction, specifying what needs to be done without detailing how it is done. CODE_FUNC provides a concrete implementation of the task, detailing the steps and logic involved.
4. **Execution Context**: TASK is a theoretical construct meant for planning and reasoning about actions, while CODE_FUNC is an executable piece of code that runs a simulation.
5. **Output**: TASK does not specify any output or feedback mechanism, while CODE_FUNC includes checks and messages to indicate the status of the task after each action.
6. **Environment Setup**: TASK assumes an environment defined by PDDL, while CODE_FUNC explicitly initializes the environment and sets up video recording capabilities.
7. **Object Handling**: TASK describes the actions in terms of predicates and effects, while CODE_FUNC describes the actions in terms of function calls and procedural steps.
8. **Completion Check**: TASK does not include any mechanism for checking if the task is completed, whereas CODE_FUNC includes checks after each action to determine if the task is finished.

Overall, the two serve different purposes and operate at different levels of abstraction and implementation.

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
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
        tomato1_pos = positions['tomato1']
        tomato2_pos = positions['tomato2']
        plate_pos = positions['plate']

        # === Execute the Plan ===
        # Step 1: Pick tomato1 from the table
        print("[Task] Picking tomato1 from the table.")
        obs, reward, done = pick(
            env,
            task,
            target_pos=tomato1_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 tomato1!")
            return

        # Step 2: Place tomato1 onto the plate
        print("[Task] Placing tomato1 onto the plate.")
        obs, reward, done = place(
            env,
            task,
            target_pos=plate_pos,
            approach_distance=0.15,
            max_steps=100,
            threshold=0.01,
            approach_axis='z',
            timeout=10.0
        )
        if done:
            print("[Task] Task ended after placing tomato1!")
            return

        # Step 3: Pick tomato2 from the table
        print("[Task] Picking tomato2 from the table.")
        obs, reward, done = pick(
            env,
            task,
            target_pos=tomato2_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 tomato2!")
            return

        # Step 4: Place tomato2 onto the plate
        print("[Task] Placing tomato2 onto the plate.")
        obs, reward, done = place(
            env,
            task,
            target_pos=plate_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 3 ===
Is Correct: False
Syntax Pass: False
Code Function: The code defines a function to run a simulation task involving picking up an object and placing it in a designated location. 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, namely a tomato and a plate. 

The task consists of two main steps: first, it picks up the tomato from its initial position, and if successful, it then places the tomato onto the plate. After each action, it checks if the task is completed and prints relevant 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 instruction for a robot to perform (picking up tomatoes and placing them on a plate).
   - CODE_FUNC outlines a function that implements a simulation of the task, including setup, execution, and shutdown.

2. **Structure**: 
   - TASK is defined in a PDDL format, which is a formal language for describing planning problems.
   - CODE_FUNC is a description of a procedural function that likely uses a programming language (not specified) to execute the task.

3. **Detail Level**: 
   - TASK provides a high-level description of the actions and their preconditions/effects in a planning context.
   - CODE_FUNC includes implementation details such as environment setup, video recording, and task completion checks.

4. **Execution Context**: 
   - TASK is a theoretical model that can be used in planning algorithms.
   - CODE_FUNC is a practical implementation that runs in a specific programming environment.

5. **Feedback Mechanism**: 
   - TASK does not specify any feedback or output mechanism.
   - CODE_FUNC includes checks for task completion and prints relevant messages.

6. **Environment Management**: 
   - TASK does not address how the environment is managed or reset.
   - CODE_FUNC explicitly mentions resetting the environment and shutting it down after execution.

7. **Object Handling**: 
   - TASK focuses on the logical representation of objects and their states.
   - CODE_FUNC describes the procedural steps for handling objects during the simulation.

8. **Initialization**: 
   - TASK initializes the state of the world through PDDL's `:init` section.
   - CODE_FUNC mentions optional initialization of video recording, which is not present in TASK.

9. **Action Sequence**: 
   - TASK defines actions in a general sense (pick and place).
   - CODE_FUNC specifies the sequence of actions as part of a simulation, including success checks.

10. **Execution Trigger**: 
    - TASK does not specify how or when the actions are triggered.
    - CODE_FUNC states that the function is executed when the script is run as the main program.

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
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
        tomato1_pos = positions['tomato1']
        plate_pos = positions['plate']

        # === Execute Task Plan ===
        # Step 1: Pick up the tomato1
        print("[Task] Picking up tomato1 at:", tomato1_pos)
        obs, reward, done = pick(
            env,
            task,
            target_pos=tomato1_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 tomato1!")
            return

        # Step 2: Place the tomato1 on the plate
        print("[Task] Placing tomato1 on plate at:", plate_pos)
        obs, reward, done = place(
            env,
            task,
            target_pos=plate_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 4 ===
Is Correct: False
Syntax Pass: False
Code Function: The code defines a function to run a simulation task involving picking and placing objects. It begins by setting up the environment and resetting the task to its initial state. Video recording is initialized to capture the simulation. The positions of objects, specifically two tomatoes and a plate, are retrieved. 

The task consists of four main steps: first, it picks the first tomato from the table; second, it places that tomato onto the plate; third, it picks the second tomato from the table; and finally, it places the second tomato onto the plate. After each action, the code checks if the task is completed and prints appropriate messages. 

Regardless of the outcome, the environment is shut down at the end of the task. 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 instruction for transferring tomatoes onto a plate.
   - CODE_FUNC outlines a function that simulates the execution of the task, including setup and environment management.

2. **Structure**: 
   - TASK is presented in a formal PDDL format, defining actions, predicates, and the problem domain.
   - CODE_FUNC is written in a programming style, detailing a sequence of operations in a simulation function.

3. **Detail Level**: 
   - TASK focuses on the logical representation of actions and their effects in a planning domain.
   - CODE_FUNC provides a procedural description of how the task is executed step-by-step in a simulation.

4. **Execution Context**: 
   - TASK is a declarative specification meant for a planner to interpret and execute.
   - CODE_FUNC is an imperative script that runs a simulation directly when executed.

5. **Outcome Handling**: 
   - TASK does not specify how to handle the outcome of the actions beyond their logical effects.
   - CODE_FUNC includes checks for task completion and prints messages based on the outcome of the actions.

6. **Environment Management**: 
   - TASK does not address the setup or teardown of the environment.
   - CODE_FUNC explicitly mentions initializing and shutting down the environment as part of the simulation process.

7. **Object Interaction**: 
   - TASK describes the interaction in terms of predicates and effects in a planning context.
   - CODE_FUNC describes the interaction in terms of procedural steps taken during the simulation.

8. **Recording**: 
   - TASK does not mention any form of recording or monitoring.
   - CODE_FUNC includes video recording as part of the simulation process.

9. **Execution Trigger**: 
   - TASK is a standalone instruction that can be interpreted by a planner.
   - CODE_FUNC is executed as part of a script when the program is run, indicating a different execution model.

10. **Focus on Specificity**: 
    - TASK is specific to the action of transferring tomatoes.
    - CODE_FUNC encompasses a broader context of simulation, including setup, execution, and teardown.

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 *  # Importing predefined skills
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
        tomato1_pos = positions['tomato1']
        tomato2_pos = positions['tomato2']
        plate_pos = positions['plate']

        # === Execute the Plan ===
        # Step 1: Pick tomato1 from the table
        print("[Task] Picking tomato1 from the table.")
        obs, reward, done = pick(
            env,
            task,
            target_pos=tomato1_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 tomato1!")
            return

        # Step 2: Place tomato1 onto the plate
        print("[Task] Placing tomato1 onto the plate.")
        obs, reward, done = place(
            env,
            task,
            target_pos=plate_pos,
            approach_distance=0.15,
            max_steps=100,
            threshold=0.01,
            approach_axis='z',
            timeout=10.0
        )
        if done:
            print("[Task] Task ended after placing tomato1!")
            return

        # Step 3: Pick tomato2 from the table
        print("[Task] Picking tomato2 from the table.")
        obs, reward, done = pick(
            env,
            task,
            target_pos=tomato2_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 tomato2!")
            return

        # Step 4: Place tomato2 onto the plate
        print("[Task] Placing tomato2 onto the plate.")
        obs, reward, done = place(
            env,
            task,
            target_pos=plate_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 5 ===
Is Correct: False
Syntax Pass: False
Code Function: The code defines a function to run a simulation task involving picking and placing objects. It begins by setting up the environment and resetting the task to its initial state. It initializes video recording capabilities to capture the simulation. The function retrieves the positions of objects, specifically two tomatoes and a plate. 

The task consists of four main steps: first, it picks the first tomato from the table; second, it places that tomato onto the plate; third, it picks the second tomato from the table; and finally, it places the second tomato onto the plate. After each action, it checks if the task is completed and prints appropriate messages. Regardless of the outcome, the environment is shut down at the end of the function. The overall behavior is to simulate a sequence of object manipulation tasks in a controlled environment.
Similarity: {'ok': False, 'reason': 'LLM JSON parsing failed.'}
Differences: 1. **Purpose**: TASK defines a planning problem in PDDL format for a robot to manipulate objects, while CODE_FUNC describes a function that simulates the execution of that task in a programming environment.
2. **Format**: TASK is structured in a formal language (PDDL) for defining planning problems, whereas CODE_FUNC is written in a programming language (likely Python or similar) for executing a simulation.
3. **Components**: TASK includes definitions of actions, predicates, and initial states, while CODE_FUNC includes procedural steps for executing the task, such as picking and placing objects.
4. **Execution**: TASK does not execute any actions; it merely specifies what actions can be taken under what conditions. CODE_FUNC actually performs the actions in a simulated environment.
5. **State Management**: TASK defines the initial state and effects of actions in a declarative manner, while CODE_FUNC manages state changes through procedural code and checks for task completion.
6. **Output**: TASK does not produce output; it is a description of a problem. CODE_FUNC includes print statements to provide feedback on the task's progress and completion.
7. **Environment Interaction**: TASK describes the environment and objects in a static way, while CODE_FUNC interacts with the environment dynamically during the simulation.
8. **Focus**: TASK focuses on the logical structure of the problem and the relationships between objects, while CODE_FUNC focuses on the sequence of operations and their execution.

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

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
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
        tomato1_pos = positions['tomato1']
        tomato2_pos = positions['tomato2']
        plate_pos = positions['plate']

        # === Execute the Plan ===
        # Step 1: Pick tomato1 from the table
        print("[Task] Picking tomato1 from the table.")
        obs, reward, done = pick(
            env,
            task,
            target_pos=tomato1_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 tomato1!")
            return

        # Step 2: Place tomato1 onto the plate
        print("[Task] Placing tomato1 onto the plate.")
        obs, reward, done = place(
            env,
            task,
            target_pos=plate_pos,
            approach_distance=0.15,
            max_steps=100,
            threshold=0.01,
            approach_axis='z',
            timeout=10.0
        )
        if done:
            print("[Task] Task ended after placing tomato1!")
            return

        # Step 3: Pick tomato2 from the table
        print("[Task] Picking tomato2 from the table.")
        obs, reward, done = pick(
            env,
            task,
            target_pos=tomato2_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 tomato2!")
            return

        # Step 4: Place tomato2 onto the plate
        print("[Task] Placing tomato2 onto the plate.")
        obs, reward, done = place(
            env,
            task,
            target_pos=plate_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 =====")
-------------------

