I am stuck at passing the camera coordinate to robot coordinate. Here i used eye on hand calibration and created a tf node. whatever the object coordinate i got passed to this transformation.
def callback(point1):
print("camera_coordinate",point1)
result_1 = []
trans = 0
rot = 0
listener = tf.TransformListener()
while not rospy.is_shutdown():
try:
(trans,rot) = listener.lookupTransform('/tool0', '/camera_link', rospy.Time(0))
break
except :
continue
matrix2=np.dot(translation_matrix(trans), quaternion_matrix(rot))
point1[0][0] = -point1[0][0]
point1[1][0] = -point1[1][0]
point1[2][0] = point1[2][0]
result_1 = np.matmul(np.array(matrix2),point1)
result_1[0][0]=-result_1[0][0]
result_1[1][0]=-result_1[1][0]
print("object coordinates",result_1)
move_to_pos_1(result_1)
return result_1
The robot not moving to object position exactly. there are different position error for each object.
Please help me, where i am going wrong