@@ -64,7 +64,7 @@ def move_until_block(arm, motor_name, positive_direction=True, while_move_hook=N
64
64
# print(f"{present_voltage=}")
65
65
# print(f"{present_temperature=}")
66
66
67
- if present_speed == 0 and present_current > 50 :
67
+ if present_speed == 0 and present_current > 40 :
68
68
count += 1
69
69
if count > 100 or present_current > 300 :
70
70
return present_pos
@@ -306,16 +306,16 @@ def run_arm_auto_calibration_moss(arm: MotorsBus, robot_type: str, arm_name: str
306
306
calib = {}
307
307
308
308
print ("Calibrate shoulder_pan" )
309
- calib ["shoulder_pan" ] = move_to_calibrate (arm , "shoulder_pan" , load_threshold = 350 , count_threshold = 200 )
309
+ calib ["shoulder_pan" ] = move_to_calibrate (arm , "shoulder_pan" )
310
310
arm .write ("Goal_Position" , calib ["shoulder_pan" ]["zero_pos" ], "shoulder_pan" )
311
311
time .sleep (1 )
312
312
313
313
print ("Calibrate gripper" )
314
- calib ["gripper" ] = move_to_calibrate (arm , "gripper" , invert_drive_mode = True , count_threshold = 200 )
314
+ calib ["gripper" ] = move_to_calibrate (arm , "gripper" , invert_drive_mode = True )
315
315
time .sleep (1 )
316
316
317
317
print ("Calibrate wrist_flex" )
318
- calib ["wrist_flex" ] = move_to_calibrate (arm , "wrist_flex" , invert_drive_mode = True , count_threshold = 200 )
318
+ calib ["wrist_flex" ] = move_to_calibrate (arm , "wrist_flex" , invert_drive_mode = True )
319
319
calib ["wrist_flex" ] = apply_offset (calib ["wrist_flex" ], offset = - 210 + 1024 )
320
320
321
321
wr_pos = arm .read ("Present_Position" , "wrist_roll" )
@@ -329,7 +329,7 @@ def run_arm_auto_calibration_moss(arm: MotorsBus, robot_type: str, arm_name: str
329
329
time .sleep (1 )
330
330
331
331
print ("Calibrate wrist_roll" )
332
- calib ["wrist_roll" ] = move_to_calibrate (arm , "wrist_roll" , invert_drive_mode = True , count_threshold = 200 )
332
+ calib ["wrist_roll" ] = move_to_calibrate (arm , "wrist_roll" , invert_drive_mode = True )
333
333
calib ["wrist_roll" ] = apply_offset (calib ["wrist_roll" ], offset = 790 )
334
334
335
335
arm .write ("Goal_Position" , calib ["wrist_roll" ]["zero_pos" ] - 1024 , "wrist_roll" )
@@ -348,7 +348,6 @@ def in_between_move_elbow_flex_hook():
348
348
arm ,
349
349
"elbow_flex" ,
350
350
invert_drive_mode = True ,
351
- count_threshold = 200 ,
352
351
in_between_move_hook = in_between_move_elbow_flex_hook ,
353
352
)
354
353
arm .write ("Goal_Position" , calib ["wrist_flex" ]["zero_pos" ] - 1024 , "wrist_flex" )
0 commit comments