Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Gepetto
aicp_mapping
Commits
3a839950
Commit
3a839950
authored
Apr 24, 2019
by
Maurice Fallon
Browse files
drop messages if we get behind
parent
6bfda69c
Changes
1
Hide whitespace changes
Inline
Side-by-side
aicp_ros/src/app_ros.cpp
View file @
3a839950
...
...
@@ -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
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment