Skip to content

Commit 100f948

Browse files
committed
chore: fix typos
1 parent 7e6fbd2 commit 100f948

9 files changed

Lines changed: 40 additions & 40 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ User Command (natural language)
7171

7272
| Tool | Paper Section | Purpose | Parameters |
7373
|------|--------------|---------|------------|
74-
| `SpeedUpRobot` / `SlowDownRobot` | IV-D, Eq. 3-4 | Temporal trajectory adjustment | speed_value, adaption_start, adaption_end |
74+
| `SpeedUpRobot` / `SlowDownRobot` | IV-D, Eq. 3-4 | Temporal trajectory adjustment | speed_value, adaptation_start, adaptation_end |
7575
| `AddViaPointsAtTime` | IV-D | Spatial trajectory correction via KMP via-points | input_values (times), output_values (positions) |
7676
| `AddRepulsionPoint` | IV-D, Eq. 5-6 | Obstacle avoidance via SDF-based correction | position, radius/dimensions |
7777
| `GetViaPoints` / `RemoveViaPoints*` | - | Via-point management | - |
@@ -203,7 +203,7 @@ model = KMPWrapper(demonstration_path="data/demonstrations.npz", force_retrain=T
203203

204204
# Speed modulation: slow down between t=0.55 and t=0.72
205205
model.robot.change_predicting_frequency(
206-
percentual_factor=50, adaption_start=0.55, adaption_end=0.72
206+
percentage_factor=50, adaptation_start=0.55, adaptation_end=0.72
207207
)
208208

209209
# Via-point insertion: add waypoint at camera position

examples/experiment_speed.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,11 @@ def run():
104104

105105
# Step 4: Apply speed modulation (what the LLM tool call does)
106106
# SlowDownRobot scales dt by factor (|gamma|+100)/100 = 1.5 for gamma=50
107-
print(f"\nTool call: SlowDownRobot(slow_down_value=50, adaption_start={t_box:.2f}, adaption_end={t_station:.2f})")
107+
print(f"\nTool call: SlowDownRobot(slow_down_value=50, adaptation_start={t_box:.2f}, adaptation_end={t_station:.2f})")
108108
tool = SlowDownRobot(
109109
slow_down_value=50,
110-
adaption_start=round(t_box, 2),
111-
adaption_end=round(t_station, 2),
110+
adaptation_start=round(t_box, 2),
111+
adaptation_end=round(t_station, 2),
112112
)
113113
result = tool.execute(model)
114114
print(f"Result: {result}")

irosa/robots/robot.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -80,36 +80,36 @@ def on_viapoints_added(self, positions_xyz: list[list]) -> None:
8080
def on_viapoints_removed(self, positions_xyz: list[list]) -> None:
8181
"""Called when via-points are removed."""
8282

83-
def change_predicting_frequency(self, percentual_factor: int, adaption_start: float, adaption_end: float) -> None:
83+
def change_predicting_frequency(self, percentage_factor: int, adaptation_start: float, adaptation_end: float) -> None:
8484
"""Change execution speed for a time segment.
8585
8686
Increasing delta_t slows the robot; decreasing delta_t speeds it up.
8787
If set to 50%, delta_t is increased by 1.5x (slowing down).
8888
If set to -50%, delta_t is decreased by 0.5x (speeding up).
8989
90-
:param percentual_factor: Speed change in percent (positive=slower, negative=faster)
91-
:param adaption_start: Start time (0.0-1.0)
92-
:param adaption_end: End time (0.0-1.0)
90+
:param percentage_factor: Speed change in percent (positive=slower, negative=faster)
91+
:param adaptation_start: Start time (0.0-1.0)
92+
:param adaptation_end: End time (0.0-1.0)
9393
"""
9494
if len(self.predicting_frequency) == 0:
9595
raise RuntimeError("The predicting frequency was not set, please set it first")
9696

97-
factor = (abs(percentual_factor) + 100) / 100
98-
if percentual_factor < 0:
97+
factor = (abs(percentage_factor) + 100) / 100
98+
if percentage_factor < 0:
9999
factor = 1 / factor
100100

101-
if not (0.0 <= adaption_start <= 1.0):
102-
raise ValueError("adaption_start has to be a value between 0.0 and 1.0")
103-
if not (0.0 <= adaption_end <= 1.0):
104-
raise ValueError("adaption_end has to be a value between 0.0 and 1.0")
105-
if adaption_end <= adaption_start:
106-
raise ValueError("adaption_end has to be a larger value than adaption_start")
101+
if not (0.0 <= adaptation_start <= 1.0):
102+
raise ValueError("adaptation_start has to be a value between 0.0 and 1.0")
103+
if not (0.0 <= adaptation_end <= 1.0):
104+
raise ValueError("adaptation_end has to be a value between 0.0 and 1.0")
105+
if adaptation_end <= adaptation_start:
106+
raise ValueError("adaptation_end has to be a larger value than adaptation_start")
107107

108108
new_pred_frequency = self.predicting_frequency.copy()
109109
for idx, val_time in enumerate(self.timesteps):
110-
if val_time < adaption_start:
110+
if val_time < adaptation_start:
111111
continue
112-
if val_time > adaption_end:
112+
if val_time > adaptation_end:
113113
break
114114
new_pred_frequency[idx] = abs(self.predicting_frequency[idx] * factor)
115115

irosa/tool_definitions/kmp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class AddViaPointsAtTime(Tool):
3838
"""If you want to add several via-points at specific times, use this function.
3939
Add multiple via-points at specific times with specific positions.
4040
:param input_values: List of floats representing the times of the viapoints
41-
:param output_values: List of lists of floats representing the positions of the viapoint
41+
:param output_values: List of lists of floats representing the positions of the viapoints
4242
"""
4343

4444
input_values: list[float]

irosa/tool_definitions/robot.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,53 +24,53 @@
2424

2525
class SpeedUpRobot(Tool):
2626
"""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,
3030
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.
3333
"""
3434

3535
speed_up_value: int
36-
adaption_start: float
37-
adaption_end: float
36+
adaptation_start: float
37+
adaptation_end: float
3838

3939
def execute(self, kmp: KMPWrapper) -> str:
4040
if kmp.robot is None:
4141
raise ToolArgsValidationError("No robot configured for speed modulation")
4242
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)
4444
except Exception as e:
4545
raise ToolArgsValidationError(f"Error speeding up robot: {e}") from e
4646
return (
4747
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}"
4949
)
5050

