# Honest source-preserving motion compression candidate.
# Source policy: /workspace/action2code/outputs/programs/20260324/AdjustToasterOvenTemperature/20260324_205246_adjust-toaster-oven-temperature_episode_000000_action2code-open-loop-joint.py
# Compression note: target_retained_waypoints=5; actual_retained_waypoints=5; keep_counts={0: 3, 1: 2}

from primitives import moveJoint, moveLinear, moveC, moveA, moveWholeBodyPath, moveActionSequence, grasp, release, wait

SCENE_ARTIFACT = '/workspace/action2code/outputs/artifacts/20260324/AdjustToasterOvenTemperature/20260324_205246_adjust-toaster-oven-temperature_episode_000000_action2code-open-loop-joint_initial-scene.json'
POLICY_METADATA = {'policy_kind': 'open_loop_joint', 'policy_variant': 'open-loop-joint', 'task_name': 'AdjustToasterOvenTemperature', 'episode_id': 'episode_000000', 'scene_artifact_path': '../../../artifacts/20260324/AdjustToasterOvenTemperature/20260324_205246_adjust-toaster-oven-temperature_episode_000000_action2code-open-loop-joint_initial-scene.json', 'fitting_summary_path': '../../../artifacts/20260324/AdjustToasterOvenTemperature/20260324_205246_adjust-toaster-oven-temperature_episode_000000_action2code-open-loop-joint_fitting-summary.json', 'extracted_pose_metadata_path': '../../../artifacts/20260324/AdjustToasterOvenTemperature/20260324_205246_adjust-toaster-oven-temperature_episode_000000_action2code-open-loop-joint_extracted-pose-metadata.json', 'stable_grasp_contact_t': 218, 'stable_release_contact_loss_t': 218, 'uses_moveC': False, 'controller_mode': 'whole_body_ik'}

MOTION_SEQUENCE_00 = [
    {'target': [0.020043, -1.015707, -0.043832, -2.277006, 0.034405, 1.495798, 0.714649], 'input_type': 'joint', 'steps': 1, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [-0.073008, -1.43667, -0.307942, -2.61476, 0.391613, 2.016507, 0.77569], 'input_type': 'joint', 'steps': 67, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [0.067738, -0.679919, -0.318695, -2.485457, 1.272947, 2.534402, 0.417696], 'input_type': 'joint', 'steps': 83, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [0.064454, -0.675996, -0.312893, -2.482329, 1.272455, 2.541114, 0.432911], 'input_type': 'joint', 'steps': 1, 'settle_steps': 0, 'gripper': 1.0},
    {'target': [-0.032451, -0.714339, -0.148981, -2.548795, 1.337465, 2.719729, 1.430218], 'input_type': 'joint', 'steps': 81, 'settle_steps': 0, 'gripper': 1.0},
]

def run_joint_sequence(sequence):
    for item in sequence:
        payload = dict(item)
        target = payload.pop('target')
        moveJoint(target, **payload)

run_joint_sequence(MOTION_SEQUENCE_00)


# Honest source-preserving motion compression candidate.
# Source policy: /workspace/action2code/outputs/programs/20260324/AdjustWaterTemperature/20260324_205247_adjust-water-temperature_episode_000000_action2code-open-loop-joint.py
# Compression note: target_retained_waypoints=3; actual_retained_waypoints=3; keep_counts={0: 3}

from primitives import moveJoint, moveLinear, moveC, moveA, moveWholeBodyPath, moveActionSequence, grasp, release, wait

SCENE_ARTIFACT = '/workspace/action2code/outputs/artifacts/20260324/AdjustWaterTemperature/20260324_205247_adjust-water-temperature_episode_000000_action2code-open-loop-joint_initial-scene.json'
POLICY_METADATA = {'policy_kind': 'open_loop_joint', 'policy_variant': 'open-loop-joint', 'task_name': 'AdjustWaterTemperature', 'episode_id': 'episode_000000', 'scene_artifact_path': '../../../artifacts/20260324/AdjustWaterTemperature/20260324_205247_adjust-water-temperature_episode_000000_action2code-open-loop-joint_initial-scene.json', 'fitting_summary_path': '../../../artifacts/20260324/AdjustWaterTemperature/20260324_205247_adjust-water-temperature_episode_000000_action2code-open-loop-joint_fitting-summary.json', 'extracted_pose_metadata_path': '../../../artifacts/20260324/AdjustWaterTemperature/20260324_205247_adjust-water-temperature_episode_000000_action2code-open-loop-joint_extracted-pose-metadata.json', 'stable_grasp_contact_t': 243, 'stable_release_contact_loss_t': 243, 'uses_moveC': False, 'controller_mode': 'whole_body_ik'}

MOTION_SEQUENCE_00 = [
    {'target': [0.002977, -1.030809, -0.026424, -2.277712, 0.029467, 1.539352, 0.705861], 'input_type': 'joint', 'steps': 1, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [-0.173991, 0.743797, 0.007755, -1.453207, 1.527723, 1.661628, -1.395935], 'input_type': 'joint', 'steps': 175, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [-0.268687, 0.903104, 0.12875, -1.161958, 1.139405, 1.330426, -1.404024], 'input_type': 'joint', 'steps': 82, 'settle_steps': 0, 'gripper': -1.0},
]

def run_joint_sequence(sequence):
    for item in sequence:
        payload = dict(item)
        target = payload.pop('target')
        moveJoint(target, **payload)

run_joint_sequence(MOTION_SEQUENCE_00)

The water running in the sink is cold. Adjust the faucet handle to run the water hot. Make sure to keep the water on.


# Honest source-preserving motion compression candidate.
# Source policy: /workspace/action2code/outputs/programs/20260324/CheesyBread/20260324_205248_cheesy-bread_episode_000000_action2code-open-loop-joint.py
# Compression note: target_retained_waypoints=10; actual_retained_waypoints=10; keep_counts={0: 2, 1: 2, 2: 2, 3: 2, 4: 2}

from primitives import moveJoint, moveLinear, moveC, moveA, moveWholeBodyPath, moveActionSequence, grasp, release, wait

SCENE_ARTIFACT = '/workspace/action2code/outputs/artifacts/20260324/CheesyBread/20260324_205248_cheesy-bread_episode_000000_action2code-open-loop-joint_initial-scene.json'
POLICY_METADATA = {'policy_kind': 'open_loop_joint', 'policy_variant': 'open-loop-joint', 'task_name': 'CheesyBread', 'episode_id': 'episode_000000', 'scene_artifact_path': '../../../artifacts/20260324/CheesyBread/20260324_205248_cheesy-bread_episode_000000_action2code-open-loop-joint_initial-scene.json', 'fitting_summary_path': '../../../artifacts/20260324/CheesyBread/20260324_205248_cheesy-bread_episode_000000_action2code-open-loop-joint_fitting-summary.json', 'extracted_pose_metadata_path': '../../../artifacts/20260324/CheesyBread/20260324_205248_cheesy-bread_episode_000000_action2code-open-loop-joint_extracted-pose-metadata.json', 'stable_grasp_contact_t': 111, 'stable_release_contact_loss_t': 231, 'uses_moveC': False, 'controller_mode': 'whole_body_ik'}

MOTION_SEQUENCE_00 = [
    {'target': [0.00054, -1.039431, -0.054396, -2.264717, 0.036371, 1.506583, 0.689183], 'input_type': 'joint', 'steps': 1, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [0.082441, -0.839525, 0.722672, -2.86425, 0.652916, 2.028631, 1.423486], 'input_type': 'joint', 'steps': 104, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [0.083409, -0.838677, 0.721588, -2.86425, 0.651941, 2.029128, 1.42401], 'input_type': 'joint', 'steps': 1, 'settle_steps': 0, 'gripper': 1.0},
    {'target': [0.086025, -0.836752, 0.718848, -2.864241, 0.649571, 2.030339, 1.425418], 'input_type': 'joint', 'steps': 3, 'settle_steps': 0, 'gripper': 1.0},
]
MOTION_SEQUENCE_01 = [
    {'target': [0.08809, -0.835227, 0.716777, -2.862376, 0.647681, 2.031166, 1.427317], 'input_type': 'joint', 'steps': 1, 'settle_steps': 0, 'gripper': 1.0},
    {'target': [-0.055463, -0.30014, 0.00142, -2.400263, -0.038495, 2.086941, 1.542155], 'input_type': 'joint', 'steps': 77, 'settle_steps': 0, 'gripper': 1.0},
    {'target': [-0.053929, -0.296672, 0.000557, -2.395755, -0.038553, 2.083141, 1.542677], 'input_type': 'joint', 'steps': 2, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [-0.020222, -0.378319, 0.098434, -2.457637, 0.010321, 1.990529, 1.635193], 'input_type': 'joint', 'steps': 40, 'settle_steps': 0, 'gripper': -1.0},
]
MOTION_SEQUENCE_02 = [
    {'target': [-0.020094, -0.428989, 0.102865, -2.490941, 0.017079, 1.942488, 1.627963], 'input_type': 'joint', 'steps': 3, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [0.002528, -1.430688, 0.086103, -2.847098, 0.075299, 1.524598, 0.899135], 'input_type': 'joint', 'steps': 48, 'settle_steps': 0, 'gripper': -1.0},
]

def run_joint_sequence(sequence):
    for item in sequence:
        payload = dict(item)
        target = payload.pop('target')
        moveJoint(target, **payload)

run_joint_sequence(MOTION_SEQUENCE_00)
grasp(hold_target=[0.087492, -0.835723, 0.717407, -2.862739, 0.648414, 2.030981, 1.426721], input_type='joint', close_steps=1, settle_steps=0, gripper=1.0, require_contact_count=4)
wait(duration=0.05, hold_target=[0.087492, -0.835723, 0.717407, -2.862739, 0.648414, 2.030981, 1.426721], input_type='joint', gripper=1.0)
run_joint_sequence(MOTION_SEQUENCE_01)
wait(duration=0.05, hold_target=[-0.020222, -0.378319, 0.098434, -2.457637, 0.010321, 1.990529, 1.635193], input_type='joint', gripper=-1.0)
release(hold_target=[-0.020222, -0.378319, 0.098434, -2.457637, 0.010321, 1.990529, 1.635193], input_type='joint', open_steps=1, settle_steps=0, gripper=-1.0)
wait(duration=0.05, hold_target=[-0.020222, -0.378319, 0.098434, -2.457637, 0.010321, 1.990529, 1.635193], input_type='joint', gripper=-1.0)
run_joint_sequence(MOTION_SEQUENCE_02)

Pick up the wedge of cheese and place it on the slice of bread to prepare a simple cheese on bread dish.

cheese

all cheese dairy food in_container food_set1


# Open-loop trajectory-fit action2code policy generated from the RoboCasa GT EE trajectory
# Task: CloseBlenderLid
# Episode: episode_000000

from primitives import moveJoint, moveLinear, moveC, moveA, moveWholeBodyPath, moveActionSequence, grasp, release, wait

SCENE_ARTIFACT = '/workspace/action2code/outputs/artifacts/20260324/CloseBlenderLid/20260324_205249_close-blender-lid_episode_000000_action2code-open-loop-joint_initial-scene.json'
POLICY_METADATA = {
    'policy_kind': 'open_loop_joint',
    'policy_variant': 'open-loop-joint',
    'task_name': 'CloseBlenderLid',
    'episode_id': 'episode_000000',
    'scene_artifact_path': '/workspace/action2code/outputs/artifacts/20260324/CloseBlenderLid/20260324_205249_close-blender-lid_episode_000000_action2code-open-loop-joint_initial-scene.json',
    'fitting_summary_path': '/workspace/action2code/outputs/artifacts/20260324/CloseBlenderLid/20260324_205249_close-blender-lid_episode_000000_action2code-open-loop-joint_fitting-summary.json',
    'extracted_pose_metadata_path': '/workspace/action2code/outputs/artifacts/20260324/CloseBlenderLid/20260324_205249_close-blender-lid_episode_000000_action2code-open-loop-joint_extracted-pose-metadata.json',
    'stable_grasp_contact_t': 76,
    'stable_release_contact_loss_t': 76,
    'uses_moveC': False,
    'controller_mode': 'whole_body_ik',
}

OBJ_POSE_T0 = pose(x=float('nan'), y=float('nan'), z=float('nan'), qw=float('nan'), qx=float('nan'), qy=float('nan'), qz=float('nan'))
GOAL_RECEPTACLE_POSE = pose(x=float('nan'), y=float('nan'), z=float('nan'), qw=float('nan'), qx=float('nan'), qy=float('nan'), qz=float('nan'))

