Ejemplo n.º 1
0
    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)
Ejemplo n.º 2
0
    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
Ejemplo n.º 3
0
    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()