Update
This commit is contained in:
parent
06cc778e3c
commit
ff287d9e2c
4
main.py
4
main.py
@ -256,8 +256,8 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
load_objects()
|
load_objects()
|
||||||
|
|
||||||
# print("loaded all objects, starting tf service thread")
|
print("loaded all objects, starting tf service thread")
|
||||||
# tf_service(init=True)
|
tf_service(init=True)
|
||||||
|
|
||||||
###################################HACKING BEGIN
|
###################################HACKING BEGIN
|
||||||
# for i in range(0, 5):
|
# for i in range(0, 5):
|
||||||
|
|||||||
@ -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