Plr <> ot flex

starting a discussion thread for adding the ot flex to PLR, hopefully using @koeng’s new server (Plr & ot)

i spoke with Daniel Abdoue today who is interested in writing this

1 Like

Ah, very nice. Does Daniel have any thoughts from the previous thread?

1 Like

asked him to join the forum so we should hear from the man himself soon!

Hi! Happy to be part of this community.

One particular aspect I’m hoping PLR will help me to do, especially with the proposed changes to the OT API, is create a global coordinate system such that an external multi-axis robot can also be used along with a liquid handler for sample handling. this way, I can tell the arm to pick up the sample that exists at deck slot A1 position 1 after the Flex has deposited solution onto the sample, and I can write wrappers such that a reference to A1 position 1 is defined as an x,y,z, and then the arm can handle the rest.

My use case is a bit different than usual; it’s materials research to optimize the best fabrication conditions for a semiconductor that is fabricated essentially by coating a piece of glass with a solution, drying it to evaporate solvents, and then putting the coated sample on a hotplate to anneal.

I think adding an “arm” module to PLR would be incredibly beneficial for expanding the complexity of automated labs that PLR can manage, such as mine. The eventual end goal idea being closed loop experiments where even characterizations are automated. I’ve been wanting to build an LLM based system very similar to what koeng has shown off recently, very interested to discuss more details and possibly collaborate on expanding the idea to general automated labs. I’ve been doing some work on automating paper analysis with LLMs to help narrow down potential candidates and conditions to try in an experimental setup, connecting information in one of the millions of ways to do RAGs or GraphDBs or whatever. (Unfortunately I’ll have to finish the software integration and scheduling for these robots before I can start thinking about that stuff though)

Since I’ve never used PLR before, it’d be great if I could get help accelerating the completion of hardware communication within PLR, and I’ll do my best to help provide support to you all by having access to the hardware

Here are some relevant resources regarding the Python API for the arm (mine is the xArm 6, though the software seems pretty easy to adapt to arms with less degress of freedom):

Please let me know if there’s anything you’d like me to try or provide further info on

2 Likes

Also, here’s the automated robot we currently use in our lab (though the Github is not completely up to date with all that’s changed, nor was the system made by me). User’s define their experiment in a jupyter notebook, and then that code schedules all the tasks required and generates the code. Then the user has to calibrate, setup all the hardware, and the robot performs the experiment. The same is also done for some basic characterizations, so theoretically end-to-end automation with experiment feedback is possible, and PLR would be a fastastic tool to make it all happen. Would love to make this new project I’m starting such that it’s easily replicatable and hardware agnostic

2 Likes

Did you work on this? I think I saw an arm base class for a PreciseFlex too.

I’ve been building code a Ufactory Xarm 5 with bio gripper to pick up plates with cultured microbes to image with a Basler camera.

Interested in potentially contributing to PLR as well.

1 Like

welcome the forum @yorkbot!

I just made a bunch of changes to simplify the OT2 backend. perhaps this can serve as a better starting point for the flex. fix Opentrons integration by rickwierenga · Pull Request #689 · PyLabRobot/pylabrobot · GitHub

please do! how can I help?

I have the same arm. Would love to have it pick up and move plates. (well, ufactory xarm lite 6)

1 Like

Opentrons updated their API to enable finer control of the Flex in their newest API version: Robot Motor Control — Opentrons Python API V2 Documentation

I’m nearly finished with my project using the UFactory xArm 6 and OT Flex, though unfortunately for its first iteration, I didn’t end up integrating it through PLR (hoping to take the time to do it right for a V2).

I ended up setting up a flask server on the PC controlling the entire system, and with my frontend, I can add tasks to a queue that the Flex polls from the Flask server, executing the actions from the queue in the order they were sent. With an ssh connection to the Flex, monitoring of the linux process that is running the protocol also enables some error handling. Importantly, it enables ad-hoc control, but similar to Rick’s stated problem with the old OT2 implementation (not sure if it that’s part of the most recent fix), it relies on a static resource model.

The new API breaks my current implementation, but hoping to create a dedicated repo for the custom Flex control, that can hopefully create a nice foundation for integration into PLR

when did they update this?

we rely on their http api. do you know if it’s supported there? (we can write our own ot-side server but that would be more annoying.)

With 8.6.0. I was closing following their new Stackers

1 Like

Not sure about the HTTP unfortunately, haven’t gotten around to trying it yet

1 Like

I got the xarm lite 6 as well because they had videos of it with the bio gripper but then I found out they aren’t compatible so now I’m using the xarm 5 for this application. I can cycle through plates pretty well but now I need to work on safety aspects like an interlock. I guess I basically implemented my version of the ‘deck’ with two racks with 20 shelves arranged vertically and an imager.