|
24 | 24 |
|
25 | 25 | class SpeedUpRobot(Tool): |
26 | 26 | """If you want to speed up the robot, use this function. The default is to speed up |
27 | | - for the whole time period, so use 0.0 for adaption_start and 1.0 for adaption_end. |
28 | | - :param speed_up_value: percentual speedup of the robot. Default value is 40 for 40 percent. |
29 | | - :param adaption_start: Start time from when you want to speed up the robot, ranges from 0.0 to 1.0, |
| 27 | + for the whole time period, so use 0.0 for adaptation_start and 1.0 for adaptation_end. |
| 28 | + :param speed_up_value: percentage speedup of the robot. Default value is 40 for 40 percent. |
| 29 | + :param adaptation_start: Start time from when you want to speed up the robot, ranges from 0.0 to 1.0, |
30 | 30 | where 0.0 is the start and 1.0 is the end time. |
31 | | - :param adaption_end: Time when you want to stop the speedup of the robot, ranges from 0.0 to 1.0 |
32 | | - and has to be bigger than the adaption_start. |
| 31 | + :param adaptation_end: Time when you want to stop the speedup of the robot, ranges from 0.0 to 1.0 |
| 32 | + and has to be bigger than the adaptation_start. |
33 | 33 | """ |
34 | 34 |
|
35 | 35 | speed_up_value: int |
36 | | - adaption_start: float |
37 | | - adaption_end: float |
| 36 | + adaptation_start: float |
| 37 | + adaptation_end: float |
38 | 38 |
|
39 | 39 | def execute(self, kmp: KMPWrapper) -> str: |
40 | 40 | if kmp.robot is None: |
41 | 41 | raise ToolArgsValidationError("No robot configured for speed modulation") |
42 | 42 | try: |
43 | | - kmp.robot.change_predicting_frequency(-self.speed_up_value, self.adaption_start, self.adaption_end) |
| 43 | + kmp.robot.change_predicting_frequency(-self.speed_up_value, self.adaptation_start, self.adaptation_end) |
44 | 44 | except Exception as e: |
45 | 45 | raise ToolArgsValidationError(f"Error speeding up robot: {e}") from e |
46 | 46 | return ( |
47 | 47 | f"IROSA: Increased robot speed by {self.speed_up_value} percent" |
48 | | - f" at the range {self.adaption_start} - {self.adaption_end}" |
| 48 | + f" at the range {self.adaptation_start} - {self.adaptation_end}" |
49 | 49 | ) |
50 | 50 |
|
51 | 51 |
|
52 | 52 | class SlowDownRobot(Tool): |
53 | 53 | """If you want to slow down the robot, use this function. The default is to slow down |
54 | | - for the whole time period, so use 0.0 for adaption_start and 1.0 for adaption_end. |
55 | | - :param slow_down_value: percentual slowdown of the robot, default value is 80. Only values > 0 are allowed. |
56 | | - :param adaption_start: Start time from when you want to slow down the robot, |
| 54 | + for the whole time period, so use 0.0 for adaptation_start and 1.0 for adaptation_end. |
| 55 | + :param slow_down_value: percentage slowdown of the robot, default value is 80. Only values > 0 are allowed. |
| 56 | + :param adaptation_start: Start time from when you want to slow down the robot, |
57 | 57 | ranges from 0.0 to 1.0, where 0.0 is the start and 1.0 is the end time. |
58 | | - :param adaption_end: Time when you want to stop the slowdown of the robot, |
59 | | - ranges from 0.0 to 1.0 and has to be bigger than the adaption_start. |
| 58 | + :param adaptation_end: Time when you want to stop the slowdown of the robot, |
| 59 | + ranges from 0.0 to 1.0 and has to be bigger than the adaptation_start. |
60 | 60 | """ |
61 | 61 |
|
62 | 62 | slow_down_value: int |
63 | | - adaption_start: float |
64 | | - adaption_end: float |
| 63 | + adaptation_start: float |
| 64 | + adaptation_end: float |
65 | 65 |
|
66 | 66 | def execute(self, kmp: KMPWrapper) -> str: |
67 | 67 | if kmp.robot is None: |
68 | 68 | raise ToolArgsValidationError("No robot configured for speed modulation") |
69 | 69 | try: |
70 | | - kmp.robot.change_predicting_frequency(self.slow_down_value, self.adaption_start, self.adaption_end) |
| 70 | + kmp.robot.change_predicting_frequency(self.slow_down_value, self.adaptation_start, self.adaptation_end) |
71 | 71 | except Exception as e: |
72 | 72 | raise ToolArgsValidationError(f"Error slowing down the robot: {e}") from e |
73 | 73 | return ( |
74 | 74 | f"IROSA: Decreased robot speed by {self.slow_down_value} percent" |
75 | | - f" at the range {self.adaption_start} - {self.adaption_end}" |
| 75 | + f" at the range {self.adaptation_start} - {self.adaptation_end}" |
76 | 76 | ) |
0 commit comments