def listener_callback(self, msg):
    if (msg.transforms[0].child_frame_id == 'robot1'):
        self.x1 = msg.transforms[0].transform.translation.x
        self.y1 = msg.transforms[0].transform.translation.y
        self.xr1 = msg.transforms[0].transform.rotation.x
        self.yr1 = msg.transforms[0].transform.rotation.y
        self.zr1 = msg.transforms[0].transform.rotation.z
        self.wr1 = msg.transforms[0].transform.rotation.w
        self.Theta1 = euler_from_quaternion(self.xr1, self.yr1, self.zr1, self.wr1)
    if (msg.transforms[0].child_frame_id == 'robot3'):
        self.x3 = msg.transforms[0].transform.translation.x
        self.y3 = msg.transforms[0].transform.translation.y
        self.xr3 = msg.transforms[0].transform.rotation.x
        self.yr3 = msg.transforms[0].transform.rotation.y
        self.zr3 = msg.transforms[0].transform.rotation.z
        self.wr3 = msg.transforms[0].transform.rotation.w
        self.Theta3 = euler_from_quaternion(self.xr3, self.yr3, self.zr3, self.wr3)
def listener_callback(self, msg):
    if (msg.transforms[0].child_frame_id == 'robot1'):
        self.x1 = msg.transforms[0].transform.translation.x
        self.y1 = msg.transforms[0].transform.translation.y
        self.xr1 = msg.transforms[0].transform.rotation.x
        self.yr1 = msg.transforms[0].transform.rotation.y
        self.zr1 = msg.transforms[0].transform.rotation.z
        self.wr1 = msg.transforms[0].transform.rotation.w
        self.Theta1 = euler_from_quaternion(self.xr1, self.yr1, self.zr1, self.wr1)
    if (msg.transforms[0].child_frame_id == 'robot3'):
        self.x3 = msg.transforms[0].transform.translation.x
        self.y3 = msg.transforms[0].transform.translation.y
        self.xr3 = msg.transforms[0].transform.rotation.x
        self.yr3 = msg.transforms[0].transform.rotation.y
        self.zr3 = msg.transforms[0].transform.rotation.z
        self.wr3 = msg.transforms[0].transform.rotation.w
        self.Theta3 = euler_from_quaternion(self.xr3, self.yr3, self.zr3, self.wr3)