APPROACH_003_JOINTS = [-0.018129, -1.055660, -0.008860, -2.256801, 0.038554, 1.507538, 0.671120]  # t=3
APPROACH_004_JOINTS = [-0.018888, -1.070419, -0.013096, -2.255506, 0.036090, 1.490269, 0.675154]  # t=4
APPROACH_005_JOINTS = [-0.021039, -1.088220, -0.025171, -2.259211, 0.030900, 1.475702, 0.685451]  # t=5
APPROACH_007_JOINTS = [-0.027392, -1.129855, -0.078486, -2.277934, 0.020895, 1.457084, 0.697556]  # t=7
APPROACH_008_JOINTS = [-0.031148, -1.150873, -0.112914, -2.287349, 0.016891, 1.447865, 0.701255]  # t=8
APPROACH_012_JOINTS = [-0.049658, -1.212915, -0.256520, -2.313199, -0.008999, 1.428368, 0.728637]  # t=12
APPROACH_013_JOINTS = [-0.054608, -1.221184, -0.290673, -2.319493, -0.020854, 1.428320, 0.734192]  # t=13
APPROACH_016_JOINTS = [-0.068627, -1.228322, -0.384397, -2.346362, -0.071275, 1.437685, 0.740958]  # t=16
APPROACH_018_JOINTS = [-0.076768, -1.223824, -0.428582, -2.373372, -0.110730, 1.445509, 0.741331]  # t=18
APPROACH_020_JOINTS = [-0.084484, -1.220449, -0.462064, -2.394356, -0.136423, 1.462408, 0.741862]  # t=20
APPROACH_024_JOINTS = [-0.100250, -1.218668, -0.513996, -2.446999, -0.181638, 1.491752, 0.723935]  # t=24
APPROACH_028_JOINTS = [-0.113779, -1.201362, -0.556023, -2.504391, -0.237675, 1.507416, 0.707651]  # t=28
APPROACH_031_JOINTS = [-0.122951, -1.184799, -0.586133, -2.542702, -0.273715, 1.526181, 0.695913]  # t=31
APPROACH_032_JOINTS = [-0.125871, -1.180020, -0.594519, -2.550925, -0.282520, 1.533801, 0.691563]  # t=32
APPROACH_036_JOINTS = [-0.134964, -1.156424, -0.636951, -2.549721, -0.304428, 1.562691, 0.659997]  # t=36
APPROACH_040_JOINTS = [-0.137045, -1.120581, -0.663366, -2.586268, -0.325234, 1.603627, 0.650614]  # t=40
APPROACH_044_JOINTS = [-0.139024, -1.088414, -0.685408, -2.618015, -0.343426, 1.643822, 0.633545]  # t=44
APPROACH_045_JOINTS = [-0.138810, -1.078945, -0.691754, -2.626693, -0.347965, 1.658451, 0.628000]  # t=45
APPROACH_048_JOINTS = [-0.140313, -1.054106, -0.716987, -2.642030, -0.363250, 1.694279, 0.597996]  # t=48
APPROACH_052_JOINTS = [-0.139952, -1.020663, -0.743111, -2.653754, -0.372951, 1.738308, 0.560611]  # t=52
APPROACH_054_JOINTS = [-0.139604, -1.003672, -0.755807, -2.658018, -0.377563, 1.756285, 0.544261]  # t=54
APPROACH_056_JOINTS = [-0.135429, -0.979073, -0.766679, -2.673272, -0.383081, 1.788796, 0.539194]  # t=56
APPROACH_060_JOINTS = [-0.122675, -0.925622, -0.776299, -2.691582, -0.383257, 1.844778, 0.536554]  # t=60
APPROACH_064_JOINTS = [-0.104085, -0.860256, -0.780118, -2.702965, -0.378246, 1.901693, 0.539299]  # t=64
APPROACH_068_JOINTS = [-0.088474, -0.798573, -0.786116, -2.702716, -0.366655, 1.939511, 0.529773]  # t=68
APPROACH_072_JOINTS = [-0.084501, -0.756150, -0.800344, -2.706422, -0.359218, 1.970529, 0.511496]  # t=72
APPROACH_076_JOINTS = [-0.084282, -0.720002, -0.817821, -2.721585, -0.357946, 2.014410, 0.496257]  # t=76
PRESS_078_JOINTS = [-0.084706, -0.702430, -0.827099, -2.726683, -0.359231, 2.037927, 0.489291]  # t=78
PRESS_080_JOINTS = [-0.085231, -0.686583, -0.834470, -2.727113, -0.358952, 2.054503, 0.482564]  # t=80
PRESS_082_JOINTS = [-0.085836, -0.673628, -0.838582, -2.726498, -0.357032, 2.065361, 0.478815]  # t=82
PRESS_084_JOINTS = [-0.085956, -0.660816, -0.841896, -2.726781, -0.355175, 2.077560, 0.476889]  # t=84
PRESS_085_JOINTS = [-0.085999, -0.655454, -0.841990, -2.727152, -0.353791, 2.081886, 0.476950]  # t=85
PRESS_086_JOINTS = [-0.086163, -0.650268, -0.841126, -2.728221, -0.354107, 2.086883, 0.478758]  # t=86
PRESS_087_JOINTS = [-0.086760, -0.645907, -0.839072, -2.729613, -0.356027, 2.091484, 0.482555]  # t=87
PRESS_088_JOINTS = [-0.087845, -0.643207, -0.836492, -2.729342, -0.357231, 2.093927, 0.486311]  # t=88
PRESS_090_JOINTS = [-0.090254, -0.639840, -0.831957, -2.727958, -0.357005, 2.096313, 0.491857]  # t=90
PRESS_092_JOINTS = [-0.092145, -0.637364, -0.826515, -2.727292, -0.355557, 2.098337, 0.498149]  # t=92
PRESS_094_JOINTS = [-0.093847, -0.636256, -0.819909, -2.727242, -0.353539, 2.098759, 0.504872]  # t=94
PRESS_096_JOINTS = [-0.095822, -0.638887, -0.809824, -2.727459, -0.351015, 2.094201, 0.510861]  # t=96
PRESS_098_JOINTS = [-0.098315, -0.644895, -0.797488, -2.727437, -0.348728, 2.085916, 0.515730]  # t=98
PRESS_100_JOINTS = [-0.101137, -0.655057, -0.781860, -2.726980, -0.345025, 2.072814, 0.521595]  # t=100
PRESS_102_JOINTS = [-0.104042, -0.667378, -0.766077, -2.729275, -0.339616, 2.062420, 0.529134]  # t=102
PRESS_104_JOINTS = [-0.107097, -0.682560, -0.748729, -2.736030, -0.333353, 2.052563, 0.538572]  # t=104
PRESS_106_JOINTS = [-0.110195, -0.702892, -0.725533, -2.747949, -0.324639, 2.038036, 0.553643]  # t=106
PRESS_107_JOINTS = [-0.112289, -0.715686, -0.712336, -2.754166, -0.320008, 2.028593, 0.562720]  # t=107
PRESS_108_JOINTS = [-0.115693, -0.731702, -0.699077, -2.757801, -0.316028, 2.013906, 0.571029]  # t=108
PRESS_110_JOINTS = [-0.125793, -0.771423, -0.675857, -2.758921, -0.309499, 1.978536, 0.581246]  # t=110
PRESS_112_JOINTS = [-0.138065, -0.821591, -0.655259, -2.753826, -0.298091, 1.942794, 0.581946]  # t=112
PRESS_114_JOINTS = [-0.152320, -0.880157, -0.639055, -2.743921, -0.284494, 1.909811, 0.574546]  # t=114
PRESS_116_JOINTS = [-0.167813, -0.944207, -0.627189, -2.732834, -0.269338, 1.877947, 0.561755]  # t=116
PRESS_117_JOINTS = [-0.175367, -0.975108, -0.623657, -2.730577, -0.263021, 1.866829, 0.555207]  # t=117
PRESS_118_JOINTS = [-0.181499, -0.999001, -0.621276, -2.738710, -0.262046, 1.862541, 0.554076]  # t=118
PRESS_119_JOINTS = [-0.187675, -1.018434, -0.621318, -2.750061, -0.266935, 1.860398, 0.555697]  # t=119
PRESS_120_JOINTS = [-0.195312, -1.041063, -0.626249, -2.758492, -0.270136, 1.859387, 0.550625]  # t=120
PRESS_121_JOINTS = [-0.204465, -1.067957, -0.633206, -2.764943, -0.271382, 1.855664, 0.541164]  # t=121
PRESS_122_JOINTS = [-0.214034, -1.099603, -0.635520, -2.765032, -0.267806, 1.844264, 0.531681]  # t=122
PRESS_124_JOINTS = [-0.232451, -1.169908, -0.628334, -2.751578, -0.249765, 1.807641, 0.515682]  # t=124
PRESS_126_JOINTS = [-0.247841, -1.236358, -0.616075, -2.736442, -0.227833, 1.773461, 0.505561]  # t=126
PRESS_128_JOINTS = [-0.259465, -1.295308, -0.600094, -2.725106, -0.205196, 1.743773, 0.503502]  # t=128
PRESS_130_JOINTS = [-0.266610, -1.346722, -0.577359, -2.714198, -0.179432, 1.717114, 0.509523]  # t=130
PRESS_132_JOINTS = [-0.269360, -1.390678, -0.548182, -2.701135, -0.150935, 1.691915, 0.523088]  # t=132
PRESS_134_JOINTS = [-0.268603, -1.427879, -0.517069, -2.684815, -0.122019, 1.668412, 0.540439]  # t=134
PRESS_136_JOINTS = [-0.264632, -1.458881, -0.484819, -2.664593, -0.092398, 1.647041, 0.560326]  # t=136
PRESS_138_JOINTS = [-0.258152, -1.485036, -0.452786, -2.640099, -0.062918, 1.626397, 0.581668]  # t=138
PRESS_140_JOINTS = [-0.249364, -1.504627, -0.422365, -2.609662, -0.038444, 1.610626, 0.602305]  # t=140
PRESS_142_JOINTS = [-0.238806, -1.518173, -0.391962, -2.575324, -0.020834, 1.599137, 0.622312]  # t=142
PRESS_144_JOINTS = [-0.226833, -1.526999, -0.363093, -2.538471, -0.005262, 1.591879, 0.642510]  # t=144
PRESS_146_JOINTS = [-0.214041, -1.532330, -0.337447, -2.500283, 0.008875, 1.590126, 0.662083]  # t=146
PRESS_148_JOINTS = [-0.200361, -1.532728, -0.310980, -2.460377, 0.024136, 1.593958, 0.684224]  # t=148
PRESS_149_JOINTS = [-0.193200, -1.530916, -0.297241, -2.439809, 0.032601, 1.597423, 0.696305]  # t=149
PRESS_150_JOINTS = [-0.185945, -1.528076, -0.283212, -2.418943, 0.041390, 1.600828, 0.708914]  # t=150
PRESS_152_JOINTS = [-0.171606, -1.521668, -0.256197, -2.374772, 0.058784, 1.605576, 0.733464]  # t=152
PRESS_154_JOINTS = [-0.157574, -1.515560, -0.232543, -2.329737, 0.077454, 1.609848, 0.755685]  # t=154
PRESS_156_JOINTS = [-0.144639, -1.513200, -0.210617, -2.287470, 0.096737, 1.615688, 0.776846]  # t=156
PRESS_158_JOINTS = [-0.133203, -1.515396, -0.190085, -2.247535, 0.114717, 1.625423, 0.797049]  # t=158
PRESS_159_JOINTS = [-0.127889, -1.516658, -0.180274, -2.228300, 0.122888, 1.631963, 0.806757]  # t=159
PRESS_160_JOINTS = [-0.122882, -1.518274, -0.170811, -2.211332, 0.130124, 1.637775, 0.816180]  # t=160
PRESS_162_JOINTS = [-0.113694, -1.523825, -0.152183, -2.181075, 0.144456, 1.655544, 0.833687]  # t=162
PRESS_164_JOINTS = [-0.105294, -1.526388, -0.130731, -2.158703, 0.159059, 1.682591, 0.851436]  # t=164
PRESS_165_JOINTS = [-0.101442, -1.525278, -0.117997, -2.151796, 0.165974, 1.697354, 0.861485]  # t=165
PRESS_166_JOINTS = [-0.097818, -1.522366, -0.104087, -2.146070, 0.172235, 1.710957, 0.872703]  # t=166
PRESS_168_JOINTS = [-0.091150, -1.511595, -0.073065, -2.132031, 0.182932, 1.727616, 0.899634]  # t=168
PRESS_170_JOINTS = [-0.085056, -1.494370, -0.038501, -2.116756, 0.192330, 1.734135, 0.930989]  # t=170
PRESS_172_JOINTS = [-0.079502, -1.469463, -0.002780, -2.105133, 0.198781, 1.725157, 0.966161]  # t=172
PRESS_174_JOINTS = [-0.074106, -1.439250, 0.028922, -2.089317, 0.201935, 1.703947, 1.001225]  # t=174
PRESS_176_JOINTS = [-0.068667, -1.407875, 0.054786, -2.070878, 0.203540, 1.683550, 1.031092]  # t=176
PRESS_178_JOINTS = [-0.063517, -1.375964, 0.072835, -2.052320, 0.202205, 1.665247, 1.054747]  # t=178
PRESS_180_JOINTS = [-0.058415, -1.348056, 0.082264, -2.034000, 0.198555, 1.647117, 1.070198]  # t=180
PRESS_182_JOINTS = [-0.053661, -1.322048, 0.087432, -2.017272, 0.194842, 1.626917, 1.081226]  # t=182
PRESS_184_JOINTS = [-0.049545, -1.295922, 0.091840, -2.000902, 0.192513, 1.606593, 1.090462]  # t=184
PRESS_186_JOINTS = [-0.046055, -1.270991, 0.096619, -1.983509, 0.191610, 1.582979, 1.099830]  # t=186
PRESS_188_JOINTS = [-0.043178, -1.248072, 0.101606, -1.965889, 0.191353, 1.555647, 1.109765]  # t=188
PRESS_190_JOINTS = [-0.040807, -1.226168, 0.107068, -1.949534, 0.192030, 1.527979, 1.119873]  # t=190
PRESS_192_JOINTS = [-0.038993, -1.202546, 0.112500, -1.931648, 0.193327, 1.501037, 1.130143]  # t=192
PRESS_194_JOINTS = [-0.037370, -1.180908, 0.115244, -1.911222, 0.195479, 1.472549, 1.140776]  # t=194
PRESS_195_JOINTS = [-0.036836, -1.171891, 0.115803, -1.901259, 0.194879, 1.458816, 1.146397]  # t=195
PRESS_196_JOINTS = [-0.036713, -1.163536, 0.116959, -1.892331, 0.192423, 1.444935, 1.153324]  # t=196
PRESS_198_JOINTS = [-0.037372, -1.146934, 0.120982, -1.877858, 0.184950, 1.421975, 1.170566]  # t=198
PRESS_200_JOINTS = [-0.038458, -1.132539, 0.125483, -1.867893, 0.176425, 1.407788, 1.187264]  # t=200
PRESS_202_JOINTS = [-0.039481, -1.123052, 0.130013, -1.863641, 0.168364, 1.401487, 1.201703]  # t=202
PRESS_204_JOINTS = [-0.040260, -1.118215, 0.134308, -1.864238, 0.161111, 1.397520, 1.213842]  # t=204
PRESS_206_JOINTS = [-0.040916, -1.117953, 0.138799, -1.868714, 0.153312, 1.396415, 1.224123]  # t=206
PRESS_208_JOINTS = [-0.041419, -1.121381, 0.143085, -1.875997, 0.146158, 1.396200, 1.234241]  # t=208
PRESS_210_JOINTS = [-0.041870, -1.125683, 0.146907, -1.883023, 0.139716, 1.397945, 1.243099]  # t=210
PRESS_212_JOINTS = [-0.042219, -1.129575, 0.149930, -1.889429, 0.134970, 1.399549, 1.250859]  # t=212
PRESS_213_JOINTS = [-0.042376, -1.131124, 0.151085, -1.892426, 0.133249, 1.399776, 1.254598]  # t=213
PRESS_214_JOINTS = [-0.042614, -1.130176, 0.152164, -1.895765, 0.132559, 1.399492, 1.257885]  # t=214
PRESS_216_JOINTS = [-0.043247, -1.119848, 0.154760, -1.900137, 0.133639, 1.397198, 1.261679]  # t=216
PRESS_218_JOINTS = [-0.044316, -1.099411, 0.160192, -1.898474, 0.133897, 1.391247, 1.261833]  # t=218
PRESS_220_JOINTS = [-0.046171, -1.070447, 0.171796, -1.889847, 0.129277, 1.379010, 1.260272]  # t=220
PRESS_222_JOINTS = [-0.048837, -1.034841, 0.191655, -1.871748, 0.118801, 1.357992, 1.258489]  # t=222
PRESS_224_JOINTS = [-0.052258, -0.995722, 0.215687, -1.844927, 0.102379, 1.329165, 1.257239]  # t=224
PRESS_226_JOINTS = [-0.055843, -0.959657, 0.236247, -1.812691, 0.079448, 1.293720, 1.253028]  # t=226
PRESS_228_JOINTS = [-0.059469, -0.925494, 0.252016, -1.782144, 0.058539, 1.263399, 1.247830]  # t=228
PRESS_230_JOINTS = [-0.063064, -0.893750, 0.262306, -1.755674, 0.044146, 1.245521, 1.245426]  # t=230
PRESS_232_JOINTS = [-0.065694, -0.870677, 0.267555, -1.734941, 0.038999, 1.234456, 1.247422]  # t=232
PRESS_234_JOINTS = [-0.067108, -0.858314, 0.270622, -1.722780, 0.037266, 1.222811, 1.250706]  # t=234
PRESS_236_JOINTS = [-0.068277, -0.851552, 0.273224, -1.718744, 0.035030, 1.216542, 1.258023]  # t=236
PRESS_238_JOINTS = [-0.069119, -0.848065, 0.275939, -1.721753, 0.033356, 1.215718, 1.266034]  # t=238
PRESS_240_JOINTS = [-0.069361, -0.847145, 0.277945, -1.727727, 0.032938, 1.217733, 1.270564]  # t=240
PRESS_242_JOINTS = [-0.069227, -0.847746, 0.279234, -1.738919, 0.033150, 1.222894, 1.271685]  # t=242
PRESS_244_JOINTS = [-0.068589, -0.851878, 0.279589, -1.755175, 0.033580, 1.228677, 1.271758]  # t=244
PRESS_246_JOINTS = [-0.067506, -0.859111, 0.278882, -1.772169, 0.033923, 1.235627, 1.271595]  # t=246
PRESS_248_JOINTS = [-0.066638, -0.864896, 0.276406, -1.784346, 0.033428, 1.245253, 1.270104]  # t=248
PRESS_250_JOINTS = [-0.066540, -0.864738, 0.274322, -1.794198, 0.032526, 1.259770, 1.268148]  # t=250
PRESS_252_JOINTS = [-0.067023, -0.858902, 0.273824, -1.802154, 0.031394, 1.277973, 1.267325]  # t=252
PRESS_254_JOINTS = [-0.067925, -0.848577, 0.274041, -1.807903, 0.029639, 1.297970, 1.267275]  # t=254
PRESS_256_JOINTS = [-0.069085, -0.835033, 0.274567, -1.811326, 0.027289, 1.317879, 1.267276]  # t=256
PRESS_258_JOINTS = [-0.070251, -0.820556, 0.275239, -1.812298, 0.024583, 1.334810, 1.267701]  # t=258
PRESS_260_JOINTS = [-0.071432, -0.806031, 0.276149, -1.811799, 0.021297, 1.349117, 1.270155]  # t=260
PRESS_262_JOINTS = [-0.072463, -0.792284, 0.277308, -1.810305, 0.017776, 1.360812, 1.274223]  # t=262
PRESS_264_JOINTS = [-0.073055, -0.779325, 0.278445, -1.808252, 0.015227, 1.370134, 1.276276]  # t=264
PRESS_266_JOINTS = [-0.073522, -0.765196, 0.279001, -1.805693, 0.013525, 1.376844, 1.276483]  # t=266
PRESS_268_JOINTS = [-0.074150, -0.748132, 0.279418, -1.801514, 0.011905, 1.382632, 1.276479]  # t=268
PRESS_270_JOINTS = [-0.074761, -0.728834, 0.280087, -1.796058, 0.010767, 1.383342, 1.276462]  # t=270
PRESS_272_JOINTS = [-0.074929, -0.711021, 0.281237, -1.791821, 0.010464, 1.377587, 1.276483]  # t=272
PRESS_274_JOINTS = [-0.074684, -0.696285, 0.282653, -1.790804, 0.010717, 1.368938, 1.276614]  # t=274
PRESS_276_JOINTS = [-0.074358, -0.683392, 0.282259, -1.790922, 0.010709, 1.359772, 1.275819]  # t=276
PRESS_278_JOINTS = [-0.073758, -0.671892, 0.281905, -1.790486, 0.010810, 1.352250, 1.274782]  # t=278
PRESS_280_JOINTS = [-0.072629, -0.665162, 0.282474, -1.783944, 0.010296, 1.344019, 1.275200]  # t=280
PRESS_282_JOINTS = [-0.071452, -0.660799, 0.282951, -1.779515, 0.009180, 1.338975, 1.276138]  # t=282
PRESS_284_JOINTS = [-0.070202, -0.658491, 0.283540, -1.777091, 0.008421, 1.337320, 1.277513]  # t=284
PRESS_286_JOINTS = [-0.068875, -0.657787, 0.285879, -1.777876, 0.007762, 1.343512, 1.280877]  # t=286
PRESS_288_JOINTS = [-0.067929, -0.658141, 0.288641, -1.784624, 0.004092, 1.367482, 1.286442]  # t=288
PRESS_290_JOINTS = [-0.066955, -0.663865, 0.289822, -1.796256, -0.002444, 1.403956, 1.291968]  # t=290
PRESS_292_JOINTS = [-0.065331, -0.677085, 0.290200, -1.813698, -0.007609, 1.439565, 1.297011]  # t=292
PRESS_293_JOINTS = [-0.064409, -0.685217, 0.290172, -1.824795, -0.009366, 1.457040, 1.299152]  # t=293
PRESS_294_JOINTS = [-0.063491, -0.693011, 0.290361, -1.838249, -0.010104, 1.473764, 1.300952]  # t=294
PRESS_296_JOINTS = [-0.062041, -0.702744, 0.291476, -1.872068, -0.008483, 1.504239, 1.302987]  # t=296
PRESS_297_JOINTS = [-0.061427, -0.706197, 0.292418, -1.888635, -0.007218, 1.519350, 1.303958]  # t=297
PRESS_298_JOINTS = [-0.060821, -0.710351, 0.292510, -1.895479, -0.006292, 1.530291, 1.304096]  # t=298
PRESS_300_JOINTS = [-0.060279, -0.712096, 0.292651, -1.899175, -0.003859, 1.536035, 1.303653]  # t=300
PRESS_302_JOINTS = [-0.060365, -0.708951, 0.292928, -1.895888, -0.002663, 1.532111, 1.303585]  # t=302
PRESS_304_JOINTS = [-0.060436, -0.706851, 0.292932, -1.893266, -0.002711, 1.528021, 1.303806]  # t=304
PRESS_305_JOINTS = [-0.060451, -0.706188, 0.292684, -1.892506, -0.002673, 1.526055, 1.303773]  # t=305
PRESS_306_JOINTS = [-0.060465, -0.705248, 0.292344, -1.891315, -0.002524, 1.523662, 1.303694]  # t=306
PRESS_308_JOINTS = [-0.060554, -0.702422, 0.292054, -1.887588, -0.002075, 1.518088, 1.303678]  # t=308
PRESS_309_JOINTS = [-0.060603, -0.701622, 0.291907, -1.886430, -0.002189, 1.516234, 1.303681]  # t=309
PRESS_310_JOINTS = [-0.060607, -0.701324, 0.291845, -1.885214, -0.002208, 1.514922, 1.303683]  # t=310
PRESS_311_JOINTS = [-0.060621, -0.701140, 0.291761, -1.883677, -0.002295, 1.513972, 1.303680]  # t=311
RETREAT_313_JOINTS = [-0.060638, -0.700425, 0.291683, -1.881660, -0.002413, 1.512651, 1.303675]  # t=313
RETREAT_315_JOINTS = [-0.060528, -0.701259, 0.291610, -1.880884, -0.002452, 1.510975, 1.303694]  # t=315
RETREAT_316_JOINTS = [-0.060192, -0.704278, 0.291612, -1.880748, -0.002350, 1.507888, 1.303783]  # t=316
RETREAT_317_JOINTS = [-0.059654, -0.709075, 0.291638, -1.881109, -0.002144, 1.504333, 1.304041]  # t=317
RETREAT_319_JOINTS = [-0.058012, -0.724070, 0.291686, -1.884454, -0.001378, 1.496979, 1.305041]  # t=319
RETREAT_321_JOINTS = [-0.055307, -0.749545, 0.291665, -1.891240, 0.000091, 1.487071, 1.306784]  # t=321
RETREAT_323_JOINTS = [-0.050998, -0.791895, 0.288572, -1.896390, 0.004836, 1.466417, 1.310115]  # t=323
RETREAT_325_JOINTS = [-0.045840, -0.846570, 0.283208, -1.899629, 0.009792, 1.437688, 1.314248]  # t=325
RETREAT_327_JOINTS = [-0.040860, -0.903208, 0.277184, -1.900258, 0.015298, 1.406949, 1.317031]  # t=327
RETREAT_329_JOINTS = [-0.036412, -0.958389, 0.268606, -1.904254, 0.020224, 1.380284, 1.315811]  # t=329
RETREAT_330_JOINTS = [-0.034364, -0.985932, 0.262668, -1.909548, 0.021680, 1.370836, 1.313909]  # t=330
RETREAT_331_JOINTS = [-0.032337, -1.014291, 0.254786, -1.917039, 0.022412, 1.364227, 1.311177]  # t=331
RETREAT_332_JOINTS = [-0.030319, -1.043026, 0.244822, -1.927364, 0.022968, 1.360877, 1.307439]  # t=332
RETREAT_333_JOINTS = [-0.028275, -1.072243, 0.232571, -1.939907, 0.023539, 1.359916, 1.302712]  # t=333
RETREAT_335_JOINTS = [-0.024174, -1.131376, 0.202272, -1.968705, 0.024262, 1.361127, 1.289713]  # t=335
RETREAT_337_JOINTS = [-0.021036, -1.184774, 0.167558, -2.000046, 0.022348, 1.366285, 1.271582]  # t=337
RETREAT_339_JOINTS = [-0.019847, -1.224398, 0.130031, -2.030698, 0.013946, 1.375808, 1.246516]  # t=339
RETREAT_341_JOINTS = [-0.020147, -1.253749, 0.089774, -2.054690, -0.000498, 1.383810, 1.216590]  # t=341
RETREAT_343_JOINTS = [-0.021429, -1.277063, 0.048197, -2.070866, -0.018985, 1.387250, 1.183404]  # t=343
RETREAT_345_JOINTS = [-0.023578, -1.294933, 0.007068, -2.081377, -0.038693, 1.389299, 1.149294]  # t=345
RETREAT_346_JOINTS = [-0.024944, -1.302040, -0.013308, -2.085143, -0.048619, 1.390499, 1.132348]  # t=346
APPROACH_000_JOINTS = [-0.018305, -1.043733, -0.008421, -2.258683, 0.038732, 1.521158, 0.671115]  # t=1

