What is the difference between the URDF on PR2 and the URDF for Gazebo Simulation [closed]
I ask this question because I test the IK function from MoveIt recently, and get the unexpected result. Here's the procedure:
============================================
1.I first test on PR2 in Gazebo. I use the IK service provided by MoveIt! and compute the point (0.56, 0.072, 0.8, 0, 0, 0, 1). The first 3 entries are the position and the last 4 entries are the orientation(quaternion). And then I send the joint goal to the controller and move the arm to the designated point. Here's the result:
You can see that the right gripper is heading forward.
2.After the successful test in Gazebo, I then run it on PR2. However, for the same point (0.56, 0.072, 0.8, 0, 0, 0, 1), the robot will move its arm to the same position but with different orientation. The right gripper is heading downward.
3.I guess that this is because the coordinate definitions are different between the simulated robot and the real robot. So the key point is the URDF. Therefore, I change the URDF loaded by the simulator to the one on the real robot. The way is to change the URDF parameter in "description/robots/upload_pr2.launch" to the one you want.
4.After changing it, I run the program again. It is the same as the result on the real robot. Here's the result:
You can see that the right gripper is heading downward.
============================================
Here are the simulated URDF and the real robot URDF:
https://www.dropbox.com/sh/riri7flnfy257da/9GUcUzX4qO
The program for computing IK and for moving the arm is here:
https://www.dropbox.com/sh/owb4fdwriuh2zqa/cI3RdjPN_H
Any Suggestions? Thanks