Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 99 additions & 16 deletions docs/user_guide/01_material-handling/storage/inheco/scila.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"data": {
"text/plain": [
"{'Drawer1': 'Closed',\n",
" 'Drawer2': 'Opened',\n",
" 'Drawer2': 'Closed',\n",
" 'Drawer3': 'Closed',\n",
" 'Drawer4': 'Closed'}"
]
Expand Down Expand Up @@ -220,7 +220,7 @@
{
"data": {
"text/plain": [
"24.28"
"19.06"
]
},
"execution_count": 11,
Expand All @@ -234,17 +234,92 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 15,
"id": "a1958744-006b-4302-a2f4-af03c5764a2d",
"metadata": {
"scrolled": true
},
{
"data": {
"text/plain": [
"['DrawerPosition',\n",
" '__abstractmethods__',\n",
" '__annotations__',\n",
" '__class__',\n",
" '__delattr__',\n",
" '__dict__',\n",
" '__dir__',\n",
" '__doc__',\n",
" '__eq__',\n",
" '__format__',\n",
" '__ge__',\n",
" '__getattribute__',\n",
" '__getstate__',\n",
" '__gt__',\n",
" '__hash__',\n",
" '__init__',\n",
" '__init_subclass__',\n",
" '__le__',\n",
" '__lt__',\n",
" '__module__',\n",
" '__ne__',\n",
" '__new__',\n",
" '__reduce__',\n",
" '__reduce_ex__',\n",
" '__repr__',\n",
" '__setattr__',\n",
" '__sizeof__',\n",
" '__slots__',\n",
" '__str__',\n",
" '__subclasshook__',\n",
" '__weakref__',\n",
" '_abc_impl',\n",
" '_instances',\n",
" '_reset_and_initialize',\n",
" '_sila_interface',\n",
" 'close_drawer',\n",
" 'deactivate_temperature_control',\n",
" 'deserialize',\n",
" 'get_all_instances',\n",
" 'get_co2_flow_status',\n",
" 'get_current_temperature',\n",
" 'get_drawer_position',\n",
" 'get_drawer_positions',\n",
" 'get_liquid_level',\n",
" 'get_status',\n",
" 'get_target_temperature',\n",
" 'get_temperature_control_enabled',\n",
" 'get_temperature_information',\n",
" 'get_valve_status',\n",
" 'open_drawer',\n",
" 'serialize',\n",
" 'set_tempeature',\n",
" 'setup',\n",
" 'stop']"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"dir(scila)"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "cc2f6063",
"metadata": {},
"outputs": [],
"source": [
"await scila.set_temperature(37.0)"
"await scila.set_tempeature(37.0)"
]
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 18,
"id": "5f04d0ef",
"metadata": {},
"outputs": [
Expand All @@ -254,7 +329,7 @@
"37.0"
]
},
"execution_count": 13,
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -265,17 +340,17 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 19,
"id": "02a60f32",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"24.3"
"23.04"
]
},
"execution_count": 14,
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -286,7 +361,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 20,
"id": "470241e1",
"metadata": {},
"outputs": [
Expand All @@ -296,7 +371,7 @@
"True"
]
},
"execution_count": 15,
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -307,7 +382,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 21,
"id": "5881c2ce",
"metadata": {},
"outputs": [],
Expand All @@ -317,7 +392,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 22,
"id": "ac8ad797",
"metadata": {},
"outputs": [
Expand All @@ -327,19 +402,27 @@
"False"
]
},
"execution_count": 17,
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"await scila.get_temperature_control_enabled()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "67b2946d-4d5c-4d13-a74c-59eb5e9c9791",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "env",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -353,7 +436,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.24"
"version": "3.12.11"
}
},
"nbformat": 4,
Expand Down
1 change: 1 addition & 0 deletions pylabrobot/arms/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from .kx2 import *
from .precise_flex import *
from .scara import *
from .standard import *
23 changes: 16 additions & 7 deletions pylabrobot/arms/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
from dataclasses import dataclass
from typing import Optional, Union

from pylabrobot.arms.precise_flex.coords import PreciseFlexCartesianCoords
from pylabrobot.arms.standard import JointCoords
from pylabrobot.arms.standard import GripperPose, JointCoords
from pylabrobot.machines.backend import MachineBackend


Expand Down Expand Up @@ -78,7 +77,7 @@ async def move_to_safe(self) -> None:
@abstractmethod
async def approach(
self,
position: Union[PreciseFlexCartesianCoords, JointCoords],
position: Union[GripperPose, JointCoords],
access: Optional[AccessPattern] = None,
) -> None:
"""Move the arm to an approach position (offset from target).
Expand All @@ -91,7 +90,7 @@ async def approach(
@abstractmethod
async def pick_up_resource(
self,
position: Union[PreciseFlexCartesianCoords, JointCoords],
position: Union[GripperPose, JointCoords],
plate_width: float,
access: Optional[AccessPattern] = None,
) -> None:
Expand All @@ -105,7 +104,7 @@ async def pick_up_resource(
@abstractmethod
async def drop_resource(
self,
position: Union[PreciseFlexCartesianCoords, JointCoords],
position: Union[GripperPose, JointCoords],
access: Optional[AccessPattern] = None,
) -> None:
"""Place a plate at the specified position.
Expand All @@ -116,13 +115,23 @@ async def drop_resource(
"""

@abstractmethod
async def move_to(self, position: Union[PreciseFlexCartesianCoords, JointCoords]) -> None:
async def move_to(self, position: Union[GripperPose, JointCoords]) -> None:
"""Move the arm to a specified position in 3D space or in joint space."""

# TODO: move_to_cartesian and move_to_joint

@abstractmethod
async def get_joint_position(self) -> JointCoords:
"""Get the current position of the arm in joint space."""

@abstractmethod
async def get_cartesian_position(self) -> PreciseFlexCartesianCoords:
async def get_cartesian_position(self) -> GripperPose:
"""Get the current position of the arm in 3D space."""

async def activate_free_mode(self) -> None:
"""Activates free / "drag to teach mode."""
raise NotImplementedError("Free mode not implemented for this backend.")

async def deactivate_free_mode(self) -> None:
"""Deactivates free mode."""
raise NotImplementedError("Free mode not implemented for this backend.")
Loading
Loading