Go to the documentation of this file.00001
00002 __author__ = 'mehdi tlili'
00003 import rospy
00004 from tf2_msgs.msg import TFMessage
00005 import tf
00006
00007 class Remapper(object):
00008
00009 def __init__(self):
00010 self.br = tf.TransformBroadcaster()
00011 rospy.Subscriber("/tf", TFMessage, self.tf_remapper)
00012
00013 def tf_remapper(self, msg):
00014
00015 if msg.transforms[0].header.frame_id == "/robot0":
00016 self.br.sendTransform((0, 0, 0),
00017 tf.transformations.quaternion_from_euler(0, 0, 0),
00018 rospy.Time.now(),
00019 "base_footprint",
00020 "robot0")
00021
00022
00023 if __name__ == '__main__':
00024 rospy.init_node('remapper_nav')
00025 remapper = Remapper()
00026 rospy.spin()