# Phase-level helper functions keep the open-loop policy readable while preserving
# the exact primitive execution order used at runtime.

def move_to_control_panel():
    """Approach the appliance control region."""
    moveJoint(APPROACH_000_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=-1.000)
    moveJoint(APPROACH_003_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=-1.000)
    moveJoint(APPROACH_004_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=-1.000)
    moveJoint(APPROACH_005_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=-1.000)
    moveJoint(APPROACH_007_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=-1.000)
    moveJoint(APPROACH_008_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=-1.000)
    moveJoint(APPROACH_012_JOINTS, input_type='joint', steps=4, settle_steps=0, gripper=-1.000)
    moveJoint(APPROACH_013_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=-1.000)
    moveJoint(APPROACH_016_JOINTS, input_type='joint', steps=3, settle_steps=0, gripper=-1.000)
    moveJoint(APPROACH_018_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=-1.000)
    moveJoint(APPROACH_020_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=-1.000)
    moveJoint(APPROACH_024_JOINTS, input_type='joint', steps=4, settle_steps=0, gripper=-1.000)
    moveJoint(APPROACH_028_JOINTS, input_type='joint', steps=4, settle_steps=0, gripper=-1.000)
    moveJoint(APPROACH_031_JOINTS, input_type='joint', steps=3, settle_steps=0, gripper=-1.000)
    moveJoint(APPROACH_032_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=-1.000)
    moveJoint(APPROACH_036_JOINTS, input_type='joint', steps=4, settle_steps=0, gripper=-1.000)
    moveJoint(APPROACH_040_JOINTS, input_type='joint', steps=4, settle_steps=0, gripper=-1.000)
    moveJoint(APPROACH_044_JOINTS, input_type='joint', steps=4, settle_steps=0, gripper=-1.000)
    moveJoint(APPROACH_045_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=-1.000)
    moveJoint(APPROACH_048_JOINTS, input_type='joint', steps=3, settle_steps=0, gripper=-1.000)
    moveJoint(APPROACH_052_JOINTS, input_type='joint', steps=4, settle_steps=0, gripper=-1.000)
    moveJoint(APPROACH_054_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=-1.000)
    moveJoint(APPROACH_056_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=-1.000)
    moveJoint(APPROACH_060_JOINTS, input_type='joint', steps=4, settle_steps=0, gripper=-1.000)
    moveJoint(APPROACH_064_JOINTS, input_type='joint', steps=4, settle_steps=0, gripper=-1.000)
    moveJoint(APPROACH_068_JOINTS, input_type='joint', steps=4, settle_steps=0, gripper=-1.000)
    moveJoint(APPROACH_072_JOINTS, input_type='joint', steps=4, settle_steps=0, gripper=-1.000)
    moveJoint(APPROACH_076_JOINTS, input_type='joint', steps=4, settle_steps=0, gripper=-1.000)

