Sensor_msgs libraary in ros indigo installation has no CvBridge declaration.

asked 2014-10-24 16:23:23 -0500

GoBaxter gravatar image

updated 2014-10-24 16:23:56 -0500

I wish to Write a Simple Image Subscriber (C++). I have installed ROS indigo in Ubuntu 14.04. When i run the standard example on ROS website to do the same, I run into the following error:

~/image_transport_ws/src/learning_image_transport/src/my_publisher.cpp:15:1: error: ‘CvBridge’ is not a member of ‘sensor_msgs’
 sensor_msgs::CvBridge bridge;

So naturally i checked the line numbers which gave the error:-

sensor_msgs::ImagePtr msg = sensor_msgs::CvBridge::cvToImgMsg(image.Ipl(), "bgr8");

Then i also cheked my sensor_msgs library and searched the entire document but Cvbridge was not declared there. How can i make my publisher code work?

edit retag flag offensive close merge delete