Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I use a try-catch block for tf::TransformListener::waitForTransform. In your case, I would try something like:

sensor_msgs::PointCloud2 pc;
try
{
    pc  = *(ros::topic::waitForMessage<sensor_msgs::PointCloud2>(rgb_topic_,ros::Duration(10)));
}
catch()
{
    ROS_WARN("something");
}