Add real-time UR5 position updates (hopefully)

This commit is contained in:
2024-05-09 18:18:55 -05:00
parent f416e25c1c
commit be51423c89
7 changed files with 109 additions and 75 deletions

4
run.py
View File

@@ -513,17 +513,19 @@ def mainloop_server(pool, manager):
else:
print("Arm queue message " + str(val))
checkpoint = val
# print(ring_animation, animation_wait, ledsys.mode, arm_position)
print(ring_animation, animation_wait, ledsys.mode, arm_position)
if ring_animation is not None and ledsys.mode != "idle" and real:
ledsys.mainloop(None, ring_animation, arm_position=arm_position)
elif ring_animation is not None and real:
if animation_wait:
if checkpoint is not None: # got to checkpoint from UR5
fprint("Starting checkpointed animation " + led_set_mode + " for ring " + str(ring_animation))
ledsys.mainloop(led_set_mode, ring_animation, arm_position=arm_position)
led_set_mode = None
animation_wait = False
else:
fprint("Starting immediate animation " + led_set_mode + " for ring " + str(ring_animation))
ledsys.mainloop(led_set_mode, ring_animation, arm_position=arm_position)
led_set_mode = None
else: