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

this is the main function for my reciever program.

int main(int argc, char** argv)

{

ros::init(argc, argv, "sub_pcl");

ros::NodeHandle nh;

ros::Subscriber sub = nh.subscribe<pointcloud>("points2", 1, callback);

ros::spin();

}

The reciever file worked fine. But rosmake gives following errors after including the callback function.

/home/rootx/pcl_proj/src/receiver.cpp:31: error: ‘PointCloud’ was not declared in this scope /home/rootx/pcl_proj/src/receiver.cpp:31: error: no matching function for call to ‘ros::NodeHandle::subscribe(const char [8], int, void (&)(const boost::shared_ptr<co< p="">

Is there some header file I need to include for that particular function?