Update
This commit is contained in:
parent
cfb2f89a00
commit
06cc778e3c
@ -10,13 +10,13 @@ def tf_lookup(object_name):
|
|||||||
listener = tf.TransformListener()
|
listener = tf.TransformListener()
|
||||||
|
|
||||||
while not rospy.is_shutdown() and do_try:
|
while not rospy.is_shutdown() and do_try:
|
||||||
try:
|
# try:
|
||||||
(trans,rot) = listener.lookupTransform('base', object_name, rospy.Time(0))
|
(trans,rot) = listener.lookupTransform('base', object_name, rospy.Time(0))
|
||||||
do_try = False
|
# do_try = False
|
||||||
except (tf.LookupException, tf.ConnectivityException, tf.ExtrapolationException):
|
# except (tf.LookupException, tf.ConnectivityException, tf.ExtrapolationException):
|
||||||
print('Failed to get frame data, retrying...')
|
# print('Failed to get frame data, retrying...')
|
||||||
time.sleep(0.1)
|
# time.sleep(0.1)
|
||||||
continue
|
# continue
|
||||||
|
|
||||||
object_angles = tf.transformations.euler_from_quaternion([rot[3] , rot[0], rot[1], rot[2]], axes='sxyz')
|
object_angles = tf.transformations.euler_from_quaternion([rot[3] , rot[0], rot[1], rot[2]], axes='sxyz')
|
||||||
xangle = object_angles[0] + radians(196)
|
xangle = object_angles[0] + radians(196)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user