def press_control():
    """Execute the short interaction path that actuates the control."""
    moveJoint(PRESS_078_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=-1.000)
    moveJoint(PRESS_080_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=-1.000)
    moveJoint(PRESS_082_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=-1.000)
    moveJoint(PRESS_084_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=-1.000)
    moveJoint(PRESS_085_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_086_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_087_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_088_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_090_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_092_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_094_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_096_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_098_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_100_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_102_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_104_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_106_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_107_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_108_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_110_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_112_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_114_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_116_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_117_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_118_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_119_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_120_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_121_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_122_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_124_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_126_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_128_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_130_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_132_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_134_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_136_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_138_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_140_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_142_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_144_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_146_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_148_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_149_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_150_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_152_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_154_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_156_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_158_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_159_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_160_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_162_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_164_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_165_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_166_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_168_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_170_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_172_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_174_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_176_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_178_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_180_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_182_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_184_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_186_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_188_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_190_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_192_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_194_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_195_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_196_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_198_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_200_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_202_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_204_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_206_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_208_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_210_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_212_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_213_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_214_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_216_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_218_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_220_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_222_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_224_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_226_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_228_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_230_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_232_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_234_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_236_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_238_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_240_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_242_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_244_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_246_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_248_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_250_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_252_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_254_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_256_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_258_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_260_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_262_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_264_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_266_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_268_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_270_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_272_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_274_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_276_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_278_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_280_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_282_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_284_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_286_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_288_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_290_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_292_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_293_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_294_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_296_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_297_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_298_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_300_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_302_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_304_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_305_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_306_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_308_JOINTS, input_type='joint', steps=3, settle_steps=0, gripper=1.000)
    wait(duration=0.10, hold_target=PRESS_308_JOINTS, input_type='joint', gripper=1.000)
    moveJoint(PRESS_309_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_310_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=1.000)
    moveJoint(PRESS_311_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=1.000)
    wait(duration=0.25, hold_target=PRESS_311_JOINTS, input_type='joint', gripper=-1.000)

def retreat_after_press():
    """Retreat away after the button press interaction."""
    moveJoint(RETREAT_313_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=-1.000)
    moveJoint(RETREAT_315_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=-1.000)
    moveJoint(RETREAT_316_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=-1.000)
    moveJoint(RETREAT_317_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=-1.000)
    moveJoint(RETREAT_319_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=-1.000)
    moveJoint(RETREAT_321_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=-1.000)
    moveJoint(RETREAT_323_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=-1.000)
    moveJoint(RETREAT_325_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=-1.000)
    moveJoint(RETREAT_327_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=-1.000)
    moveJoint(RETREAT_329_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=-1.000)
    moveJoint(RETREAT_330_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=-1.000)
    moveJoint(RETREAT_331_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=-1.000)
    moveJoint(RETREAT_332_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=-1.000)
    moveJoint(RETREAT_333_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=-1.000)
    moveJoint(RETREAT_335_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=-1.000)
    moveJoint(RETREAT_337_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=-1.000)
    moveJoint(RETREAT_339_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=-1.000)
    moveJoint(RETREAT_341_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=-1.000)
    moveJoint(RETREAT_343_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=-1.000)
    moveJoint(RETREAT_345_JOINTS, input_type='joint', steps=2, settle_steps=0, gripper=-1.000)
    moveJoint(RETREAT_346_JOINTS, input_type='joint', steps=1, settle_steps=0, gripper=-1.000)

move_to_control_panel()
press_control()
retreat_after_press()

# Fitting strategy:
# - adaptive per-phase waypoint selection on EE position + quaternion error
# - tight tolerances near descend / lift / place, looser tolerances in transport
# - optional moveC / moveA / segmented moveLinear chains / moveActionSequence when a segment is better represented by a smooth or constrained path
# - GT used only during generation; runtime execution uses this saved policy plus scene artifact

Close the lid blender by securely placing the lid on top.


# Honest source-preserving motion compression candidate.
# Source policy: /workspace/action2code/outputs/programs/20260324/CloseCabinet/20260324_205250_close-cabinet_episode_000000_action2code-open-loop-joint.py
# Compression note: target_retained_waypoints=6; actual_retained_waypoints=6; keep_counts={0: 6}

from primitives import moveJoint, moveLinear, moveC, moveA, moveWholeBodyPath, moveActionSequence, grasp, release, wait

SCENE_ARTIFACT = '/workspace/action2code/outputs/artifacts/20260324/CloseCabinet/20260324_205250_close-cabinet_episode_000000_action2code-open-loop-joint_initial-scene.json'
POLICY_METADATA = {'policy_kind': 'open_loop_joint', 'policy_variant': 'open-loop-joint', 'task_name': 'CloseCabinet', 'episode_id': 'episode_000000', 'scene_artifact_path': '../../../artifacts/20260324/CloseCabinet/20260324_205250_close-cabinet_episode_000000_action2code-open-loop-joint_initial-scene.json', 'fitting_summary_path': '../../../artifacts/20260324/CloseCabinet/20260324_205250_close-cabinet_episode_000000_action2code-open-loop-joint_fitting-summary.json', 'extracted_pose_metadata_path': '../../../artifacts/20260324/CloseCabinet/20260324_205250_close-cabinet_episode_000000_action2code-open-loop-joint_extracted-pose-metadata.json', 'stable_grasp_contact_t': 139, 'stable_release_contact_loss_t': 139, 'uses_moveC': False, 'controller_mode': 'whole_body_ik'}

MOTION_SEQUENCE_00 = [
    {'target': [-0.05097, -1.019523, -0.033659, -2.290474, 0.02973, 1.546336, 0.676788], 'input_type': 'joint', 'steps': 1, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [-0.094814, -1.762832, -0.279122, -1.993271, -0.352379, 1.577391, 0.772128], 'input_type': 'joint', 'steps': 35, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [-0.078516, -1.549204, -0.715303, -1.931337, -0.223354, 2.112503, 0.477698], 'input_type': 'joint', 'steps': 30, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [-0.098473, -1.61788, -0.621897, -2.125348, 0.240346, 1.978472, 0.227647], 'input_type': 'joint', 'steps': 28, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [0.112464, -1.273251, -0.173097, -2.566434, 1.008812, 2.542795, -0.533999], 'input_type': 'joint', 'steps': 32, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [-0.108936, -0.462565, 0.398288, -1.900048, 1.824847, 3.751859, -1.301264], 'input_type': 'joint', 'steps': 28, 'settle_steps': 0, 'gripper': -1.0},
]

def run_joint_sequence(sequence):
    for item in sequence:
        payload = dict(item)
        target = payload.pop('target')
        moveJoint(target, **payload)

run_joint_sequence(MOTION_SEQUENCE_00)

all fish meat food in_container oven_ready


# Honest source-preserving motion compression candidate.
# Source policy: /workspace/action2code/repro_logs/pretrain_dreamonly_repair_65_cosmos/CloseDishwasher/seed_195/episode_000000/refinement/20260403/CloseDishwasher/iter_004/candidate.py
# Compression note: target_retained_waypoints=14; actual_retained_waypoints=14; keep_counts={0: 4, 1: 5, 2: 5}

from primitives import moveJoint, moveLinear, moveC, moveA, moveWholeBodyPath, moveActionSequence, grasp, release, wait

SCENE_ARTIFACT = '/workspace/action2code/outputs/artifacts/20260324/CloseDishwasher/20260324_205251_close-dishwasher_episode_000000_action2code-open-loop-joint_initial-scene.json'
POLICY_METADATA = {'policy_kind': 'open_loop_joint', 'policy_variant': 'open-loop-joint', 'task_name': 'CloseDishwasher', 'episode_id': 'episode_000000', 'scene_artifact_path': '/workspace/action2code/outputs/artifacts/20260324/CloseDishwasher/20260324_205251_close-dishwasher_episode_000000_action2code-open-loop-joint_initial-scene.json', 'fitting_summary_path': '/workspace/action2code/outputs/artifacts/20260324/CloseDishwasher/20260324_205251_close-dishwasher_episode_000000_action2code-open-loop-joint_fitting-summary.json', 'extracted_pose_metadata_path': '/workspace/action2code/outputs/artifacts/20260324/CloseDishwasher/20260324_205251_close-dishwasher_episode_000000_action2code-open-loop-joint_extracted-pose-metadata.json', 'stable_grasp_contact_t': 127, 'stable_release_contact_loss_t': 127, 'uses_moveC': False, 'controller_mode': 'whole_body_ik'}

