Update
This commit is contained in:
parent
af66bcf9ce
commit
7d836fad54
42
main.py
42
main.py
@ -247,12 +247,12 @@ if __name__ == "__main__":
|
||||
right_pose.orientation.z = -0.000
|
||||
right_pose.orientation.w = 0.004
|
||||
|
||||
left_pnp = PickAndPlace('left', hover_distance)
|
||||
right_pnp = PickAndPlace('right', hover_distance)
|
||||
# left_pnp = PickAndPlace('left', hover_distance)
|
||||
# right_pnp = PickAndPlace('right', hover_distance)
|
||||
|
||||
# Go to initial position
|
||||
left_pnp.move_to_start(left_pnp.ik_request(left_pose))
|
||||
right_pnp.move_to_start(right_pnp.ik_request(right_pose))
|
||||
# # Go to initial position
|
||||
# left_pnp.move_to_start(left_pnp.ik_request(left_pose))
|
||||
# right_pnp.move_to_start(right_pnp.ik_request(right_pose))
|
||||
|
||||
load_objects()
|
||||
|
||||
@ -260,25 +260,25 @@ if __name__ == "__main__":
|
||||
tf_service(init=True)
|
||||
|
||||
###################################HACKING BEGIN
|
||||
# for i in range(0, 5):
|
||||
# print()
|
||||
# otc.tf_lookup('a1')
|
||||
# print()
|
||||
# print()
|
||||
# for i in range(0, 5):
|
||||
# print()
|
||||
# otc.tf_lookup('f2')
|
||||
# print()
|
||||
# print()
|
||||
for i in range(0, 5):
|
||||
print()
|
||||
otc.tf_lookup('a1')
|
||||
print()
|
||||
print()
|
||||
for i in range(0, 5):
|
||||
print()
|
||||
otc.tf_lookup('f2')
|
||||
print()
|
||||
print()
|
||||
|
||||
left_pick = otc.tf_lookup('a1')
|
||||
left_pick.position.z+=0.05
|
||||
left_pnp.pick(left_pick)
|
||||
# left_pick = otc.tf_lookup('a1')
|
||||
# left_pick.position.z+=0.05
|
||||
# left_pnp.pick(left_pick)
|
||||
|
||||
|
||||
left_place = otc.tf_lookup('f2')
|
||||
left_place.position.z+=0.05
|
||||
left_pnp.place(left_place)
|
||||
# left_place = otc.tf_lookup('f2')
|
||||
# left_place.position.z+=0.05
|
||||
# left_pnp.place(left_place)
|
||||
|
||||
|
||||
|
||||
|
||||
@ -19,9 +19,9 @@ def tf_lookup(object_name):
|
||||
continue
|
||||
|
||||
object_angles = tf.transformations.euler_from_quaternion([rot[3] , rot[0], rot[1], rot[2]], axes='sxyz')
|
||||
xangle = object_angles[0] + radians(216)
|
||||
xangle = object_angles[0] + radians(196)
|
||||
xangle1 = object_angles[1] + radians(90)
|
||||
xangle2 = object_angles[2] + radians(-126)
|
||||
xangle2 = object_angles[2] + radians(-106)
|
||||
object_angles = (xangle, xangle1, xangle2)
|
||||
print("Angles:")
|
||||
print(xangle)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user