How to work with two robots in ROS so that they share the same goal Pose?

asked 2020-03-16 16:48:42 -0600

mkb_10062949 gravatar image

updated 2020-03-17 03:19:15 -0600

Hi, I am working with two robot coordination specifically coordinating two UR5's to make them come at a common POSE. So right now I have two robots (two UR5's) connected to the "world" frame. I give a target POSE to R2 and the robot moves there. The base link of R1 is located at (x=0, y= 0.72, z=0) and for R2 its located at (x=0, y= -0.72, z=0) so you can imagine that they are facing each other. Now, I give a goal POSE (position = x,y, z and quaternions = w,x,y z) to R2 such that it moves towards R1 such that R1 on the opposite side can reach out to R2 and grab the object from R2's gripper. I hope you can imagine that, if not please check out this video on youtube "https://www.youtube.com/watch?v=n6Vk9...". Now my problem is that I want to give a POSE to R2 such that it moves to the goal position but I want to give the same information to R1 such that R1 knows where should it go exactly to grab the object from R2. Here, the position is not a problem since R1 and R2 are connected to the same "world" frame. The problem is with the orientation as I am not able to successfully perform a transformation on the quaternion of R2 which I can feed it to R1 so that R1 can go to the desired position and orientation to grab the object from R2.

Note: 1) The video shows the exact scenario of what I want to achieve, but in the video both the robots were given targets individually that means it has no such transformation which I have discussed above 2) The goal here is to use the orientation (quaternion) from R2 to perform a transformation and give it to R1 so that R1 goes to target with the desired orientation. 3) As mentioned before the position (x,y,z) remains the same for both R1 and R2 since they are connected to the "world" frame and therefore there is no need of any transformation on the position.

edit retag flag offensive close merge delete