MOTION_SEQUENCE_00 = [
    {'target': [-0.033497, -1.029915, -0.032503, -2.275192, 0.032116, 1.529353, 0.699408], 'input_type': 'joint', 'steps': 1, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [-0.028273, -1.042804, -0.012382, -2.289096, 0.04921, 1.511163, 0.70434], 'input_type': 'joint', 'steps': 3, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [-0.024855, -1.063976, 0.004752, -2.299761, 0.058241, 1.488392, 0.703226], 'input_type': 'joint', 'steps': 1, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [0.012827, -1.283309, 0.217862, -2.403589, 0.089359, 1.370973, 0.664359], 'input_type': 'joint', 'steps': 6, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [0.022327, -1.318693, 0.264128, -2.417441, 0.094911, 1.353463, 0.650666], 'input_type': 'joint', 'steps': 1, 'settle_steps': 0, 'gripper': 1.0},
    {'target': [0.282528, -1.677931, 0.982392, -2.454431, 0.281629, 1.292296, 0.50492], 'input_type': 'joint', 'steps': 13, 'settle_steps': 0, 'gripper': 1.0},
    {'target': [0.385164, -1.454353, 1.582848, -2.166988, 0.32346, 1.538613, 0.765949], 'input_type': 'joint', 'steps': 16, 'settle_steps': 0, 'gripper': 1.0},
    {'target': [-0.153363, -1.625303, 2.085317, -1.7007, 0.431582, 1.966872, 0.97422], 'input_type': 'joint', 'steps': 23, 'settle_steps': 0, 'gripper': 1.0},
    {'target': [-0.394605, -1.760988, 2.166996, -1.544261, 0.460522, 2.119502, 0.994391], 'input_type': 'joint', 'steps': 13, 'settle_steps': 0, 'gripper': 1.0},
]
MOTION_SEQUENCE_01 = [
    {'target': [-0.400318, -1.761091, 2.167431, -1.546125, 0.433059, 2.113334, 1.006403], 'input_type': 'joint', 'steps': 1, 'settle_steps': 0, 'gripper': 1.0},
    {'target': [-0.463163, -1.762213, 2.172212, -1.566626, 0.130966, 2.045493, 1.138534], 'input_type': 'joint', 'steps': 11, 'settle_steps': 0, 'gripper': 1.0},
    {'target': [-0.542005, -1.763023, 2.138417, -1.613509, -0.032319, 2.03674, 1.191802], 'input_type': 'joint', 'steps': 12, 'settle_steps': 0, 'gripper': 1.0},
    {'target': [-0.684229, -1.763011, 2.012955, -1.699841, 0.14972, 2.177461, 1.052526], 'input_type': 'joint', 'steps': 14, 'settle_steps': 0, 'gripper': 1.0},
    {'target': [-1.08022, -1.763062, 1.886767, -1.611167, 0.267976, 2.35283, 0.952649], 'input_type': 'joint', 'steps': 13, 'settle_steps': 8, 'gripper': 1.0},
]

def run_joint_sequence(sequence):
    for item in sequence:
        payload = dict(item)
        target = payload.pop('target')
        moveJoint(target, **payload)

run_joint_sequence(MOTION_SEQUENCE_00)
wait(input_type='joint', hold_target=[-0.394605, -1.760988, 2.166996, -1.544261, 0.460522, 2.119502, 0.994391], duration=0.2, gripper=1.0)
run_joint_sequence(MOTION_SEQUENCE_01)
wait(input_type='joint', hold_target=[-1.08022, -1.763062, 1.886767, -1.611167, 0.267976, 2.35283, 0.952649], duration=0.2, gripper=1.0)


# Honest source-preserving motion compression candidate.
# Source policy: /workspace/action2code/outputs/programs/20260324/CloseDrawer/20260324_205252_close-drawer_episode_000000_action2code-open-loop-joint.py
# Compression note: target_retained_waypoints=6; actual_retained_waypoints=6; keep_counts={0: 6}

from primitives import moveJoint, moveLinear, moveC, moveA, moveWholeBodyPath, moveActionSequence, grasp, release, wait

SCENE_ARTIFACT = '/workspace/action2code/outputs/artifacts/20260324/CloseDrawer/20260324_205252_close-drawer_episode_000000_action2code-open-loop-joint_initial-scene.json'
POLICY_METADATA = {'policy_kind': 'open_loop_joint', 'policy_variant': 'open-loop-joint', 'task_name': 'CloseDrawer', 'episode_id': 'episode_000000', 'scene_artifact_path': '../../../artifacts/20260324/CloseDrawer/20260324_205252_close-drawer_episode_000000_action2code-open-loop-joint_initial-scene.json', 'fitting_summary_path': '../../../artifacts/20260324/CloseDrawer/20260324_205252_close-drawer_episode_000000_action2code-open-loop-joint_fitting-summary.json', 'extracted_pose_metadata_path': '../../../artifacts/20260324/CloseDrawer/20260324_205252_close-drawer_episode_000000_action2code-open-loop-joint_extracted-pose-metadata.json', 'stable_grasp_contact_t': 187, 'stable_release_contact_loss_t': 187, 'uses_moveC': False, 'controller_mode': 'whole_body_ik'}

MOTION_SEQUENCE_00 = [
    {'target': [-0.044247, -1.04162, -0.032867, -2.295311, 0.054272, 1.549349, 0.702722], 'input_type': 'joint', 'steps': 1, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [-0.109509, -1.323383, -0.613875, -2.182844, -0.426603, 1.205782, 0.230733], 'input_type': 'joint', 'steps': 49, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [-0.272979, -1.374573, -1.281108, -2.177713, -0.40562, 1.261364, -0.007838], 'input_type': 'joint', 'steps': 45, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [-0.084922, -1.270489, -1.64538, -2.353026, -0.134157, 1.667522, -0.084164], 'input_type': 'joint', 'steps': 44, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [0.649303, -1.763089, -2.085852, -2.164521, -0.486498, 2.6003, 0.115132], 'input_type': 'joint', 'steps': 46, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [0.684015, -1.761431, -2.016548, -1.948414, -0.398907, 2.212372, 0.08222], 'input_type': 'joint', 'steps': 15, 'settle_steps': 0, 'gripper': -1.0},
]

def run_joint_sequence(sequence):
    for item in sequence:
        payload = dict(item)
        target = payload.pop('target')
        moveJoint(target, **payload)

run_joint_sequence(MOTION_SEQUENCE_00)


# Honest source-preserving motion compression candidate.
# Source policy: /workspace/action2code/outputs/programs/20260324/CloseElectricKettleLid/20260324_205253_close-electric-kettle-lid_episode_000000_action2code-open-loop-joint.py
# Compression note: target_retained_waypoints=5; actual_retained_waypoints=5; keep_counts={0: 2, 1: 3}

from primitives import moveJoint, moveLinear, moveC, moveA, moveWholeBodyPath, moveActionSequence, grasp, release, wait

SCENE_ARTIFACT = '/workspace/action2code/outputs/artifacts/20260324/CloseElectricKettleLid/20260324_205253_close-electric-kettle-lid_episode_000000_action2code-open-loop-joint_initial-scene.json'
POLICY_METADATA = {'policy_kind': 'open_loop_joint', 'policy_variant': 'open-loop-joint', 'task_name': 'CloseElectricKettleLid', 'episode_id': 'episode_000000', 'scene_artifact_path': '../../../artifacts/20260324/CloseElectricKettleLid/20260324_205253_close-electric-kettle-lid_episode_000000_action2code-open-loop-joint_initial-scene.json', 'fitting_summary_path': '../../../artifacts/20260324/CloseElectricKettleLid/20260324_205253_close-electric-kettle-lid_episode_000000_action2code-open-loop-joint_fitting-summary.json', 'extracted_pose_metadata_path': '../../../artifacts/20260324/CloseElectricKettleLid/20260324_205253_close-electric-kettle-lid_episode_000000_action2code-open-loop-joint_extracted-pose-metadata.json', 'stable_grasp_contact_t': 45, 'stable_release_contact_loss_t': 45, 'uses_moveC': False, 'controller_mode': 'whole_body_ik'}

MOTION_SEQUENCE_00 = [
    {'target': [-0.007665, -1.047581, -0.023419, -2.286876, 0.027752, 1.517545, 0.71029], 'input_type': 'joint', 'steps': 1, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [-0.008855, -1.062445, -0.023359, -2.286813, 0.027803, 1.500917, 0.710192], 'input_type': 'joint', 'steps': 3, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [-0.009284, -1.065517, -0.023246, -2.289923, 0.02787, 1.501116, 0.710131], 'input_type': 'joint', 'steps': 1, 'settle_steps': 0, 'gripper': 1.0},
    {'target': [0.114994, -0.943869, -0.411654, -2.487218, 0.480474, 1.752293, -0.422568], 'input_type': 'joint', 'steps': 29, 'settle_steps': 0, 'gripper': 1.0},
    {'target': [0.088649, -0.863297, -0.098544, -2.569047, 0.478153, 1.918824, -0.421903], 'input_type': 'joint', 'steps': 26, 'settle_steps': 0, 'gripper': 1.0},
]

def run_joint_sequence(sequence):
    for item in sequence:
        payload = dict(item)
        target = payload.pop('target')
        moveJoint(target, **payload)

run_joint_sequence(MOTION_SEQUENCE_00)


# Honest source-preserving motion compression candidate.
# Source policy: /workspace/action2code/outputs/programs/20260413/CloseFridge/20260413_t3_k20_c536553ec83a_CloseFridge_source-compressed.py
# Compression note: tightening_round=3; source_policy=/workspace/action2code/outputs/programs/20260413/CloseFridge/20260413_t3_k20_c536553ec83a_CloseFridge_source-compressed.py; retained_waypoints=19; fingerprint=8ace096ab1d5; keep_indices={0: [1], 1: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]}

from primitives import moveJoint, moveLinear, moveC, moveA, moveWholeBodyPath, moveActionSequence, grasp, release, wait

SCENE_ARTIFACT = '/workspace/action2code/outputs/artifacts/20260324/CloseFridge/20260324_205254_close-fridge_episode_000000_action2code-open-loop-joint_initial-scene.json'
POLICY_METADATA = {'policy_kind': 'open_loop_joint', 'policy_variant': 'open-loop-joint', 'task_name': 'CloseFridge', 'episode_id': 'episode_000000', 'scene_artifact_path': '../../../artifacts/20260324/CloseFridge/20260324_205254_close-fridge_episode_000000_action2code-open-loop-joint_initial-scene.json', 'fitting_summary_path': '../../../artifacts/20260324/CloseFridge/20260324_205254_close-fridge_episode_000000_action2code-open-loop-joint_fitting-summary.json', 'extracted_pose_metadata_path': '../../../artifacts/20260324/CloseFridge/20260324_205254_close-fridge_episode_000000_action2code-open-loop-joint_extracted-pose-metadata.json', 'stable_grasp_contact_t': 278, 'stable_release_contact_loss_t': 278, 'uses_moveC': False, 'controller_mode': 'whole_body_ik'}

