policy on publishing empty point clouds

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

policy on publishing empty point clouds

Radu B. Rusu
Administrator
We currently have no policy in PCL_ROS on publishing empty PointCloud data, and some nodelets do and some don't.
Similarly, there's no policy in PCL on whether an algorithm should return false or an error code in case its output is
null. Good examples can be found in the filtering and segmentation frameworks.


So:

1) if an algorithm (e.g., model segmentation) returns a null output, is this considered a failure or not? Do we:

* return (false);
* return a special code
* write a message to screen/console

Should empty PointCloud2 and pcl::PointCloud<T> be treated differently than non-empty ones?

Note: this only applies to PCL.

2) should a PCL_ROS nodelet publish an empty dataset?

* some people prefer this, as they need to know that the nodelet _did_ something, and returned
* other people prefer to save bandwidth and computational resources (remember that empty PointCloud datasets need to be
checked by every method on input! if (cloud.points.size () != 0) { .. }) and want only "valid" (non-empty) PointCloud
datasets sent over the wire.


Any suggestions?

--
Cheers,
Radu.

_______________________________________________
[hidden email] / http://pcl.ros.org
https://code.ros.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: policy on publishing empty point clouds

Jack O'Quin
On Thu, Sep 30, 2010 at 4:19 PM, Radu Bogdan Rusu <[hidden email]> wrote:

> We currently have no policy in PCL_ROS on publishing empty PointCloud data, and some nodelets do and some don't.
> Similarly, there's no policy in PCL on whether an algorithm should return false or an error code in case its output is
> null. Good examples can be found in the filtering and segmentation frameworks.
>
>
> So:
>
> 1) if an algorithm (e.g., model segmentation) returns a null output, is this considered a failure or not? Do we:
>
> * return (false);
> * return a special code
> * write a message to screen/console
>
> Should empty PointCloud2 and pcl::PointCloud<T> be treated differently than non-empty ones?
>
> Note: this only applies to PCL.
>
> 2) should a PCL_ROS nodelet publish an empty dataset?
>
> * some people prefer this, as they need to know that the nodelet _did_ something, and returned
> * other people prefer to save bandwidth and computational resources (remember that empty PointCloud datasets need to be
> checked by every method on input! if (cloud.points.size () != 0) { .. }) and want only "valid" (non-empty) PointCloud
> datasets sent over the wire.
>
>
> Any suggestions?

The "empty set" seems valid to me. Subscribers should handle it.

A message saying there were no data at a particular time can be useful
input. No message might mean the device stopped working.

Often that's as easy as

  for (unsigned i; i < cloud.points.size(); ++i)
    {
        // handle cloud.points[i]...
    }
--
 joq
_______________________________________________
[hidden email] / http://pcl.ros.org
https://code.ros.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: policy on publishing empty point clouds

Radu B. Rusu
Administrator
Should we warn on empty then? Or at least write something to the ros console? ROS_WARN or ROS_DEBUG?

PointCloudOut output;
compute (output);
if (output.points.size () == 0)
{
   NODELET_WARN ("[computeAndPublish] Output PointCloud has no data points (parameters might not be set correctly)!");
}

Cheers,
Radu.


On 09/30/2010 03:43 PM, Jack O'Quin wrote:

>
> The "empty set" seems valid to me. Subscribers should handle it.
>
> A message saying there were no data at a particular time can be useful
> input. No message might mean the device stopped working.
>
> Often that's as easy as
>
>    for (unsigned i; i<  cloud.points.size(); ++i)
>      {
>          // handle cloud.points[i]...
>      }
_______________________________________________
[hidden email] / http://pcl.ros.org
https://code.ros.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: policy on publishing empty point clouds

Geoffrey Biggs
In reply to this post by Radu B. Rusu
On 01/10/10 06:19, Radu Bogdan Rusu wrote:

> We currently have no policy in PCL_ROS on publishing empty PointCloud data, and some nodelets do and some don't.
> Similarly, there's no policy in PCL on whether an algorithm should return false or an error code in case its output is
> null. Good examples can be found in the filtering and segmentation frameworks.
>
>
> So:
>
> 1) if an algorithm (e.g., model segmentation) returns a null output, is this considered a failure or not? Do we:
>
> * return (false);
> * return a special code
> * write a message to screen/console

I think that an empty point cloud could be a perfectly valid result in
many use cases. If I try to filter all the planes in a mountain range
from my UAV, a null result is not a failure - it's a valid result saying
that my poor UAV has nowhere to land.

> Should empty PointCloud2 and pcl::PointCloud<T> be treated differently than non-empty ones?
>
> Note: this only applies to PCL.
>
> 2) should a PCL_ROS nodelet publish an empty dataset?
>
> * some people prefer this, as they need to know that the nodelet _did_ something, and returned
> * other people prefer to save bandwidth and computational resources (remember that empty PointCloud datasets need to be
> checked by every method on input! if (cloud.points.size () != 0) { .. }) and want only "valid" (non-empty) PointCloud
> datasets sent over the wire.
>
>
> Any suggestions?
>

Any component receiving point clouds should be able to handle an empty
cloud.

Geoff
_______________________________________________
[hidden email] / http://pcl.ros.org
https://code.ros.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: policy on publishing empty point clouds

Radu B. Rusu
Administrator
Excellent, thanks Jack and Geoff for the input.

Revision 32993 now consistently (re-)enables empty data output/publishing on all nodelets.

Cheers,
Radu.


On 09/30/2010 04:05 PM, Geoffrey Biggs wrote:

> On 01/10/10 06:19, Radu Bogdan Rusu wrote:
>> We currently have no policy in PCL_ROS on publishing empty PointCloud data, and some nodelets do and some don't.
>> Similarly, there's no policy in PCL on whether an algorithm should return false or an error code in case its output is
>> null. Good examples can be found in the filtering and segmentation frameworks.
>>
>>
>> So:
>>
>> 1) if an algorithm (e.g., model segmentation) returns a null output, is this considered a failure or not? Do we:
>>
>> * return (false);
>> * return a special code
>> * write a message to screen/console
>
> I think that an empty point cloud could be a perfectly valid result in
> many use cases. If I try to filter all the planes in a mountain range
> from my UAV, a null result is not a failure - it's a valid result saying
> that my poor UAV has nowhere to land.
>
>> Should empty PointCloud2 and pcl::PointCloud<T>  be treated differently than non-empty ones?
>>
>> Note: this only applies to PCL.
>>
>> 2) should a PCL_ROS nodelet publish an empty dataset?
>>
>> * some people prefer this, as they need to know that the nodelet _did_ something, and returned
>> * other people prefer to save bandwidth and computational resources (remember that empty PointCloud datasets need to be
>> checked by every method on input! if (cloud.points.size () != 0) { .. }) and want only "valid" (non-empty) PointCloud
>> datasets sent over the wire.
>>
>>
>> Any suggestions?
>>
>
> Any component receiving point clouds should be able to handle an empty
> cloud.
>
> Geoff
> _______________________________________________
> [hidden email] / http://pcl.ros.org
> https://code.ros.org/mailman/listinfo/pcl-users
_______________________________________________
[hidden email] / http://pcl.ros.org
https://code.ros.org/mailman/listinfo/pcl-users