# UR5 vision base pick and place

**URL:** <https://forum.universal-robots.com/t/ur5-vision-base-pick-and-place/15017>\
**Category:** ROS\
**Created:** [June 21, 2021, 6:08am UTC](https://forum.universal-robots.com/t/ur5-vision-base-pick-and-place/15017 "2021-06-21T06:08:04Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![anon81261137](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@anon81261137](https://forum.universal-robots.com/u/anon81261137)\
**Post date:** [June 29, 2021, 4:43am UTC](https://forum.universal-robots.com/t/ur5-vision-base-pick-and-place/15017/9 "2021-06-29T04:43:47Z")

</div>

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.

```python
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

---

_[View the full topic](https://forum.universal-robots.com/t/ur5-vision-base-pick-and-place/15017)._
