Open Daviesss opened 7 months ago
I get you . But in my case ,the trigger warning message when the laser scan has been received within the specified interval, then the opposite condition would be when the time duration d since the last laser scan received is less than the laser_checkinterval. I think the condition should be :
if (d < laser_checkinterval) { ROS_WARN("Laser scan received within the specified interval of %f seconds.", d.toSec()); }
else { ROS_WARN("No Laser scan received within the specified interval of %f seconds.", d.toSec()); }
With this condition, the warning message will be triggered when the time duration since the last laser scan received is less than the laser_checkinterval, indicating that a laser scan has been received within the expected interval.
This pull request addresses issue https://github.com/ros-planning/navigation/issues/1125
I solved this problem by making a small tweak to the amcl_node.cpp file. In order to decrease the frequency of TF_REPEATED_DATA warnings, I lowered the publishing rate of the laser scan because amcl relies on the rate of incoming laser messages. I made this adjustment directly in the .cpp node, and it worked perfectly for me. As a result, the redundant messages no longer appear, which is fantastic.