wait for first actions

This commit is contained in:
Pepijn
2026-01-09 13:45:06 +01:00
parent 63c28ea395
commit 9cc841c674
2 changed files with 11 additions and 0 deletions
+6
View File
@@ -372,6 +372,12 @@ def actor_thread(
prev_action = current_action
interp_idx = 0
else:
# No action yet - hold current position while waiting for first inference
obs = robot.get_observation()
hold_pos = {k: v for k, v in obs.items() if k.endswith(".pos")}
robot.send_action(hold_pos)
robot_send_count += 1
if interp_idx < len(interpolated_actions):
action_to_send = interpolated_actions[interp_idx]
@@ -547,6 +547,11 @@ def main(cfg: RaCRTCConfig):
prev_action = current_action
interp_idx = 0
else:
# No action yet - hold current position while waiting for first inference
hold_pos = {k: v for k, v in obs_filtered.items() if k.endswith(".pos")}
robot.send_action(hold_pos)
robot_send_count += 1
if interp_idx < len(interpolated_actions):
action_to_send = interpolated_actions[interp_idx]