Skip to content

Commit 49baccd

Browse files
authored
Disable torque before applying calibration logic (#1889)
1 parent 6a3d570 commit 49baccd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/lerobot/robots/koch_follower/koch_follower.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ def is_calibrated(self) -> bool:
110110
return self.bus.is_calibrated
111111

112112
def calibrate(self) -> None:
113+
self.bus.disable_torque()
113114
if self.calibration:
114115
# Calibration file exists, ask user whether to use it or run new calibration
115116
user_input = input(
@@ -120,7 +121,6 @@ def calibrate(self) -> None:
120121
self.bus.write_calibration(self.calibration)
121122
return
122123
logger.info(f"\nRunning calibration of {self}")
123-
self.bus.disable_torque()
124124
for motor in self.bus.motors:
125125
self.bus.write("Operating_Mode", motor, OperatingMode.EXTENDED_POSITION.value)
126126

src/lerobot/teleoperators/koch_leader/koch_leader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ def is_calibrated(self) -> bool:
8888
return self.bus.is_calibrated
8989

9090
def calibrate(self) -> None:
91+
self.bus.disable_torque()
9192
if self.calibration:
9293
# Calibration file exists, ask user whether to use it or run new calibration
9394
user_input = input(
@@ -98,7 +99,6 @@ def calibrate(self) -> None:
9899
self.bus.write_calibration(self.calibration)
99100
return
100101
logger.info(f"\nRunning calibration of {self}")
101-
self.bus.disable_torque()
102102
for motor in self.bus.motors:
103103
self.bus.write("Operating_Mode", motor, OperatingMode.EXTENDED_POSITION.value)
104104

0 commit comments

Comments
 (0)