5151

5252
class SlowDownRobot(Tool):
5353
"""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,
5757
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.
6060
"""
6161

6262
slow_down_value: int
63-
adaption_start: float
64-
adaption_end: float
63+
adaptation_start: float
64+
adaptation_end: float
6565

6666
def execute(self, kmp: KMPWrapper) -> str:
6767
if kmp.robot is None:
6868
raise ToolArgsValidationError("No robot configured for speed modulation")
6969
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)
7171
except Exception as e:
7272
raise ToolArgsValidationError(f"Error slowing down the robot: {e}") from e
7373
return (
7474
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}"
7676
)

results/experiment1_speed.png

2.36 KB
Loading

results/experiment2_viapoint.png

6.46 KB
Loading

results/experiment3_obstacle.png

-66 Bytes
Loading

tests/test_tool_definitions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ def test_tool_schema_generation():
4646
schema = SpeedUpRobot.to_openai_tool()
4747
params = schema["function"]["parameters"]
4848
assert "speed_up_value" in params["properties"]
49-
assert "adaption_start" in params["properties"]
50-
assert "adaption_end" in params["properties"]
49+
assert "adaptation_start" in params["properties"]
50+
assert "adaptation_end" in params["properties"]
5151

5252

5353
def test_slow_down_schema():

0 commit comments

Comments
 (0)