Open tim-fan opened 2 years ago
Hi @tim-fan Thanks for bringing this up!
Your fix looks like it would work in your cause. But I'm thinking that for general users, perhaps a better solution would be to actually send an empty cloud to the client for visualization (instead of throwing an exception of course).
The reason I say this is that in many systems, sporadic empty point clouds could actually be a bug, and one of the purposes of a visualization tool should be to see those blips so you know they are happening. Like for example if it is because one day suddenly my LIDAR is failing, I want to be able to see that problem in a visualization tool.
Hi there, thanks for the great visualisation package!
I'm trying to visualise a point_cloud2 topic which occasionally contains no points (it is the output of a filtering operation, and sometimes all points are removed by the filter).
When rosboard receives the empty message it crashes with the error:
Looks like the issue is with calling
np.max
on an empty array.My workaround was as follows, I confirmed this works for my case:
If you're OK with that change I can put it in a pull request. Otherwise I'm not sure what the best fix would be,