@@ -0,0 +1,1216 @@
+#!/usr/bin/env python%0A%0Aimport rospy%0Aimport tf%0A%0A%0Aclass TF_transformation:%0A    %22%22%22%0A    Transformation from a reference  to another%0A%0A    --in_ref    frame_id     first reference%0A    --out_ref   frame_id     second reference%0A%0A    %3E# in_pos   Point        point in in_pos%0A%0A    %3C= done                  Did all the transformation%0A    %3C= fail                  Failed to transform%0A%0A    %22%22%22%0A%0A    def __init__(self,in_ref,out_ref):%0A        '''%0A        Constructor%0A        '''%0A        super(TF_transformation,self).__init__(outcomes=%5B'done','fail'%5D, input_keys=%5B'in_pos'%5D, output_keys=%5B'out_pos'%5D)%0A        self.listener = tf.TransformListener()%0A        self.in_ref=in_ref%0A        self.out_ref=out_ref%0A%0A    def execute(self, userdata):%0A        point = geometry_msgs.msg.PointStamped()%0A        point.header.frame_id = self.in_ref%0A        point.point = userdata.in_pos%0A        self.listener.waitForTransform(%22map%22, self.out_ref, rospy.Time(0), rospy.Duration(1))%0A        print(%22Frame : map%22)%0A        print(%22 point : %22+str(point.point))%0A        try:%0A            point = self.listener.transformPoint(self.out_ref, point)%0A            userdata.out_pos = point.point%0A            return 'done'%0A        except:%0A            return 'fail'%0A

Add State to transform between references