diff --git a/src/SafetyZoneMonitor.h b/src/SafetyZoneMonitor.h index 85ff823d663aac1bb9d45fc0c8dfda1aefe1e57e..37315213945e767176af3c17d38914aa867d0ca8 100644 --- a/src/SafetyZoneMonitor.h +++ b/src/SafetyZoneMonitor.h @@ -59,7 +59,7 @@ public: for (auto zone : zones) { if (zone.contains(msg.pose.at(link_number).position)) { // the point is contained in the zone, so we can stop checking and send an according message - if (!res || !initialized) { + if ((counter%100==1) || !res || !initialized) { initialized = true; res = true; panda_mqtt_connector::StampedInZone result; @@ -74,7 +74,7 @@ public: } } // no part of the robot is in a zone - if (res || !initialized) { + if ((counter%100==1) || res || !initialized) { ROS_INFO_STREAM("left zone in run " << counter); initialized = true; res = false;