From b4d8919647e79f7aa6e0d20819d5f29d16060afa Mon Sep 17 00:00:00 2001 From: Michelangelo Naim Date: Fri, 11 Sep 2026 15:12:58 -0400 Subject: [PATCH] franka: expose motor_torques_external in get_robot_state polymetis has carried it all along -- the franka client fills it from libfranka's tau_ext_hat_filtered every control cycle -- but the droid state dict never passed it on. It is the link-side external-torque estimate a guarded press needs to feel the button: without it the press falls back to measured minus computed torques, which reads ~37 N at rest on the Basis bench, and no contact threshold can sit above that. BabyRobotPredicator's press_calibration.py refuses to run until this key is present, by design. Claude-Session: https://claude.ai/code/session_01R6GJkrzoJJvtjR1mdsPNwh --- droid/franka/robot.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/droid/franka/robot.py b/droid/franka/robot.py index ff8300a..2019d80 100644 --- a/droid/franka/robot.py +++ b/droid/franka/robot.py @@ -230,6 +230,12 @@ def get_robot_state(self): "prev_joint_torques_computed": list(robot_state.prev_joint_torques_computed), "prev_joint_torques_computed_safened": list(robot_state.prev_joint_torques_computed_safened), "motor_torques_measured": list(robot_state.motor_torques_measured), + # libfranka's tau_ext_hat_filtered, filled every cycle by + # franka_panda_client.cpp. The link-side external-torque estimate + # that a guarded press needs: the measured-minus-computed residual + # reads ~37 N at rest on this bench, which no contact threshold + # can sit above. + "motor_torques_external": list(robot_state.motor_torques_external), "prev_controller_latency_ms": robot_state.prev_controller_latency_ms, "prev_command_successful": robot_state.prev_command_successful, }