I am working on an error recovery procedure on how to get the robot to move out of a box safely. On an open with no obstacle application, I move up to a safe level and then move to my safe pose. In my current application, I have many holes/boxes that the tool/tcp is inside a hole. When I power up the system, I need to determine the box that I am in to move through a path back to my safe and ready pose. Currently, I am using a bunch of if-then to do this. My system is UR5e. Has anyone done something similar?
Thanks,