Trouble subscribing to pointclouds [closed]
Hi, I am having troubling using the ROS's sensor_msg to send pointclouds over nodes. From RVIS, i can see the pointcloud being published, and the rqt_graph shows that the subscriber has subscribed to the publisher, but the subscriber is not entering the subscriber callback function.
Please help. I've also tried sending pointclouds directly following http://wiki.ros.org/pcl_ros#Publishin... example, but the same issue arises.
Below is my code using sensor_msgs
ros::Subscriber sub = nh.subscribe<sensor_msgs::pointcloud2>("/ensenso/depth/points", 2, callback); void callback(const sensor_msgs::PointCloud2ConstPtr& cloud) { ROS_INFO ("inside callback"); }
void sender ( const boost::shared_ptr<pcl::pointcloud<pcl::pointxyz> >& cloud) { sensor_msgs::PointCloud2 cloud_msg; pcl::toROSMsg (* cloud, cloud_msg); cloud_pub_.publish(cloud_msg); }
Can you show more code? Where do you do a ros::spin() in the client?
Hi NEngelhard,
I realized that my code is not so comprehensible here, so I asked another qns where i posted the test code. http://answers.ros.org/question/22582...
You could just update the question here so that no moderator has to close this question here.