This commit is contained in:
Max Hunt 2020-02-10 20:50:36 +00:00
parent 7ce4112146
commit d7a9e5e087

View File

@ -10,7 +10,7 @@ def tf_lookup(object_name):
while not rospy.is_shutdown() and do_try:
try:
(trans,rot) = listener.lookupTransform('c1', 'base', rospy.Time(0))
(trans,rot) = listener.lookupTransform(object_name, 'base', rospy.Time(0))
do_try = False
except (tf.LookupException, tf.ConnectivityException, tf.ExtrapolationException):
print('Failed to get frame data, retrying...')
@ -25,4 +25,7 @@ def tf_lookup(object_name):
target_pose.orientation.y = rot[1]
target_pose.orientation.z = rot[2]
target_pose.orientation.w = rot[3]
return target_pose
return target_pose
if __name__ == "__main__":
tf_lookup('c1')