# Robot Rescue

While we have designed the AMAS experience with Singularity Avoidance, Collision Detection, and Easy Rescue features, we have added a dedicated robot rescue feature for edge-case scenarios where the users can take control of the robot position in their hands.

{% hint style="danger" %}
Steer clear of the robot, as the Robot will be moving automatically in the last step of this process.
{% endhint %}

Follow these steps to carry out Robot Rescue:

1. In the case where the realignment of the Digital Twin is failing, and you're getting an error code G0001, go into `Robot Control Mode`.
2. Move the digital twin to an ideal position inside the joint limits.

{% hint style="warning" %}
In this case, the robot will not move with the digital twin, which is expected as it is failing realignment.
{% endhint %}

3. Click the `Configuration` tab in the wrist panel.
4. Click on the dropdown button next to the `Cortex` button, which will open `Robots` and `Sensors` buttons.&#x20;
5. Press on the `Robots` button, which will open the `Active Robots` panel.

<div data-full-width="false"><figure><img src="https://content.gitbook.com/content/AYPxuZnjNE7kMCpYOEQa/blobs/EaL2R0YuAPmk9o87s5Ac/RobotRescue.png" alt="" width="375"><figcaption><p>Robot Rescue</p></figcaption></figure></div>

5. Click on the icon, and the Trajectory Operations Panel will open. The Trajectory Operations Panel is used to:&#x20;

* Preview the planned motion the robot will perform to recover from the error.&#x20;
* Execute the planned motion if the motion is acceptable&#x20;
* Stop the motion of the arm in case of a sudden change in environment during the execution of the motion.

<figure><img src="https://content.gitbook.com/content/AYPxuZnjNE7kMCpYOEQa/blobs/PBKfny7ieUefOVMbfAoT/TrajectoryOperationsPanel.png" alt=""><figcaption><p>Trajectory Operations Panel.</p></figcaption></figure>

6. To visualize the path, in  `Trajectory Operations Panel` press the `Visualize Robots Planned Motion` button to preview the motion the arm will make.
7. In case the planned motion is not acceptable, then click the `Cancel` button, and move the digital twin to a different position and press the robot rescue icon again. This step could be repeated as many times till a suitable path is found.
8. Upon finding the suitable path, press the `Execute Planned Motion.` The `Operation Status` will indicate when the operation is complete.
9. Now press `Cancel` to return to the `Active RoboKits` panel. The Robot Rescue process is now complete, and the robot is ready to use.

Note: In case of a sudden change in the environment or the robot needs to be stopped while executing the planned path, press the `Stop Planned Motion Execution` button in the `Trajectory Operations Panel`. The robot will stop, then to complete the robot rescue, click `Cancel` and then click on the Robot Rescue button, then perform Steps 6-9

{% embed url="<https://www.loom.com/share/9f405c6235bd4b51b60711132f32a3bf?sid=74e04b57-fbbe-46f2-ba27-109aab4a7114>" %}
Robot Rescue
{% endembed %}
