Skip to content

Commit

Permalink
Adding explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
ViktorWalter committed Mar 22, 2024
1 parent a9fb389 commit 12e86ae
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/detector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,6 @@ class UVDARDetector : public nodelet::Nodelet{
return;
}

double initial_delay = 5.0; //seconds
if ((ros::Time::now() - initial_delay_start_).toSec() < initial_delay){
ROS_WARN_STREAM_THROTTLE(1.0, "[UVDARDetector]: Ignoring message for "<< initial_delay <<"s...");
return;
}

if (!uvdf_was_initialized_){
if (!uvdf_->initDelayed(image->image)){
ROS_WARN_STREAM_THROTTLE(1.0,"[UVDARDetector]: Failed to initialize, dropping message...");
Expand All @@ -254,6 +248,12 @@ class UVDARDetector : public nodelet::Nodelet{
uvdf_was_initialized_ = true;
}

double initial_delay = 5.0; //seconds. This delay is necessary to avoid strange segmentation faults with software rendering backend for OpenGL used in the buildfarm testing.
if ((ros::Time::now() - initial_delay_start_).toSec() < initial_delay){
ROS_WARN_STREAM_THROTTLE(1.0, "[UVDARDetector]: Ignoring message for "<< initial_delay <<"s...");
return;
}


if (!initialized_){
ROS_WARN_STREAM_THROTTLE(1.0,"[UVDARDetector]: Not yet initialized, dropping message...");
Expand Down

0 comments on commit 12e86ae

Please sign in to comment.