def callback3(self, msg): now = rospy.get_rostime() self.time3.append(now.secs) self.values.append(msg.data)