Go to the documentation of this file.00001
00002 import roslib; roslib.load_manifest('tf')
00003 import sys
00004 import tf
00005
00006 load('rosh_robot', globals())
00007
00008
00009
00010
00011
00012
00013 topic1 = '/laser_cloud_converted'
00014 topic2 = '/camera1/transformed'
00015
00016 print 'Waiting for', topic1
00017 cloud1 = topics[topic1][0]
00018 print 'Waiting for', topic2
00019 cloud2 = topics[topic2][0]
00020
00021 print 'Waiting for service...'
00022 wait_for_service('matchClouds')
00023
00024 print 'Calling service...'
00025 transform = services.matchClouds(cloud1, cloud2)
00026
00027 print 'Got result...'
00028 trans = transform.transform.translation
00029 rot = transform.transform.rotation
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 print '<node pkg="tf" type="static_transform_publisher" name="external_cam" args="%s %s %s %s %s %s %s %s %s 100" />' % (trans.x, trans.y, trans.z, rot.x, rot.y, rot.z, rot.w, cloud1.header.frame_id, cloud2.header.frame_id)
00041 print '\n'
00042 print 'rosrun tf static_transform_publisher %s %s %s %s %s %s %s %s %s 100' % (trans.x, trans.y, trans.z, rot.x, rot.y, rot.z, rot.w, cloud1.header.frame_id, cloud2.header.frame_id)