Add tray return API call

This commit is contained in:
Cole Deck 2024-05-14 16:01:09 -05:00
parent 951ae8cdda
commit 62ec1e7443
3 changed files with 14 additions and 10 deletions

View File

@ -479,7 +479,8 @@ class LEDSystem():
# ratio = 0
self.data[idx] = (int(base[0] + ratio * deltar), int(base[1] + ratio * deltag), 100) #base[2] + ratio * deltab)
else:
print("No arm position!")
#print("No arm position!")
pass
self.sendall(self.data)
return self

3
run.py
View File

@ -329,6 +329,9 @@ def check_server():
elif "position" in data:
fprint("Adding cable to dispense queue")
mainloop_get.put(("pickup", data["position"]))
elif "tray" in data:
fprint("Adding tray return to dispense queue")
mainloop_get.put(("return", data["tray"]))
else:
fprint("Invalid data.")

View File

@ -754,7 +754,7 @@ if __name__ == "__main__":
rob = robot.robot # rob is robot.robot is the urx robot class, what we've been using previously
#move_to_packup(robot)
move_to_packup(robot)
# pick_up_holder(robot, 2)
#drop_off_tray(robot, 0)
@ -769,15 +769,15 @@ if __name__ == "__main__":
# drop_off_tray(robot, 3)
for i in range(0,54):
pick_up_holder(robot, None, i)
# for i in range(0,54):
# pick_up_holder(robot, None, i)
#print('Drop off', i+1)
drop_off_tray(robot, 0)
#input()
# #print('Drop off', i+1)
# drop_off_tray(robot, 0)
# #input()
# holder_to_camera(robot, 0)
# camera_to_holder(robot, 0)
# # holder_to_camera(robot, 0)
# # camera_to_holder(robot, 0)
print("Current tool pose is: ", rob.getl())
curr_pos = rob.getl()