Commit 3a839950 authored by Maurice Fallon's avatar Maurice Fallon
Browse files

drop messages if we get behind

parent 6bfda69c
......@@ -180,7 +180,7 @@ void AppROS::velodyneCallBack(const sensor_msgs::PointCloud2::ConstPtr &laser_ms
// vis_->publishCloud(accumulated_cloud, 10, "/aicp/accumulated_cloud", accu_->getFinishedTime());
// Push this cloud onto the work queue (mutex safe)
const int max_queue_size = 100;
const int max_queue_size = 3;
{
std::unique_lock<std::mutex> lock(data_mutex_);
......@@ -194,6 +194,8 @@ void AppROS::velodyneCallBack(const sensor_msgs::PointCloud2::ConstPtr &laser_ms
cloud_queue_.push_back(current_cloud);
if (cloud_queue_.size() > max_queue_size) {
cout << "|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||\n";
cout << "|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||\n";
cout << "[App ROS] WARNING: dropping " <<
(cloud_queue_.size()-max_queue_size) << " clouds." << endl;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment