Skip to content

Commit d2d069a

Browse files
committed
Adds Arm Machine class
1 parent 9e90c99 commit d2d069a

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

pylabrobot/arms/arm.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
from pylabrobot.arms.backend import ArmBackend
3+
from pylabrobot.machines.machine import Machine
4+
5+
6+
class Arm(Machine):
7+
"""A robotic arm."""
8+
9+
def __init__(self, backend: ArmBackend):
10+
super().__init__(backend=backend)
11+
self.backend = backend
12+
13+
async def move_to(self, position: tuple[float, float, float]):
14+
"""Move the arm to a specified position in 3D space."""
15+
return self.backend.move_to(position)
16+
17+
async def get_position(self) -> tuple[float, float, float]:
18+
"""Get the current position of the arm in 3D space."""
19+
return await self.backend.get_position()
20+
21+
async def set_speed(self, speed: float):
22+
"""Set the speed of the arm's movement."""
23+
return await self.backend.set_speed(speed)
24+
25+
async def get_speed(self) -> float:
26+
"""Get the current speed of the arm's movement."""
27+
return await self.backend.get_speed()
28+
29+

0 commit comments

Comments
 (0)