You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi and thank you for the interesting and very useful vdb_mapping module.
This is not a bug, but a suggestion to modify the code so that it can handle gracefully input clouds that have invalid points. Some sensors / software modules may represent points with no range measurement as x=y=z=NaN or x=y=z=0 and have them in the cloud just to keep the cloud organized (= having width and height).
At least with x=y=z=0, the while loop in VDBMapping::insertPointCloud (line 110) never exists and no output is published.
To ignore zero points, one could check the length of the ray and ignore the point of the ray length is too small:
double min_ray_length = 1e-7;
// Raycasting of every point in the input cloud
for (const PointT& pt : *cloud)
{
max_range_ray = false;
ray_end_world = openvdb::Vec3d(pt.x, pt.y, pt.z);
// Ignore points in the origin
ray_length = (ray_end_world - ray_origin_world).length();
if (ray_length < min_ray_length)
{
continue;
}
.
.
The text was updated successfully, but these errors were encountered:
Hey Paul,
thanks for the feedback and you are absolutely right.
I think currently it might do one raycasting iteration in case of a 0,0,0 point.
In the next few days(hopefully) I will make a sync with our development repo and include a sanity check for these cases while I'm at it.
Hi and thank you for the interesting and very useful vdb_mapping module.
This is not a bug, but a suggestion to modify the code so that it can handle gracefully input clouds that have invalid points. Some sensors / software modules may represent points with no range measurement as x=y=z=NaN or x=y=z=0 and have them in the cloud just to keep the cloud organized (= having width and height).
At least with x=y=z=0, the while loop in VDBMapping::insertPointCloud (line 110) never exists and no output is published.
To ignore zero points, one could check the length of the ray and ignore the point of the ray length is too small:
The text was updated successfully, but these errors were encountered: