Considering the scenario represented in the following image, and the function open_gripper(), close_gripper() and Offs(), present the necessary instructions for the robot to perform the path 1 - 2 - 3, represented by the red line, to transport the block on the table. Consider that the only known point is the point P1. The length of each route is shown in the image. The directions of the robot's movements must be in accordance with the direction of the arrows.
This is my version of code, but i am not sure that this is right. What i am doing wrong? How the code should be?