MOTION_SEQUENCE_00 = [
    {'primitive': 'moveJoint', 'target': [-0.080563, -1.560116, -0.35851, -2.281268, 0.112433, 1.578725, 0.756679], 'input_type': 'joint', 'steps': 16, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveJoint', 'target': [-0.096236, -1.621103, -0.445781, -2.298233, 0.136367, 1.653922, 0.783499], 'input_type': 'joint', 'steps': 3, 'settle_steps': 0, 'gripper': 1.0},
    {'primitive': 'moveJoint', 'target': [-0.103661, -1.399826, -0.874867, -2.187526, 0.274969, 1.825795, 1.106711], 'input_type': 'joint', 'steps': 19, 'settle_steps': 0, 'gripper': 1.0},
    {'primitive': 'moveJoint', 'target': [0.451845, -0.900358, -1.443194, -1.9611, 0.596611, 2.026755, 1.237783], 'input_type': 'joint', 'steps': 17, 'settle_steps': 0, 'gripper': 1.0},
    {'primitive': 'moveJoint', 'target': [0.847615, -1.171932, -1.523656, -1.723081, 0.292416, 1.891543, 1.42987], 'input_type': 'joint', 'steps': 15, 'settle_steps': 0, 'gripper': 1.0},
    {'primitive': 'moveJoint', 'target': [0.732618, -1.185173, -1.298724, -2.157325, 0.278379, 1.813963, 0.97035], 'input_type': 'joint', 'steps': 25, 'settle_steps': 0, 'gripper': 1.0},
    {'primitive': 'moveJoint', 'target': [0.700687, -0.469397, -0.940979, -2.245231, 1.114447, 2.866952, 0.893885], 'input_type': 'joint', 'steps': 20, 'settle_steps': 0, 'gripper': 1.0},
    {'primitive': 'moveJoint', 'target': [0.457485, -0.409905, -0.662935, -2.263866, 1.544406, 3.04827, 0.662047], 'input_type': 'joint', 'steps': 10, 'settle_steps': 0, 'gripper': 1.0},
    {'primitive': 'moveJoint', 'target': [0.007487, -0.887588, -0.197273, -2.605095, 1.408839, 3.150111, 0.81003], 'input_type': 'joint', 'steps': 16, 'settle_steps': 0, 'gripper': 1.0},
    {'primitive': 'moveJoint', 'target': [-0.332991, -0.915964, 0.034046, -2.727244, 0.543394, 2.990646, 1.518691], 'input_type': 'joint', 'steps': 13, 'settle_steps': 0, 'gripper': 1.0},
    {'primitive': 'moveJoint', 'target': [-0.203487, -1.275379, -0.057551, -2.174033, -0.181749, 1.754534, 1.732906], 'input_type': 'joint', 'steps': 25, 'settle_steps': 0, 'gripper': 1.0},
    {'primitive': 'moveJoint', 'target': [-0.152694, -1.763135, 0.193483, -2.286105, -0.111023, 1.85201, 2.088655], 'input_type': 'joint', 'steps': 12, 'settle_steps': 0, 'gripper': 1.0},
    {'primitive': 'moveJoint', 'target': [-0.128761, -1.730784, 0.375674, -2.105098, -0.156309, 1.674698, 2.259027], 'input_type': 'joint', 'steps': 10, 'settle_steps': 0, 'gripper': 1.0},
    {'primitive': 'moveJoint', 'target': [-0.123275, -1.693698, 0.81991, -2.066353, -0.04262, 1.689416, 2.542639], 'input_type': 'joint', 'steps': 16, 'settle_steps': 0, 'gripper': 1.0},
    {'primitive': 'moveJoint', 'target': [-0.361091, -1.395755, 1.150243, -1.995906, -0.091471, 1.988695, 2.897526], 'input_type': 'joint', 'steps': 16, 'settle_steps': 0, 'gripper': 1.0},
    {'primitive': 'moveJoint', 'target': [-0.606869, -1.212975, 1.226723, -1.942053, -0.071488, 2.170085, 2.878833], 'input_type': 'joint', 'steps': 14, 'settle_steps': 0, 'gripper': 1.0},
    {'primitive': 'moveJoint', 'target': [-0.628696, -1.212817, 1.15164, -2.037924, -0.04208, 2.132788, 2.897382], 'input_type': 'joint', 'steps': 14, 'settle_steps': 0, 'gripper': 1.0},
    {'primitive': 'moveJoint', 'target': [-0.931254, -0.842386, 1.104128, -2.057658, -0.146289, 2.394464, 2.897453], 'input_type': 'joint', 'steps': 16, 'settle_steps': 0, 'gripper': 1.0},
    {'primitive': 'moveJoint', 'target': [-0.645829, -0.924863, 0.848507, -2.488558, -0.042244, 3.028688, 2.819241], 'input_type': 'joint', 'steps': 16, 'settle_steps': 0, 'gripper': 1.0},
]

def run_single_waypoint_sequence(sequence):
    for item in sequence:
        payload = dict(item)
        primitive = payload.pop('primitive')
        target = payload.pop('target')
        if primitive == 'moveJoint':
            moveJoint(target, **payload)
        elif primitive == 'moveLinear':
            moveLinear(target, **payload)
        else:
            raise ValueError(f'Unsupported sequence primitive: {primitive}')

run_single_waypoint_sequence(MOTION_SEQUENCE_00)


# Honest source-preserving motion compression candidate.
# Source policy: /workspace/action2code/outputs/programs/20260324/CloseFridgeDrawer/20260324_205255_close-fridge-drawer_episode_000000_action2code-open-loop-joint.py
# Compression note: target_retained_waypoints=3; actual_retained_waypoints=3; keep_counts={0: 3}

from primitives import moveJoint, moveLinear, moveC, moveA, moveWholeBodyPath, moveActionSequence, grasp, release, wait

SCENE_ARTIFACT = '/workspace/action2code/outputs/artifacts/20260324/CloseFridgeDrawer/20260324_205255_close-fridge-drawer_episode_000000_action2code-open-loop-joint_initial-scene.json'
POLICY_METADATA = {'policy_kind': 'open_loop_joint', 'policy_variant': 'open-loop-joint', 'task_name': 'CloseFridgeDrawer', 'episode_id': 'episode_000000', 'scene_artifact_path': '../../../artifacts/20260324/CloseFridgeDrawer/20260324_205255_close-fridge-drawer_episode_000000_action2code-open-loop-joint_initial-scene.json', 'fitting_summary_path': '../../../artifacts/20260324/CloseFridgeDrawer/20260324_205255_close-fridge-drawer_episode_000000_action2code-open-loop-joint_fitting-summary.json', 'extracted_pose_metadata_path': '../../../artifacts/20260324/CloseFridgeDrawer/20260324_205255_close-fridge-drawer_episode_000000_action2code-open-loop-joint_extracted-pose-metadata.json', 'stable_grasp_contact_t': 101, 'stable_release_contact_loss_t': 101, 'uses_moveC': False, 'controller_mode': 'whole_body_ik'}

MOTION_SEQUENCE_00 = [
    {'target': [-0.0438, -1.050213, -0.03374, -2.284728, 0.043175, 1.520718, 0.714233], 'input_type': 'joint', 'steps': 1, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [-0.354723, -1.504686, -0.908278, -2.654101, -1.020824, 1.131374, 1.483875], 'input_type': 'joint', 'steps': 56, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [-0.094772, 0.248732, -0.250256, -2.51292, 1.479775, 3.013549, 0.422746], 'input_type': 'joint', 'steps': 59, 'settle_steps': 0, 'gripper': -1.0},
]

def run_joint_sequence(sequence):
    for item in sequence:
        payload = dict(item)
        target = payload.pop('target')
        moveJoint(target, **payload)

run_joint_sequence(MOTION_SEQUENCE_00)

all mushroom vegetable food in_container

all corn vegetable food in_container oven_ready


# Honest source-preserving motion compression candidate.
# Source policy: /workspace/action2code/outputs/programs/20260324/CloseMicrowave/20260324_205256_close-microwave_episode_000000_action2code-open-loop-joint.py
# Compression note: target_retained_waypoints=6; actual_retained_waypoints=6; keep_counts={0: 6}

from primitives import moveJoint, moveLinear, moveC, moveA, moveWholeBodyPath, moveActionSequence, grasp, release, wait

SCENE_ARTIFACT = '/workspace/action2code/outputs/artifacts/20260324/CloseMicrowave/20260324_205256_close-microwave_episode_000000_action2code-open-loop-joint_initial-scene.json'
POLICY_METADATA = {'policy_kind': 'open_loop_joint', 'policy_variant': 'open-loop-joint', 'task_name': 'CloseMicrowave', 'episode_id': 'episode_000000', 'scene_artifact_path': '../../../artifacts/20260324/CloseMicrowave/20260324_205256_close-microwave_episode_000000_action2code-open-loop-joint_initial-scene.json', 'fitting_summary_path': '../../../artifacts/20260324/CloseMicrowave/20260324_205256_close-microwave_episode_000000_action2code-open-loop-joint_fitting-summary.json', 'extracted_pose_metadata_path': '../../../artifacts/20260324/CloseMicrowave/20260324_205256_close-microwave_episode_000000_action2code-open-loop-joint_extracted-pose-metadata.json', 'stable_grasp_contact_t': 203, 'stable_release_contact_loss_t': 203, 'uses_moveC': False, 'controller_mode': 'whole_body_ik'}

MOTION_SEQUENCE_00 = [
    {'target': [-0.016103, -1.020079, -0.037544, -2.278405, 0.039894, 1.519546, 0.701247], 'input_type': 'joint', 'steps': 1, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [-0.194793, -1.763398, 0.295514, -1.499692, -0.432524, 1.627636, 0.777945], 'input_type': 'joint', 'steps': 49, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [-0.550323, -1.498658, 1.171342, -1.845061, -0.968818, 1.045284, 1.523882], 'input_type': 'joint', 'steps': 49, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [-0.145257, -1.144676, 0.466745, -2.277174, -0.844028, 1.943187, 1.826717], 'input_type': 'joint', 'steps': 53, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [-0.010565, -0.853225, -0.098124, -2.325555, -0.24948, 2.830508, 1.020452], 'input_type': 'joint', 'steps': 30, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [0.022925, -0.775628, -0.163816, -2.193891, 0.187539, 2.698922, 0.648047], 'input_type': 'joint', 'steps': 36, 'settle_steps': 0, 'gripper': -1.0},
]

def run_joint_sequence(sequence):
    for item in sequence:
        payload = dict(item)
        target = payload.pop('target')
        moveJoint(target, **payload)

run_joint_sequence(MOTION_SEQUENCE_00)


# Honest source-preserving motion compression candidate.
# Source policy: /workspace/action2code/repro_logs/pretrain_dreamonly_repair_65_cosmos/CloseOven/seed_195/episode_000000/refinement/20260403/CloseOven/iter_001/candidate.py
# Compression note: target_retained_waypoints=16; actual_retained_waypoints=16; keep_counts={0: 13, 1: 2, 2: 1}

from primitives import moveJoint, moveLinear, moveC, moveA, moveWholeBodyPath, moveActionSequence, grasp, release, wait

SCENE_ARTIFACT = '/workspace/action2code/outputs/artifacts/20260324/CloseOven/20260324_205257_close-oven_episode_000000_action2code-open-loop-joint_initial-scene.json'
POLICY_METADATA = {'policy_kind': 'open_loop_joint', 'policy_variant': 'open-loop-joint', 'task_name': 'CloseOven', 'episode_id': 'episode_000000', 'scene_artifact_path': '/workspace/action2code/outputs/artifacts/20260324/CloseOven/20260324_205257_close-oven_episode_000000_action2code-open-loop-joint_initial-scene.json', 'fitting_summary_path': '/workspace/action2code/outputs/artifacts/20260324/CloseOven/20260324_205257_close-oven_episode_000000_action2code-open-loop-joint_fitting-summary.json', 'extracted_pose_metadata_path': '/workspace/action2code/outputs/artifacts/20260324/CloseOven/20260324_205257_close-oven_episode_000000_action2code-open-loop-joint_extracted-pose-metadata.json', 'stable_grasp_contact_t': 153, 'stable_release_contact_loss_t': 153, 'uses_moveC': False, 'controller_mode': 'whole_body_ik'}

MOTION_SEQUENCE_00 = [
    {'primitive': 'moveJoint', 'target': [0.001777, -1.040713, -0.007125, -2.262362, 0.045935, 1.566951, 0.686096], 'input_type': 'joint', 'steps': 1, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveJoint', 'target': [0.032798, -1.421188, 0.304466, -2.398301, 0.295954, 1.385962, 0.950507], 'input_type': 'joint', 'steps': 19, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveJoint', 'target': [0.222696, -1.732382, 0.973982, -2.34257, 0.922556, 1.29582, 1.656826], 'input_type': 'joint', 'steps': 18, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveJoint', 'target': [0.282895, -1.594835, 1.388657, -2.292473, 1.166431, 1.56181, 1.939858], 'input_type': 'joint', 'steps': 12, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveJoint', 'target': [-0.267054, -1.650404, 2.125185, -1.886223, 1.483949, 2.196373, 1.868787], 'input_type': 'joint', 'steps': 25, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveJoint', 'target': [-0.359184, -1.76297, 2.203035, -1.709071, 0.979425, 2.217647, 2.309247], 'input_type': 'joint', 'steps': 11, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveJoint', 'target': [-0.331791, -1.762886, 2.160992, -1.718795, 0.812699, 2.132109, 2.436066], 'input_type': 'joint', 'steps': 8, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveJoint', 'target': [-0.264967, -1.762808, 2.063592, -1.864696, 0.830812, 2.115913, 2.27859], 'input_type': 'joint', 'steps': 10, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveJoint', 'target': [-0.268413, -1.744325, 1.966491, -1.994027, 0.882282, 2.121725, 2.129986], 'input_type': 'joint', 'steps': 9, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveJoint', 'target': [-0.388143, -1.701474, 1.85329, -2.107786, 0.906656, 2.230445, 1.905065], 'input_type': 'joint', 'steps': 11, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveJoint', 'target': [-0.565507, -1.6751, 1.796004, -2.1007, 0.941831, 2.372295, 1.731983], 'input_type': 'joint', 'steps': 8, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveJoint', 'target': [-0.819369, -1.655147, 1.746769, -1.982642, 0.974163, 2.435358, 1.601085], 'input_type': 'joint', 'steps': 10, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveJoint', 'target': [-0.868934, -1.648273, 1.729379, -1.948142, 0.955477, 2.436336, 1.593161], 'input_type': 'joint', 'steps': 8, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveLinear', 'target': pose(x=0.737756, y=-3.166585, z=0.86793, qw=0.27277, qx=0.585859, qy=-0.65044, qz=-0.399117), 'steps': 3, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveLinear', 'target': pose(x=0.733211, y=-3.194068, z=0.863334, qw=0.30019, qx=0.5833, qy=-0.630174, qz=-0.415366), 'steps': 8, 'settle_steps': 2, 'gripper': -1.0},
    {'primitive': 'moveJoint', 'target': [-0.80741, -1.699978, 1.724872, -1.91771, 0.842072, 2.446105, 1.782835], 'input_type': 'joint', 'steps': 7, 'settle_steps': 0, 'gripper': -1.0},
]

def run_single_waypoint_sequence(sequence):
    for item in sequence:
        payload = dict(item)
        primitive = payload.pop('primitive')
        target = payload.pop('target')
        if primitive == 'moveJoint':
            moveJoint(target, **payload)
        elif primitive == 'moveLinear':
            moveLinear(target, **payload)
        else:
            raise ValueError(f'Unsupported sequence primitive: {primitive}')

run_single_waypoint_sequence(MOTION_SEQUENCE_00)


# Honest source-preserving motion compression candidate.
# Source policy: /workspace/action2code/outputs/programs/20260324/CloseStandMixerHead/20260324_205258_close-stand-mixer-head_episode_000000_action2code-open-loop-joint.py
# Compression note: target_retained_waypoints=4; actual_retained_waypoints=4; keep_counts={0: 4}

from primitives import moveJoint, moveLinear, moveC, moveA, moveWholeBodyPath, moveActionSequence, grasp, release, wait

SCENE_ARTIFACT = '/workspace/action2code/outputs/artifacts/20260324/CloseStandMixerHead/20260324_205258_close-stand-mixer-head_episode_000000_action2code-open-loop-joint_initial-scene.json'
POLICY_METADATA = {'policy_kind': 'open_loop_joint', 'policy_variant': 'open-loop-joint', 'task_name': 'CloseStandMixerHead', 'episode_id': 'episode_000000', 'scene_artifact_path': '../../../artifacts/20260324/CloseStandMixerHead/20260324_205258_close-stand-mixer-head_episode_000000_action2code-open-loop-joint_initial-scene.json', 'fitting_summary_path': '../../../artifacts/20260324/CloseStandMixerHead/20260324_205258_close-stand-mixer-head_episode_000000_action2code-open-loop-joint_fitting-summary.json', 'extracted_pose_metadata_path': '../../../artifacts/20260324/CloseStandMixerHead/20260324_205258_close-stand-mixer-head_episode_000000_action2code-open-loop-joint_extracted-pose-metadata.json', 'stable_grasp_contact_t': 62, 'stable_release_contact_loss_t': 62, 'uses_moveC': False, 'controller_mode': 'whole_body_ik'}

MOTION_SEQUENCE_00 = [
    {'target': [-0.004038, -1.011219, -0.044819, -2.295809, 0.035305, 1.50555, 0.693525], 'input_type': 'joint', 'steps': 1, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [0.123274, -0.937699, -0.960015, -2.027831, 0.062616, 1.709142, -0.546938], 'input_type': 'joint', 'steps': 32, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [0.466906, -1.027296, -0.78203, -2.107097, 0.169098, 1.783188, -2.058731], 'input_type': 'joint', 'steps': 35, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [0.320059, -0.935607, -0.137351, -1.87528, -0.007282, 1.321898, -2.192736], 'input_type': 'joint', 'steps': 16, 'settle_steps': 0, 'gripper': -1.0},
]

def run_joint_sequence(sequence):
    for item in sequence:
        payload = dict(item)
        target = payload.pop('target')
        moveJoint(target, **payload)

run_joint_sequence(MOTION_SEQUENCE_00)


# Honest source-preserving motion compression candidate.
# Source policy: /workspace/action2code/repro_logs/pretrain_dreamonly_repair_65_cosmos/CloseToasterOvenDoor/seed_195/episode_000000/refinement/20260403/CloseToasterOvenDoor/iter_002/candidate.py
# Compression note: target_retained_waypoints=11; actual_retained_waypoints=11; keep_counts={0: 5, 1: 2, 2: 4}

from primitives import moveJoint, moveLinear, moveC, moveA, moveWholeBodyPath, moveActionSequence, grasp, release, wait

SCENE_ARTIFACT = '/workspace/action2code/outputs/artifacts/20260324/CloseToasterOvenDoor/20260324_205259_close-toaster-oven-door_episode_000000_action2code-open-loop-joint_initial-scene.json'
POLICY_METADATA = {'policy_kind': 'open_loop_joint', 'policy_variant': 'open-loop-joint', 'task_name': 'CloseToasterOvenDoor', 'episode_id': 'episode_000000', 'scene_artifact_path': '/workspace/action2code/outputs/artifacts/20260324/CloseToasterOvenDoor/20260324_205259_close-toaster-oven-door_episode_000000_action2code-open-loop-joint_initial-scene.json', 'fitting_summary_path': '/workspace/action2code/outputs/artifacts/20260324/CloseToasterOvenDoor/20260324_205259_close-toaster-oven-door_episode_000000_action2code-open-loop-joint_fitting-summary.json', 'extracted_pose_metadata_path': '/workspace/action2code/outputs/artifacts/20260324/CloseToasterOvenDoor/20260324_205259_close-toaster-oven-door_episode_000000_action2code-open-loop-joint_extracted-pose-metadata.json', 'stable_grasp_contact_t': 140, 'stable_release_contact_loss_t': 140, 'uses_moveC': False, 'controller_mode': 'whole_body_ik'}

MOTION_SEQUENCE_00 = [
    {'primitive': 'moveJoint', 'target': [-0.002349, -0.976434, -0.006173, -2.24155, 0.020248, 1.53042, 0.673882], 'input_type': 'joint', 'steps': 1, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveJoint', 'target': [0.32135, -1.734482, 0.929497, -2.551018, 0.185995, 1.68909, 1.645305], 'input_type': 'joint', 'steps': 40, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveJoint', 'target': [0.04713, -1.113801, 1.451251, -2.741308, 0.118486, 2.362626, 2.282583], 'input_type': 'joint', 'steps': 38, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveJoint', 'target': [-0.089011, -1.238709, 1.373477, -2.817115, 0.006832, 2.787149, 2.394164], 'input_type': 'joint', 'steps': 28, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveJoint', 'target': [-0.471642, -0.721504, 1.17906, -2.654346, 0.193736, 3.433814, 1.978483], 'input_type': 'joint', 'steps': 38, 'settle_steps': 1, 'gripper': -1.0},
    {'primitive': 'moveLinear', 'target': pose(x=5.995379, y=-0.391809, z=1.134671, qw=0.252262, qx=-0.161802, qy=-0.798017, qz=-0.522832), 'steps': 6, 'settle_steps': 2, 'gripper': -1.0},
    {'primitive': 'moveLinear', 'target': pose(x=5.997712, y=-0.37403, z=1.136242, qw=0.252262, qx=-0.161802, qy=-0.798017, qz=-0.522832), 'steps': 4, 'settle_steps': 6, 'gripper': -1.0},
]
MOTION_SEQUENCE_01 = [
    {'primitive': 'moveJoint', 'target': [-0.472154, -0.699686, 1.177755, -2.65632, 0.195396, 3.461415, 1.959408], 'input_type': 'joint', 'steps': 1, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveJoint', 'target': [-0.44107, -0.649945, 1.157053, -2.663266, 0.21167, 3.504246, 1.897334], 'input_type': 'joint', 'steps': 4, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveJoint', 'target': [-0.393694, -0.617966, 1.12075, -2.668483, 0.225911, 3.498533, 1.849517], 'input_type': 'joint', 'steps': 4, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveJoint', 'target': [-0.337277, -0.578851, 1.073216, -2.672875, 0.246242, 3.494769, 1.788811], 'input_type': 'joint', 'steps': 6, 'settle_steps': 0, 'gripper': -1.0},
]

def run_single_waypoint_sequence(sequence):
    for item in sequence:
        payload = dict(item)
        primitive = payload.pop('primitive')
        target = payload.pop('target')
        if primitive == 'moveJoint':
            moveJoint(target, **payload)
        elif primitive == 'moveLinear':
            moveLinear(target, **payload)
        else:
            raise ValueError(f'Unsupported sequence primitive: {primitive}')

run_single_waypoint_sequence(MOTION_SEQUENCE_00)
wait(input_type='pose', hold_pose=pose(x=5.997712, y=-0.37403, z=1.136242, qw=0.252262, qx=-0.161802, qy=-0.798017, qz=-0.522832), duration=0.25, gripper=-1.0)
run_single_waypoint_sequence(MOTION_SEQUENCE_01)


# Honest source-preserving motion compression candidate.
# Source policy: /workspace/action2code/repro_logs/pretrain_dreamonly_repair_65_cosmos/CoffeeServeMug/seed_195/episode_000000/refinement/20260403/CoffeeServeMug/iter_002/candidate.py
# Compression note: target_retained_waypoints=10; actual_retained_waypoints=10; keep_counts={0: 2, 1: 2, 2: 2, 3: 2, 4: 2}

from primitives import moveJoint, moveLinear, moveC, moveA, moveWholeBodyPath, moveActionSequence, grasp, release, wait

SCENE_ARTIFACT = '/workspace/action2code/outputs/artifacts/20260324/CoffeeServeMug/20260324_205300_coffee-serve-mug_episode_000000_action2code-open-loop-joint_initial-scene.json'
POLICY_METADATA = {'policy_kind': 'open_loop_joint', 'policy_variant': 'open-loop-joint', 'task_name': 'CoffeeServeMug', 'episode_id': 'episode_000000', 'scene_artifact_path': '/workspace/action2code/outputs/artifacts/20260324/CoffeeServeMug/20260324_205300_coffee-serve-mug_episode_000000_action2code-open-loop-joint_initial-scene.json', 'fitting_summary_path': '/workspace/action2code/outputs/artifacts/20260324/CoffeeServeMug/20260324_205300_coffee-serve-mug_episode_000000_action2code-open-loop-joint_fitting-summary.json', 'extracted_pose_metadata_path': '/workspace/action2code/outputs/artifacts/20260324/CoffeeServeMug/20260324_205300_coffee-serve-mug_episode_000000_action2code-open-loop-joint_extracted-pose-metadata.json', 'stable_grasp_contact_t': 65, 'stable_release_contact_loss_t': 113, 'uses_moveC': False, 'controller_mode': 'whole_body_ik'}

MOTION_SEQUENCE_00 = [
    {'target': [-0.025185, -1.063129, -0.029761, -2.261026, 0.053602, 1.548416, 0.68292], 'input_type': 'joint', 'steps': 1, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [0.054927, -1.097832, 0.120373, -2.994496, 0.212718, 2.309447, 0.569823], 'input_type': 'joint', 'steps': 63, 'settle_steps': 1, 'gripper': -1.0},
]
MOTION_SEQUENCE_01 = [
    {'target': [0.054025, -1.077764, 0.119024, -2.986179, 0.212113, 2.31992, 0.567931], 'input_type': 'joint', 'steps': 2, 'settle_steps': 1, 'gripper': 1.0},
    {'target': [0.052631, -1.048784, 0.113045, -2.958193, 0.205552, 2.293949, 0.565326], 'input_type': 'joint', 'steps': 7, 'settle_steps': 2, 'gripper': 1.0},
]
MOTION_SEQUENCE_02 = [
    {'target': [0.055981, -1.06421, 0.117825, -2.954991, 0.208304, 2.264551, 0.570604], 'input_type': 'joint', 'steps': 5, 'settle_steps': 2, 'gripper': 1.0},
    {'target': [0.076926, -1.164319, 0.154749, -2.952794, 0.230766, 2.136098, 0.607078], 'input_type': 'joint', 'steps': 15, 'settle_steps': 6, 'gripper': 1.0},
]
MOTION_SEQUENCE_03 = [
    {'target': [0.088876, -1.20817, 0.178155, -2.956132, 0.247865, 2.097934, 0.623557], 'input_type': 'joint', 'steps': 3, 'settle_steps': 1, 'gripper': 1.0},
    {'target': [0.162457, -1.030227, 0.496738, -2.965026, 0.506304, 2.455904, 0.752357], 'input_type': 'joint', 'steps': 35, 'settle_steps': 5, 'gripper': 1.0},
]
MOTION_SEQUENCE_04 = [
    {'target': [0.165847, -1.055886, 0.490049, -2.960257, 0.492839, 2.438909, 0.759067], 'input_type': 'joint', 'steps': 1, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [0.218936, -1.761234, 0.337104, -2.352066, -0.072461, 1.86573, 1.054864], 'input_type': 'joint', 'steps': 24, 'settle_steps': 0, 'gripper': -1.0},
]

def run_joint_sequence(sequence):
    for item in sequence:
        payload = dict(item)
        target = payload.pop('target')
        moveJoint(target, **payload)

run_joint_sequence(MOTION_SEQUENCE_00)
grasp(hold_target=[0.054927, -1.097832, 0.120373, -2.994496, 0.212718, 2.309447, 0.569823], input_type='joint', close_steps=3, settle_steps=2, gripper=1.0, require_contact_count=4)
wait(duration=0.2, hold_target=[0.054927, -1.097832, 0.120373, -2.994496, 0.212718, 2.309447, 0.569823], input_type='joint', gripper=1.0)
run_joint_sequence(MOTION_SEQUENCE_01)
wait(duration=0.1, hold_target=[0.052631, -1.048784, 0.113045, -2.958193, 0.205552, 2.293949, 0.565326], input_type='joint', gripper=1.0)
run_joint_sequence(MOTION_SEQUENCE_02)
wait(duration=0.1, hold_target=[0.076926, -1.164319, 0.154749, -2.952794, 0.230766, 2.136098, 0.607078], input_type='joint', gripper=1.0)
run_joint_sequence(MOTION_SEQUENCE_03)
wait(duration=0.1, hold_target=[0.162457, -1.030227, 0.496738, -2.965026, 0.506304, 2.455904, 0.752357], input_type='joint', gripper=1.0)
release(hold_target=[0.162457, -1.030227, 0.496738, -2.965026, 0.506304, 2.455904, 0.752357], input_type='joint', open_steps=1, settle_steps=0, gripper=-1.0)
wait(duration=0.05, hold_target=[0.162457, -1.030227, 0.496738, -2.965026, 0.506304, 2.455904, 0.752357], input_type='joint', gripper=-1.0)
run_joint_sequence(MOTION_SEQUENCE_04)

Pick the mug from under the coffee machine dispenser and place it on the counter.


# Honest source-preserving motion compression candidate.
# Source policy: /workspace/action2code/outputs/programs/20260413/CoffeeSetupMug/20260413_t2_k32_CoffeeSetupMug_source-compressed.py
# Compression note: tightening_round=3; source_policy=/workspace/action2code/outputs/programs/20260413/CoffeeSetupMug/20260413_t2_k32_CoffeeSetupMug_source-compressed.py; retained_waypoints=20; fingerprint=752796b6ee39; keep_indices={0: [0, 1, 2, 3, 4, 5, 6, 7], 1: [0, 2], 2: [0, 2, 3, 6], 3: [0, 3, 4, 6], 4: [0, 6]}

from primitives import moveJoint, moveLinear, moveC, moveA, moveWholeBodyPath, moveActionSequence, grasp, release, wait

SCENE_ARTIFACT = '/workspace/action2code/outputs/artifacts/20260324/CoffeeSetupMug/20260324_205301_coffee-setup-mug_episode_000000_action2code-open-loop-joint_initial-scene.json'
POLICY_METADATA = {'policy_kind': 'open_loop_joint', 'policy_variant': 'open-loop-joint', 'task_name': 'CoffeeSetupMug', 'episode_id': 'episode_000000', 'scene_artifact_path': '../../../artifacts/20260324/CoffeeSetupMug/20260324_205301_coffee-setup-mug_episode_000000_action2code-open-loop-joint_initial-scene.json', 'fitting_summary_path': '../../../artifacts/20260324/CoffeeSetupMug/20260324_205301_coffee-setup-mug_episode_000000_action2code-open-loop-joint_fitting-summary.json', 'extracted_pose_metadata_path': '../../../artifacts/20260324/CoffeeSetupMug/20260324_205301_coffee-setup-mug_episode_000000_action2code-open-loop-joint_extracted-pose-metadata.json', 'stable_grasp_contact_t': 103, 'stable_release_contact_loss_t': 206, 'uses_moveC': False, 'controller_mode': 'whole_body_ik'}

MOTION_SEQUENCE_00 = [
    {'primitive': 'moveJoint', 'target': [-0.062465, -0.994317, -0.008781, -2.28727, 0.06916, 1.545456, 0.718407], 'input_type': 'joint', 'steps': 1, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveJoint', 'target': [-0.037257, -1.060328, -0.379496, -2.395058, 0.196191, 1.713961, 0.245052], 'input_type': 'joint', 'steps': 11, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveJoint', 'target': [-0.016158, -1.139386, -0.629179, -2.609171, 0.30057, 1.71541, -0.314226], 'input_type': 'joint', 'steps': 7, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveJoint', 'target': [0.02382, -1.072313, -0.767203, -2.666487, 0.321276, 1.652577, -0.710537], 'input_type': 'joint', 'steps': 8, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveJoint', 'target': [-0.114947, -1.088537, -0.831663, -3.013173, 0.21516, 1.898127, -0.678212], 'input_type': 'joint', 'steps': 18, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveJoint', 'target': [-0.126293, -1.045773, -0.86317, -3.05225, 0.187256, 1.946622, -0.73306], 'input_type': 'joint', 'steps': 5, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveJoint', 'target': [-0.019293, -0.905609, -0.803667, -2.941166, 0.280324, 1.820884, -0.890095], 'input_type': 'joint', 'steps': 25, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveJoint', 'target': [-0.033602, -0.941478, -0.733272, -3.028401, 0.281266, 1.80085, -0.9365], 'input_type': 'joint', 'steps': 17, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveJoint', 'target': [-0.032716, -0.938575, -0.732093, -3.028385, 0.282059, 1.80033, -0.941049], 'input_type': 'joint', 'steps': 1, 'settle_steps': 0, 'gripper': 1.0},
    {'primitive': 'moveJoint', 'target': [-0.024705, -0.912876, -0.723316, -3.016679, 0.288104, 1.788745, -0.96807], 'input_type': 'joint', 'steps': 10, 'settle_steps': 0, 'gripper': 1.0},
]
MOTION_SEQUENCE_01 = [
    {'primitive': 'moveJoint', 'target': [-0.026198, -0.910656, -0.728642, -3.012351, 0.288775, 1.782714, -0.970027], 'input_type': 'joint', 'steps': 1, 'settle_steps': 0, 'gripper': 1.0},
    {'primitive': 'moveJoint', 'target': [-0.080551, -0.920846, -0.909356, -2.884409, 0.408441, 1.681917, -0.908431], 'input_type': 'joint', 'steps': 11, 'settle_steps': 0, 'gripper': 1.0},
    {'primitive': 'moveJoint', 'target': [-0.035234, -0.929755, -0.819659, -2.907969, 0.559079, 1.981343, -0.712036], 'input_type': 'joint', 'steps': 14, 'settle_steps': 0, 'gripper': 1.0},
    {'primitive': 'moveJoint', 'target': [0.101095, -0.763837, -0.636041, -2.870389, 0.667496, 2.326343, -0.711281], 'input_type': 'joint', 'steps': 21, 'settle_steps': 0, 'gripper': 1.0},
    {'primitive': 'moveJoint', 'target': [0.10034, -0.755788, -0.634179, -2.864027, 0.664213, 2.318836, -0.706921], 'input_type': 'joint', 'steps': 2, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveJoint', 'target': [-0.042969, -0.915506, -0.970463, -2.645388, 0.501635, 1.812902, -0.608826], 'input_type': 'joint', 'steps': 30, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveJoint', 'target': [0.017415, -0.90318, -1.188249, -2.520849, 0.479869, 1.622888, -0.646671], 'input_type': 'joint', 'steps': 8, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveJoint', 'target': [0.127491, -0.967917, -1.272631, -2.460421, 0.408043, 1.599186, -0.601025], 'input_type': 'joint', 'steps': 16, 'settle_steps': 0, 'gripper': -1.0},
]
MOTION_SEQUENCE_02 = [
    {'primitive': 'moveJoint', 'target': [0.126173, -0.974863, -1.276358, -2.456615, 0.391752, 1.592569, -0.602919], 'input_type': 'joint', 'steps': 1, 'settle_steps': 0, 'gripper': -1.0},
    {'primitive': 'moveJoint', 'target': [-0.055901, -1.145359, -1.046141, -2.46755, -0.080678, 1.63865, -0.759663], 'input_type': 'joint', 'steps': 14, 'settle_steps': 0, 'gripper': -1.0},
]

def run_single_waypoint_sequence(sequence):
    for item in sequence:
        payload = dict(item)
        primitive = payload.pop('primitive')
        target = payload.pop('target')
        if primitive == 'moveJoint':
            moveJoint(target, **payload)
        elif primitive == 'moveLinear':
            moveLinear(target, **payload)
        else:
            raise ValueError(f'Unsupported sequence primitive: {primitive}')

run_single_waypoint_sequence(MOTION_SEQUENCE_00)
wait(duration=0.05, hold_target=[-0.024705, -0.912876, -0.723316, -3.016679, 0.288104, 1.788745, -0.96807], input_type='joint', gripper=-0.3)
grasp(hold_target=[-0.024705, -0.912876, -0.723316, -3.016679, 0.288104, 1.788745, -0.96807], input_type='joint', close_steps=1, settle_steps=0, gripper=1.0, require_contact_count=4)
wait(duration=0.05, hold_target=[-0.024705, -0.912876, -0.723316, -3.016679, 0.288104, 1.788745, -0.96807], input_type='joint', gripper=1.0)
run_single_waypoint_sequence(MOTION_SEQUENCE_01)
wait(duration=0.05, hold_target=[0.127491, -0.967917, -1.272631, -2.460421, 0.408043, 1.599186, -0.601025], input_type='joint', gripper=-1.0)
release(hold_target=[0.127491, -0.967917, -1.272631, -2.460421, 0.408043, 1.599186, -0.601025], input_type='joint', open_steps=1, settle_steps=0, gripper=-1.0)
wait(duration=0.05, hold_target=[0.127491, -0.967917, -1.272631, -2.460421, 0.408043, 1.599186, -0.601025], input_type='joint', gripper=-1.0)
run_single_waypoint_sequence(MOTION_SEQUENCE_02)

Pick the mug from the counter and place it under the coffee machine dispenser.


# Honest source-preserving motion compression candidate.
# Source policy: /workspace/action2code/outputs/programs/20260324/LowerHeat/20260324_205302_lower-heat_episode_000000_action2code-open-loop-joint.py
# Compression note: target_retained_waypoints=4; actual_retained_waypoints=4; keep_counts={0: 2, 1: 2}

from primitives import moveJoint, moveLinear, moveC, moveA, moveWholeBodyPath, moveActionSequence, grasp, release, wait

SCENE_ARTIFACT = '/workspace/action2code/outputs/artifacts/20260324/LowerHeat/20260324_205302_lower-heat_episode_000000_action2code-open-loop-joint_initial-scene.json'
POLICY_METADATA = {'policy_kind': 'open_loop_joint', 'policy_variant': 'open-loop-joint', 'task_name': 'LowerHeat', 'episode_id': 'episode_000000', 'scene_artifact_path': '../../../artifacts/20260324/LowerHeat/20260324_205302_lower-heat_episode_000000_action2code-open-loop-joint_initial-scene.json', 'fitting_summary_path': '../../../artifacts/20260324/LowerHeat/20260324_205302_lower-heat_episode_000000_action2code-open-loop-joint_fitting-summary.json', 'extracted_pose_metadata_path': '../../../artifacts/20260324/LowerHeat/20260324_205302_lower-heat_episode_000000_action2code-open-loop-joint_extracted-pose-metadata.json', 'stable_grasp_contact_t': 157, 'stable_release_contact_loss_t': 157, 'uses_moveC': False, 'controller_mode': 'whole_body_ik'}

MOTION_SEQUENCE_00 = [
    {'target': [-0.037254, -1.017783, -0.011157, -2.299278, 0.065523, 1.496358, 0.695959], 'input_type': 'joint', 'steps': 1, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [0.228026, 0.334725, 0.224004, -1.640389, -1.355165, 2.262521, 0.881499], 'input_type': 'joint', 'steps': 120, 'settle_steps': 0, 'gripper': -1.0},
    {'target': [0.227175, 0.333631, 0.222968, -1.643679, -1.364038, 2.269217, 0.891199], 'input_type': 'joint', 'steps': 1, 'settle_steps': 0, 'gripper': 1.0},
    {'target': [0.13723, 0.261274, 0.164851, -1.742961, -0.626639, 2.662993, 1.321607], 'input_type': 'joint', 'steps': 50, 'settle_steps': 0, 'gripper': 1.0},
]

def run_joint_sequence(sequence):
    for item in sequence:
        payload = dict(item)
        target = payload.pop('target')
        moveJoint(target, **payload)

run_joint_sequence(MOTION_SEQUENCE_00)

kettle

all kettle_non_electric receptacle kettle cookware