Update hexapod.py

master
Zhengyu Peng 3 years ago
parent f1ad51199b
commit a796d57e0b

@ -334,11 +334,12 @@ class Hexapod(Thread):
if op == 'angle':
self.legs[leg_idx].set_angle(joint_idx, angle)
elif op == 'offset':
config_str = 'leg'+str(leg_idx)+'Offset'
self.legs[leg_idx].correction[joint_idx] = angle
self.config[config_str] = self.legs[leg_idx].correction
self.legs[leg_idx].reset(calibrated=True)
config_str = 'leg'+str(leg_idx)+'Offset'
self.config[config_str] = self.legs[leg_idx].correction
def run(self):
while True:
# if self.current_motion is None:

Loading…
Cancel
Save