Browse Source

update vision usage. update requirements.txt

Silas Gruen 11 months ago
parent
commit
93ff724dc4
2 changed files with 9 additions and 6 deletions
  1. 5 4
      robot-control/requirements.txt
  2. 4 2
      robot-control/src/main.py

+ 5 - 4
robot-control/requirements.txt

@@ -1,10 +1,11 @@
 fastapi[all]
 uvicorn
-opencv-python
-pylibdmtx
-pydantic
-numpy
+opencv-python==4.10.0
+pylibdmtx==0.1.10
+pydantic==2.10.4
+numpy==2.0.0
 PyYAML==6.0.1
 pytest==7.4.2
 pytest-asyncio==0.21.1
+pytest-cov==6.0.0
 httpx==0.25.0

+ 4 - 2
robot-control/src/main.py

@@ -20,9 +20,11 @@ class LoaderSystem:
                 if not slot:
                     break
                 # Pick and place new cell
-                await self.controller.pick_cell_from_feeder()
-                cell_id = await self.controller.read_cell_id()
+                cell_id = await self.vision.read_datamatrix()
+                if not cell_id:
+                    break
                 cell = Cell(cell_id)
+                await self.controller.pick_cell_from_feeder()
                 await self.controller.insert_cell_to_slot(cell, slot)
             
             # Check for completed measurements