File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 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+
You can’t perform that action at this time.
0 commit comments