def dry_run(self): motor = self.robot.m4 controller = EasingController(motor, BounceEase()) controller.goal = 50 for move in controller: print(move) time.sleep(0.002)
def config_controller_test_array(self): res = {} for motor in self.robot.motors: key = motor.name controller = EasingController(motor) controller.goal = 70 controller.__iter__() res[key] = controller return res
def move_first(self): motor = self.robot.m5 controller = EasingController(motor, LinearEase(), 5000) controller.goal = -50 for move in controller: motor.goal_position = move time.sleep(0.0002) else: print("Move done") controller.goal = -70 time.sleep(2) for move in controller: motor.goal_position = move time.sleep(0.0002) else: print("Move done") self.robot.stop_sync()