Skip to content

[STAR] fix core gripper location #133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
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
12 changes: 6 additions & 6 deletions pylabrobot/liquid_handling/backends/hamilton/STAR.py
Original file line number Diff line number Diff line change
Expand Up @@ -4069,7 +4069,7 @@ async def get_core(self, p1: int, p2: int):
if deck_size == STARLET_SIZE_X:
xs = "07975" # 1360-797.5 = 562.5
elif deck_size == STAR_SIZE_X:
xs = "13375" # 1900-1337.5 = 562.5
xs = "13385" # 1900-1337.5 = 562.5, plus a manual adjustment of + 10
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should I tweak the starlet by the same amount?

more generally should there be a constants.py file containing a "core_hotel" dict? This would ensure that the get and put commands use the same value.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could this be a constant at the top of the file? / what is the rationale for putting this in a separate file if it's only used in STAR.py?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's just a massive file 🙃 either way works for me.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's massive, but i don't really see a clean way of splitting it up. moving tiny things to different files seem more confusing to me

else:
raise ValueError(f"Deck size {deck_size} not supported")

Expand All @@ -4078,8 +4078,8 @@ async def get_core(self, p1: int, p2: int):
command="ZT",
xs=xs,
xd="0",
ya="1250",
yb="1070",
ya="1240",
yb="1065",
pa=f"{p1:02}",
pb=f"{p2:02}",
tp="2350",
Expand All @@ -4098,16 +4098,16 @@ async def put_core(self):
if deck_size == STARLET_SIZE_X:
xs = "07975"
elif deck_size == STAR_SIZE_X:
xs = "13375"
xs = "13385"
else:
raise ValueError(f"Deck size {deck_size} not supported")
command_output = await self.send_command(
module="C0",
command="ZS",
xs=xs,
xd="0",
ya="1250",
yb="1070",
ya="1240",
yb="1065",
tp="2150",
tz="2050",
th=int(self._traversal_height * 10),
Expand Down
4 changes: 2 additions & 2 deletions pylabrobot/liquid_handling/backends/hamilton/STAR_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -765,14 +765,14 @@ def test_serialize(self):
async def test_move_core(self):
await self.lh.move_plate(self.plate, self.plt_car[1], pickup_distance_from_top=13,
use_arm="core")
self._assert_command_sent_once("C0ZTid0020xs07975xd0ya1250yb1070pa07pb08tp2350tz2250th2450tt14",
self._assert_command_sent_once("C0ZTid0020xs07975xd0ya1240yb1065pa07pb08tp2350tz2250th2450tt14",
"xs#####xd#ya####yb####pa##pb##tp####tz####th####tt##")
self._assert_command_sent_once("C0ZPid0021xs03475xd0yj1145yv0050zj1876zy0500yo0890yg0830yw15"
"th2450te2450",
"xs#####xd#yj####yv####zj####zy####yo####yg####yw##th####te####")
self._assert_command_sent_once("C0ZRid0022xs03475xd0yj2105zj1876zi000zy0500yo0890th2450te2450",
"xs#####xd#yj####zj####zi###zy####yo####th####te####")
self._assert_command_sent_once("C0ZSid0023xs07975xd0ya1250yb1070tp2150tz2050th2450te2450",
self._assert_command_sent_once("C0ZSid0023xs07975xd0ya1240yb1065tp2150tz2050th2450te2450",
"xs#####xd#ya####yb####tp####tz####th####te####")

async def test_iswap_pick_up_resource_grip_direction_changes_plate_width(self):
Expand Down
Loading