[ros-users] no matching function for call to ‘ros::NodeHandle::subscribe...

Martin, L kollaps2001 at hotmail.com
Mon Oct 18 20:02:28 UTC 2010


I am a ROS newbie  and I was trying to compile the following code: 

class CloudToPCDFile{
  ros::NodeHandle n_;
  message_filters::Subscriber<sensor_msgs::PointCloud> laser_sub_;
  CloudToPCDFile(ros::NodeHandle n) :
	  laser_sub_=n_.subscribe("/ptu_46/assembled_cloud", 100, scanCallback);

  void scanCallback (const sensor_msgs::PointCloudConstPtr& scan_in)

int main(int argc, char** argv)
  ros::init(argc, argv, "cloud_to_pcd_file");
  ros::NodeHandle n;
  CloudToPCDFile lstopc(n);
  return 0;

however, I unfortunately get the following error:
 error: no matching function for call to ‘ros::NodeHandle::subscribe(const
char [24], int, <unresolved overloaded function type>)’

any idea what I could be doing wrong? 

many thanks!

View this message in context: http://ros-users.122217.n3.nabble.com/no-matching-function-for-call-to-ros-NodeHandle-subscribe-tp1727890p1727890.html
Sent from the ROS-Users mailing list archive at Nabble.com.

More information about the ros-users mailing list