ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The images are passed as sensor_msgs::Image messages. You can definitely access the contents of the header in those messages. The header contains seq, stamp and frame_id. If for example you have a callback imageCb, then you can follow the code snippet to access the contents of the header.

   void imageCb(const sensor_msgs::ImageConstPtr& msg){  
          std::cout << msg->header.seq <<  std::endl;
          std::cout << msg->header.stamp <<  std::endl;
          std::cout << msg->header.frame_id <<  std::endl;
   }

Is this what you want?