# # File: Example_YeastColonyPicking.py # Description: Picks yeast colonies from source plate and deposits or streaks them into target plates. Lids are withdrawn and replaced before and after probing plates. # Applicators are replaced before a new source colony is picked. Source colonies are detected automatically. Colonies are deposited into target plates according to predetermined schema. import sys import os import time sys.path.append(os.path.join(os.path.dirname(__file__), '..')) import robotutil import commonYeastTasks as cyt import ExampleYeastWorkspace #### BEGIN PGM #### robot = robotutil.MAPLE("MAPLE.cfg") ## Starts main yeast colony manipulation routine curApp = 0 cyt.applicatorEquip( robot, ExampleYeastWorkspace.YeastWorkspace['yeastApplicatorPlate'], curApp ) # loads first applicator into MAPLE's organism manipulator end effector equippedApp = cyt.applicatorTest(robot) # tests whether applicator is loaded curApp = curApp + 1 test = 1 colonyX, colonyY = cyt.detectColony( robot, ExampleYeastWorkspace.YeastWorkspace['yeastArena3x3'], 2) # returns viable source colony coordinates (in camera field of view) while test == 1: cyt.lidWithdraw(robot,
posStr = "X: {0[0]:.1f} Y:{0[1]:.1f} Z0: {0[2]:.2f} Z1: {0[3]:.2f} Z2: {0[4]:.2f}".format( currentPosition) cv2.rectangle(img, (0, imgSize[1]), (imgSize[0], imgSize[1] - 30), (25, 25, 25), -1) cv2.putText(img, posStr, (25, imgSize[1] - 10), cv2.FONT_HERSHEY_PLAIN, 1, (255, 255, 255)) cv2.putText(img, "? for help", (25, 30), cv2.FONT_HERSHEY_PLAIN, 2, (255, 255, 255), 2) cv2.line(img, crosshairPts[0], crosshairPts[1], (0, 0, 0), 3) cv2.line(img, crosshairPts[2], crosshairPts[3], (0, 0, 0), 3) cv2.line(img, crosshairPts[0], crosshairPts[1], (255, 255, 255), 1) cv2.line(img, crosshairPts[2], crosshairPts[3], (255, 255, 255), 1) # And pass in the ZAxisBaseAddress here robot = robotutil.MAPLE(configFile) if robot.isInitialized == False: print "Initialization error." exit() else: print "Robot initialized." # robot.home() robot.light(True) cv2.namedWindow("MAPLE") imageMode = True key = -1