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

image_raw is most probably a sensor_msgs/Image and not a std_msgs/String so you will need to change the callback function to expect this data type.

So rather

void chatterCallback(const sensor_msgs::Image::ConstPtr& msg)
{
  ROS_INFO("Received image with size: %i x %i", msg->width, msg->height);
}