Skip to content
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

Use opentrons dynamic labware for intermittently available hardware like the loader #32

Open
saNistoRoboto opened this issue Jun 30, 2022 · 5 comments

Comments

@saNistoRoboto
Copy link
Collaborator

No description provided.

@pbeaucage
Copy link
Collaborator

see discussion here: Opentrons/opentrons#7619

this is an intensive fix.

@pbeaucage
Copy link
Collaborator

pbeaucage commented Jul 3, 2022

One easy way to implement this would be to add 3 endpoints to OT2Driver.py:

@Driver.unqueued()
def mark_loader_safe(self, whatever):
     self.loader_transfer_is_safe = True
@Driver.unqueued()
def mark_loader_unsafe(self, whatever):
    self.loader_transfer_is_safe = False

def pre_execute():
   if (loader_loc) in task.source or loader_loc in task.dest:
        wait_started = datetime.datetime.now()
        while not self.loader_transfer_is_safe:
            time.sleep(1)
            warnings.warn('attempting transfer to / from loader but that is not safe.  I'm going to wait till it is safe')
            if ( (datetime.datetime.now() - wait_started)>loader_safety_timeout):
                raise AppropriateExceptionTypeHere

And loader._arm_down sends an API call to mark_loader_unsafe and v/v for loader._arm_up

@martintb is this going to work with how flask servers are multithreaded?

@pbeaucage
Copy link
Collaborator

Also secrets for the unqueued endpoints so that pen testing robots like ansible don't trigger them...

@pbeaucage
Copy link
Collaborator

This pre_execute goes well with #35 also.

@martintb
Copy link
Collaborator

martintb commented Jul 3, 2022

Also we should be able to disable the loader from needing to talk to the robot but, in normal operations, it should yell if it can't talk to the OT2 and probably not complete the arm motion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants