File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -211,10 +211,15 @@ def decollide(
211
211
if robot_grid .isCollided (robot_id ):
212
212
if robot_grid .robotDict [robot_id ].isOffline :
213
213
continue
214
+ alpha_save = robot_grid .robotDict [robot_id ].alpha
215
+ beta_save = robot_grid .robotDict [robot_id ].beta
214
216
robot_grid .decollideRobot (robot_id )
215
- decollided .append (robot_id ) # Even if we failed it may have moved.
216
- if robot_grid .isCollided (robot_id ):
217
- raise JaegerError (f"Failed decolliding positioner { robot_id } ." )
217
+ if not robot_grid .isCollided (robot_id ):
218
+ decollided .append (robot_id ) # moving this robot worked
219
+ else :
220
+ # return robot to original spot and hope a different robot
221
+ # decollision fixes the problem
222
+ robot_grid .robotDict [robot_id ].setAlphaBeta (alpha_save , beta_save )
218
223
219
224
# Second pass. If still collided, try a grid decollision.
220
225
if len (robot_grid .getCollidedRobotList ()) > 0 :
You can’t perform that action at this time.
0 commit comments