title: How to get data from two subscribers simultaneously
body: <p>I'm a beginner in ROS and i need a solution to the below case.</p>
  <p>There is no data flow happening to the <code>self.img</code> inside <code>def get_MarkerPose(self)</code>. Why is that ??</p>
  <p>Similarly, why is there no data flow to <code>self.robot_poses_msg = msg</code> inside <code>def get_ee_pose(self)</code> ??</p>
  <p>I need the two functions <code>def get_MarkerPose(self)</code> and <code>def get_ee_pose(self)</code> to be retained in the code.</p>
  <p>What is the better way to implement this ??</p>
  <pre><code>class HandEyeCalibration():
   
      def __init__(self):
          self.robot_pose = []
          self.image_pose = []
          self.img = Image()
          self.robot_poses_msg = Pose()
          self.bridge = CvBridge()
  
      rospy.init_node('Hand_Eye_calibration',anonymous=True)
      rospy.Subscriber('/rgb/image_raw',Image,self.image_callback)
      rospy.Subscriber('/direct_transform',Pose,self.position_callback)
   
      def image_callback(self,message):
          self.img = message
   
      def get_MarkerPose(self):
      # converting ros image to cv image and saving the poses
          cv_image = self.bridge.imgmsg_to_cv2(self.img,'mono8')
          temporay_pose = transform_from_image(cv_image)
          self.image_pose.append(temporary_pose)
   
      def position_callback(self,msg):
          self.robot_poses_msg = msg
   
      def get_ee_pose(self):
          print(self.robot_poses_msg)
          pose = tf.transformations.quaternion_matrix(np.array([self.robot_poses_msg.orientation.x,self.robot_poses_msg.orientation.y, self.robot_poses_msg.orientation.z, self.robot_poses_msg.orientation.w]))
          pose[0,3] = self.robot_poses_msg.position.x
          pose[1,3] = self.robot_poses_msg.position.y
          pose[2,3] = self.robot_poses_msg.position.z
          pose[3,:] = [0,0,0,1]
          self.robot_pose.append(pose) 
   
  if __name__ == &quot;__main__&quot;:
      rospy.loginfo('Robot will move in 5 sec, please stay away')
      calibration = HandEyeCalibration()
      rospy.spin()
  </code></pre>