-
Notifications
You must be signed in to change notification settings - Fork 268
Closed
Description
A decay time of 0 should only keep the latest points.
However, as it is currently implemented, if multiple messages are queued at the same time (I am not sure why that happens; my point clouds only come with 10Hz, but I'm still experiencing it), the display will show more than just the last message.
This is caused by the following lines:
rviz/rviz_default_plugins/src/rviz_default_plugins/displays/pointcloud/point_cloud_common.cpp
Lines 422 to 427 in f15a160
| bool PointCloudCommon::cloudInfoIsDecayed( | |
| CloudInfoPtr cloud_info, float point_decay_time, const rclcpp::Time & now) | |
| { | |
| return (now.nanoseconds() - cloud_info->receive_time_.nanoseconds()) / 1000000000.0 > | |
| point_decay_time; | |
| } |
Changing this to >= fixes the issue and should not make a difference for non-zero decay times in real-world usage since it's a floating point number and the likelihood of them being equal for a non-zero value is close to zero.
Metadata
Metadata
Assignees
Labels
No labels