Universal Robots Forum

Not the same X and Y between UR teachpad and python ROS driver

Hi,

I run this :

roslaunch ur_robot_driver ur3_bringup.launch robot_ip:=10.31.56.102 kinematics_config:=${HOME}/Calibration/ur3_calibration.yaml

then this :

roslaunch ur3_moveit_config ur3_moveit_planning_execution.launch

Now, when I run this commands :

import sys
import rospy
import moveit_commander

moveit_commander.roscpp_initialize(sys.argv)
rospy.init_node('move_group_python_interface_tutorial',anonymous=True)
robot = moveit_commander.RobotCommander()
group = moveit_commander.MoveGroupCommander("manipulator")
print(robot.get_current_state())
print('============================')
print(group.get_current_pose())

It prints this :

[ INFO] [1632386727.339775158]: Ready to take commands for planning group manipulator.
joint_state: 
  header: 
    seq: 0
    stamp: 
      secs: 0
      nsecs:         0
    frame_id: "base_link"
  name: 
    - shoulder_pan_joint
    - shoulder_lift_joint
    - elbow_joint
    - wrist_1_joint
    - wrist_2_joint
    - wrist_3_joint
  position: [-0.12209493318666631, -1.7235949675189417, -0.9860222975360315, -2.003582779561178, 1.5696308612823486, 1.4477026462554932]
  velocity: []
  effort: []
multi_dof_joint_state: 
  header: 
    seq: 0
    stamp: 
      secs: 0
      nsecs:         0
    frame_id: "base_link"
  joint_names: []
  transforms: []
  twist: []
  wrench: []
attached_collision_objects: []
is_diff: False
============================
header: 
  seq: 0
  stamp: 
    secs: 1632386727
    nsecs: 548035383
  frame_id: "base_link"
pose: 
  position: 
    x: -0.2999829298506016
    y: 0.15009632025728392
    z: 0.4000202051437085
  orientation: 
    x: -0.9999996330797376
    y: -0.0004935850271520933
    z: -0.0004722812120140486
    w: 0.0005168797421440206

On the UR3 teachpad, I can read that, for the base feature, the TCP coordinates are :
X = 301.2 mm
Y = -148.3 mm
Z = 399.4 mm
RX = 0.012 rad
RY = -3.14 rad
RZ = -0.003 rad

We can see that the Z coordinates are the about same (teachpad => 399.4 mm and python => z: 0.400) but the X and Y coordinates are opposite sign (teachpad => X = 301.2 mm but python => x: - 0.299)

Why? How can I correct this?

Best regards,

Philippe

base and base_link are not the same, but are rotated by 180 deg.