File tree 1 file changed +20
-9
lines changed
1 file changed +20
-9
lines changed Original file line number Diff line number Diff line change @@ -1176,20 +1176,31 @@ void acquisition::Capture::write_queue_to_disk(queue<ImagePtr>* img_q, int cam_n
1176
1176
while (imageCnt < k_numImages){
1177
1177
// ROS_DEBUG_STREAM(" Write Queue to Disk for cam: "<< cam_no <<" size = "<<img_q->size());
1178
1178
1179
- // sleep for 5 milliseconds if the queue is empty
1180
- if (img_q->empty () || sync_message_queue_vector_.at (cam_no).empty ()){
1181
- boost::this_thread::sleep (boost::posix_time::milliseconds (5 ));
1182
- continue ;
1183
- }
1179
+ #ifdef trigger_msgs_FOUND
1180
+ // sleep for 5 milliseconds if the queue is empty
1181
+ if (img_q->empty () || sync_message_queue_vector_.at (cam_no).empty ()){
1182
+ boost::this_thread::sleep (boost::posix_time::milliseconds (5 ));
1183
+ continue ;
1184
+ }
1185
+ #endif
1186
+
1187
+ #ifndef trigger_msgs_FOUND
1188
+ if (img_q->empty ()){
1189
+ boost::this_thread::sleep (boost::posix_time::milliseconds (5 ));
1190
+ continue ;
1191
+ }
1192
+ #endif
1184
1193
1185
1194
ROS_DEBUG_STREAM (" Write Queue to Disk for cam: " << cam_no <<" size = " <<img_q->size ());
1186
1195
1187
1196
if (img_q->size ()>100 )
1188
1197
ROS_WARN_STREAM (" Queue " <<cam_no<<" size is :" << img_q->size ());
1189
-
1190
- if (abs ((int )img_q->size () - (int )sync_message_queue_vector_.at (cam_no).size ()) > 100 ){
1191
- ROS_WARN_STREAM (" The camera image size is increasing, the sync trigger messages are not coming at the desired rate" );
1192
- }
1198
+
1199
+ #ifdef trigger_msgs_FOUND
1200
+ if (abs ((int )img_q->size () - (int )sync_message_queue_vector_.at (cam_no).size ()) > 100 ){
1201
+ ROS_WARN_STREAM (" The camera image queue size is increasing, the sync trigger messages are not coming at the desired rate" );
1202
+ }
1203
+ #endif
1193
1204
1194
1205
ImagePtr convertedImage = img_q->front ();
1195
1206
You can’t perform that action at this time.
0 commit comments