Hello!
I have made a program that allows to move the UR10 robot to the central position (leaving a distance in Z) of an ArUco marker placed in the robot’s workspace.
To transmit the position of the ArUco to the robot, first of all I have defined the reference system of the camera with respect to the robot’s base, in order to move the robot according to that reference system (the one of the camera). The robot behaves relatively well (I get some error when moving the ArUco away from the camera, but it is not relevant right now).
The problem is the following: When I send the ArUco pose via RTDE, I notice how in polyscope the ArUco_Pose variable is updated to the one currently sent but, the robot moves to the pose sent in the previous cycle. For that reason, I have to run the program twice to get it to go to the sent pose (firstly it moves to the previous pose and secondly it moves to the desired pose).
I think that the problem may come from some misplaced “sync()” command, since I imagine that the robot starts to do the “movej” movement before the ArUco_Pose variable is updated, even though I can see how it is updated in the variable inspector. The problem is that I don’t know how to solve it.
Thanks in advance and in case you need any extra information don’t hesitate to contact me.
P.S. I attach the polyscope program as the error must be there (the vision system and the communication via RTDE has been implemented using Python)
