Closed bochen87 closed 4 years ago
This probably required a different initialization value which also needs to be checked for explicitly. Please consider to provide a pull request to support this case.
What if last_hit
is initialized with -inf
instead of 0?
-inf
sounds "problematic" to me since the math operations like +
won't do anything "reasonable" and you would need to check for -inf
explicitly everywhere. Maybe initializing it with the minimum double value is easier and requires less changes / checks?
Makes sense, so maybe then std::numeric_limits<double>::min()
Closing due to inactivity.
I noticed a bug that the first few messages are not shown when throttling messages and running in simulation mode (i.e. Gazebo).
Problem is here: https://github.com/ros/rosconsole/blob/melodic-devel/include/ros/console.h#L446
It will never show the time is less than
last_hit + period
, which can happen when in simulation and time starts at 0