UR5 initial pose is shown incorrectly in gazebo. Why?
Hi All,
I have been playing with the UR5 robot in gazebo/ROS for a while now, and most of the time the initial pose that I set in my launch file is set correctly/displayed correctly in gazebo. However, sometimes the initial pose (shown in the code example below) that I've calculated using the ur_kinematics inverse function is incorrect.
For example:
<node name="spawn_gazebo_model" pkg="gazebo_ros" type="spawn_model" args="-urdf -param robot_description
-J shoulder_pan_joint 0.350042
-J shoulder_lift_joint 4.11583
-J elbow_joint 5.21853
-J wrist_1_joint 0.0902968
-J wrist_2_joint 0.435357
-J wrist_3_joint 0.000113458
-model robot" respawn="false" output="screen" />
I've also tried in another software to validate, and everything seems fine. Here is the difference between the roboDK and gazebo representation of the same robot configuration (same joint angles).
Am I doing something wrong? Is there a bug in gazebo?
Thanks!
edit: I've checked the joint limits and unfortunately that is not the issue. Even with -2pi to 2pi it doesn't give the correct robot configuration. Interestingly, if I flip joint 3 by 2pi ( -J elbow_joint -1.06465530718), it works.