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

hello, I have done it as per the solutions give here.

I am subscribing to a sensor_msgs::Image, and I want to publish my_package/RectifiedImage.msg over a topic "mycustomtopic".

When I do "rostopic list", it is showing /mycustomtopic

When I do "rostopic echo mycustomtopic", it is showing "the rosdep view is empty: call 'sudo rosdep init' and 'rosdep update' ERROR: Cannot load message class for [stereo_msgs/RectifiedImage]. Are your messages built?"

this is what I was doing:

void callback(const ..){

..

my_msg_pub_.publish(myimage);

..

return;

}

and

int main(int argc , char** argv){

subscribe to sensor_msgs::Image

callback

my_msg_pub_ = nh.advertise<stereo_msgs::rectifiedimage>("mycustomtopic", 1);

ros::spin();

return 0;

}

where could be my mistake?