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?
Originally posted by Willson Amalraj with karma: 206 on 2015-09-24
This answer was ACCEPTED on the original site
Post score: 1
Original comments
Comment by drewm1980 on 2015-10-20:
Yes, thanks!