Inspection Robot 2

nodes/inspection_robot_2.py

Wait1Sec:

Inspection robot 2 waits for 1 second.

Output
Feedback: Completion of wait.
Success: Always

setTargetCellTo1:

Sets IR2TargetCell to “Cell 1”.

Output
Feedback: Inspection robot 2 target set to Cell 1 or already set to Cell 1.
Failure: Inspection robot 2 is already set to a different tester.
Success: Inspection robot 2 is set to target tester 1.

setTargetCellTo2:

Sets IR2TargetCell to “Cell 2”.

Output
Feedback: Inspection robot 2 target set to Cell 2 or already set to Cell 2.
Failure: Inspection robot 2 is already set to a different tester.
Success: Inspection robot 2 is set to target tester 2.

MoveToCurrentCell:

Inspection robot 2 moves to cell tester 1 or 2 (decided by IR2TargetCell). IR2Free is set to False during movement, IR2Location is updated to the correct tester, and IR2Free is set back to True after movement completes.

Output
Feedback: Inspection robot 2 has reached the correct tester.
Failure: Inspection robot 2 is not free or target cell is not set.
Success: Inspection robot 2 successfully moved to the tester containing the target cell.

GraspCell:

Inspection robot 2 grasps the cell from the tester it is currently at. If successful, IR2Grasping is set to True, and IR2Free is set to True.

Output
Feedback: Inspection robot 2 successfully grasped a cell.
Failure: Inspection robot 2 is not free or not at a tester.
Success: Inspection robot 2 successfully grasped the cell from a tester.

MoveToAGVSlot:

Inspection robot 2 moves to the first available AGV at the Inspection station with fewer than 4 occupied slots. IR2Location is updated to the corresponding AGV.

Output
Feedback: Inspection robot 2 has reached an AGV with an available slot.
Failure: Inspection robot 2 is not holding a cell or no AGV slot is available.
Success: Inspection robot 2 successfully moved to an AGV with an open slot.

PlaceInSlot:

Inspection robot 2 places the cell into the AGV it is currently at. The corresponding AGVs[x][0] slot count is incremented by 1. IR2Grasping is set to False, IR2Free is set to True, and IR2TargetCell is reset to “None”.

Output
Feedback: The AGV that inspection robot 2 placed the cell into.
Failure: Inspection robot 2 is not at an AGV or is not holding a cell.
Success: Inspection robot 2 successfully placed a cell into an AGV slot.

MoveToRecycling:

Inspection robot 2 moves to the recycling bin while holding a defective cell. IR2Location is set to “Recycling Bin” and cellsDisposed is incremented by 1.

Output
Feedback: Inspection robot 2 has reached the recycling bin.
Failure: Inspection robot 2 is not holding a cell or is already at the recycling bin.
Success: Inspection robot 2 successfully transported a defective cell to recycling.

ReleaseCell:

Inspection robot 2 releases the cell it is holding. IR2Grasping is set to False and IR2Free is set to True.

Output
Feedback: Inspection robot 2 is releasing the cell.
Failure: Inspection robot 2 is not holding a cell.
Success: Inspection robot 2 successfully released the cell.