warning: is_dense misused

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

warning: is_dense misused

Radu B. Rusu
Administrator
Another thing that we need to change right now (everywhere in our code) is the use of cloud.is_dense

Previously it was used more as an "is_organized" property, where if a cloud has is_dense set to true, that means that
it's organized as an image (rows x cols).

Its meaning is different though, and other similar bugs have been fixed in the PointCloud2 producers (stereo_image_proc
for example). What "is_dense = true" means is: this dataset has _no_ invalid points (e.g., NaN, Inf). Though most
datasets coming from real (tm) sensors will always have invalid points and thus "is_dense = false", the check for
is_dense will help us in our code in situations where we work with code that has been already preprocessed (e.g., NaNs
have been already removed, as it's the case with most pcl::Filter classes).


This means that instead of rechecking over and over in a for (i < nr_points) loop whether the points have NaN values, we
will check once outside the loop and branch.


To check if a dataset is organized or not, we need to use "cloud.height = 1" (if 1, unorganized).


Let's make sure that we 2x check all the code in PCL and other affected packages that make use of is_dense. The aim is
to fix this for Diamondback.

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

Re: warning: is_dense misused

lllegrand

There is another cloud flavor that is useful, but is not represented in the set of valid cloud encodings.  

Let's say we start out with an image type cloud (i.e. organized by rows and cols), then we filter out points that are too far away, but we maintain the order of the points that we keep.  Knowing that the remaining points are ordered can be useful for some algorithms (e.g. connected components), but this attribute is not currently encode-able in the cloud.  



-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Radu Bogdan Rusu
Sent: Monday, December 06, 2010 11:28 AM
To: Point Cloud Library (PCL) mailing list
Subject: [PCL-users] warning: is_dense misused

Another thing that we need to change right now (everywhere in our code) is the use of cloud.is_dense

Previously it was used more as an "is_organized" property, where if a cloud has is_dense set to true, that means that
it's organized as an image (rows x cols).

Its meaning is different though, and other similar bugs have been fixed in the PointCloud2 producers (stereo_image_proc
for example). What "is_dense = true" means is: this dataset has _no_ invalid points (e.g., NaN, Inf). Though most
datasets coming from real (tm) sensors will always have invalid points and thus "is_dense = false", the check for
is_dense will help us in our code in situations where we work with code that has been already preprocessed (e.g., NaNs
have been already removed, as it's the case with most pcl::Filter classes).


This means that instead of rechecking over and over in a for (i < nr_points) loop whether the points have NaN values, we
will check once outside the loop and branch.


To check if a dataset is organized or not, we need to use "cloud.height = 1" (if 1, unorganized).


Let's make sure that we 2x check all the code in PCL and other affected packages that make use of is_dense. The aim is
to fix this for Diamondback.

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

Re: warning: is_dense misused

Radu B. Rusu
Administrator
Agreed. A good way to do this for filters for example is to set filtered points to nan rather than removing them, and is_dense=false.

Cheers,
Radu.

On Dec 7, 2010, at 10:05 AM, "Legrand, Louis L" <[hidden email]> wrote:

>
> There is another cloud flavor that is useful, but is not represented in the set of valid cloud encodings.  
>
> Let's say we start out with an image type cloud (i.e. organized by rows and cols), then we filter out points that are too far away, but we maintain the order of the points that we keep.  Knowing that the remaining points are ordered can be useful for some algorithms (e.g. connected components), but this attribute is not currently encode-able in the cloud.  
>
>
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf Of Radu Bogdan Rusu
> Sent: Monday, December 06, 2010 11:28 AM
> To: Point Cloud Library (PCL) mailing list
> Subject: [PCL-users] warning: is_dense misused
>
> Another thing that we need to change right now (everywhere in our code) is the use of cloud.is_dense
>
> Previously it was used more as an "is_organized" property, where if a cloud has is_dense set to true, that means that
> it's organized as an image (rows x cols).
>
> Its meaning is different though, and other similar bugs have been fixed in the PointCloud2 producers (stereo_image_proc
> for example). What "is_dense = true" means is: this dataset has _no_ invalid points (e.g., NaN, Inf). Though most
> datasets coming from real (tm) sensors will always have invalid points and thus "is_dense = false", the check for
> is_dense will help us in our code in situations where we work with code that has been already preprocessed (e.g., NaNs
> have been already removed, as it's the case with most pcl::Filter classes).
>
>
> This means that instead of rechecking over and over in a for (i < nr_points) loop whether the points have NaN values, we
> will check once outside the loop and branch.
>
>
> To check if a dataset is organized or not, we need to use "cloud.height = 1" (if 1, unorganized).
>
>
> Let's make sure that we 2x check all the code in PCL and other affected packages that make use of is_dense. The aim is
> to fix this for Diamondback.
>
> Cheers,
> Radu.
> --
> http://pointclouds.org
> _______________________________________________
> [hidden email] / http://pointclouds.org
> https://code.ros.org/mailman/listinfo/pcl-users
> _______________________________________________
> [hidden email] / http://pointclouds.org
> https://code.ros.org/mailman/listinfo/pcl-users
_______________________________________________
[hidden email] / http://pointclouds.org
https://code.ros.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: warning: is_dense misused

Patrick Bouffard
If you're going use a special value for "really far away" then why not
use Inf rather than NaN? That would leave NaN for some other use.

Pat

On Tue, Dec 7, 2010 at 10:11 AM, Radu Bogdan Rusu <[hidden email]> wrote:

> Agreed. A good way to do this for filters for example is to set filtered points to nan rather than removing them, and is_dense=false.
>
> Cheers,
> Radu.
>
> On Dec 7, 2010, at 10:05 AM, "Legrand, Louis L" <[hidden email]> wrote:
>
>>
>> There is another cloud flavor that is useful, but is not represented in the set of valid cloud encodings.
>>
>> Let's say we start out with an image type cloud (i.e. organized by rows and cols), then we filter out points that are too far away, but we maintain the order of the points that we keep.  Knowing that the remaining points are ordered can be useful for some algorithms (e.g. connected components), but this attribute is not currently encode-able in the cloud.
>>
>>
>>
>> -----Original Message-----
>> From: [hidden email] [mailto:[hidden email]] On Behalf Of Radu Bogdan Rusu
>> Sent: Monday, December 06, 2010 11:28 AM
>> To: Point Cloud Library (PCL) mailing list
>> Subject: [PCL-users] warning: is_dense misused
>>
>> Another thing that we need to change right now (everywhere in our code) is the use of cloud.is_dense
>>
>> Previously it was used more as an "is_organized" property, where if a cloud has is_dense set to true, that means that
>> it's organized as an image (rows x cols).
>>
>> Its meaning is different though, and other similar bugs have been fixed in the PointCloud2 producers (stereo_image_proc
>> for example). What "is_dense = true" means is: this dataset has _no_ invalid points (e.g., NaN, Inf). Though most
>> datasets coming from real (tm) sensors will always have invalid points and thus "is_dense = false", the check for
>> is_dense will help us in our code in situations where we work with code that has been already preprocessed (e.g., NaNs
>> have been already removed, as it's the case with most pcl::Filter classes).
>>
>>
>> This means that instead of rechecking over and over in a for (i < nr_points) loop whether the points have NaN values, we
>> will check once outside the loop and branch.
>>
>>
>> To check if a dataset is organized or not, we need to use "cloud.height = 1" (if 1, unorganized).
>>
>>
>> Let's make sure that we 2x check all the code in PCL and other affected packages that make use of is_dense. The aim is
>> to fix this for Diamondback.
>>
>> Cheers,
>> Radu.
>> --
>> http://pointclouds.org
>> _______________________________________________
>> [hidden email] / http://pointclouds.org
>> https://code.ros.org/mailman/listinfo/pcl-users
>> _______________________________________________
>> [hidden email] / http://pointclouds.org
>> https://code.ros.org/mailman/listinfo/pcl-users
> _______________________________________________
> [hidden email] / http://pointclouds.org
> https://code.ros.org/mailman/listinfo/pcl-users
>
_______________________________________________
[hidden email] / http://pointclouds.org
https://code.ros.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: warning: is_dense misused

Radu B. Rusu
Administrator
Sure inf is fine too - I believe Bastian has a scheme for this in place.

Cheers,
Radu.

On Dec 7, 2010, at 10:15 AM, Patrick Bouffard <[hidden email]> wrote:

> If you're going use a special value for "really far away" then why not
> use Inf rather than NaN? That would leave NaN for some other use.
>
> Pat
>
> On Tue, Dec 7, 2010 at 10:11 AM, Radu Bogdan Rusu <[hidden email]> wrote:
>> Agreed. A good way to do this for filters for example is to set filtered points to nan rather than removing them, and is_dense=false.
>>
>> Cheers,
>> Radu.
>>
>> On Dec 7, 2010, at 10:05 AM, "Legrand, Louis L" <[hidden email]> wrote:
>>
>>>
>>> There is another cloud flavor that is useful, but is not represented in the set of valid cloud encodings.
>>>
>>> Let's say we start out with an image type cloud (i.e. organized by rows and cols), then we filter out points that are too far away, but we maintain the order of the points that we keep.  Knowing that the remaining points are ordered can be useful for some algorithms (e.g. connected components), but this attribute is not currently encode-able in the cloud.
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: [hidden email] [mailto:[hidden email]] On Behalf Of Radu Bogdan Rusu
>>> Sent: Monday, December 06, 2010 11:28 AM
>>> To: Point Cloud Library (PCL) mailing list
>>> Subject: [PCL-users] warning: is_dense misused
>>>
>>> Another thing that we need to change right now (everywhere in our code) is the use of cloud.is_dense
>>>
>>> Previously it was used more as an "is_organized" property, where if a cloud has is_dense set to true, that means that
>>> it's organized as an image (rows x cols).
>>>
>>> Its meaning is different though, and other similar bugs have been fixed in the PointCloud2 producers (stereo_image_proc
>>> for example). What "is_dense = true" means is: this dataset has _no_ invalid points (e.g., NaN, Inf). Though most
>>> datasets coming from real (tm) sensors will always have invalid points and thus "is_dense = false", the check for
>>> is_dense will help us in our code in situations where we work with code that has been already preprocessed (e.g., NaNs
>>> have been already removed, as it's the case with most pcl::Filter classes).
>>>
>>>
>>> This means that instead of rechecking over and over in a for (i < nr_points) loop whether the points have NaN values, we
>>> will check once outside the loop and branch.
>>>
>>>
>>> To check if a dataset is organized or not, we need to use "cloud.height = 1" (if 1, unorganized).
>>>
>>>
>>> Let's make sure that we 2x check all the code in PCL and other affected packages that make use of is_dense. The aim is
>>> to fix this for Diamondback.
>>>
>>> Cheers,
>>> Radu.
>>> --
>>> http://pointclouds.org
>>> _______________________________________________
>>> [hidden email] / http://pointclouds.org
>>> https://code.ros.org/mailman/listinfo/pcl-users
>>> _______________________________________________
>>> [hidden email] / http://pointclouds.org
>>> https://code.ros.org/mailman/listinfo/pcl-users
>> _______________________________________________
>> [hidden email] / http://pointclouds.org
>> https://code.ros.org/mailman/listinfo/pcl-users
>>
> _______________________________________________
> [hidden email] / http://pointclouds.org
> https://code.ros.org/mailman/listinfo/pcl-users
_______________________________________________
[hidden email] / http://pointclouds.org
https://code.ros.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: warning: is_dense misused

Bastian Steder
On 12/07/2010 07:22 PM, Radu Bogdan Rusu wrote:
> Sure inf is fine too - I believe Bastian has a scheme for this in place.

Well, in the range image class I set the range value to inf for max
range readings and -inf for unknown points.

Cheers,
Bastian




> On Dec 7, 2010, at 10:15 AM, Patrick Bouffard<[hidden email]>  wrote:
>
>> If you're going use a special value for "really far away" then why not
>> use Inf rather than NaN? That would leave NaN for some other use.
>>
>> Pat
>>
>> On Tue, Dec 7, 2010 at 10:11 AM, Radu Bogdan Rusu<[hidden email]>  wrote:
>>> Agreed. A good way to do this for filters for example is to set filtered points to nan rather than removing them, and is_dense=false.
>>>
>>> Cheers,
>>> Radu.
>>>
>>> On Dec 7, 2010, at 10:05 AM, "Legrand, Louis L"<[hidden email]>  wrote:
>>>
>>>>
>>>> There is another cloud flavor that is useful, but is not represented in the set of valid cloud encodings.
>>>>
>>>> Let's say we start out with an image type cloud (i.e. organized by rows and cols), then we filter out points that are too far away, but we maintain the order of the points that we keep.  Knowing that the remaining points are ordered can be useful for some algorithms (e.g. connected components), but this attribute is not currently encode-able in the cloud.
>>>>
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: [hidden email] [mailto:[hidden email]] On Behalf Of Radu Bogdan Rusu
>>>> Sent: Monday, December 06, 2010 11:28 AM
>>>> To: Point Cloud Library (PCL) mailing list
>>>> Subject: [PCL-users] warning: is_dense misused
>>>>
>>>> Another thing that we need to change right now (everywhere in our code) is the use of cloud.is_dense
>>>>
>>>> Previously it was used more as an "is_organized" property, where if a cloud has is_dense set to true, that means that
>>>> it's organized as an image (rows x cols).
>>>>
>>>> Its meaning is different though, and other similar bugs have been fixed in the PointCloud2 producers (stereo_image_proc
>>>> for example). What "is_dense = true" means is: this dataset has _no_ invalid points (e.g., NaN, Inf). Though most
>>>> datasets coming from real (tm) sensors will always have invalid points and thus "is_dense = false", the check for
>>>> is_dense will help us in our code in situations where we work with code that has been already preprocessed (e.g., NaNs
>>>> have been already removed, as it's the case with most pcl::Filter classes).
>>>>
>>>>
>>>> This means that instead of rechecking over and over in a for (i<  nr_points) loop whether the points have NaN values, we
>>>> will check once outside the loop and branch.
>>>>
>>>>
>>>> To check if a dataset is organized or not, we need to use "cloud.height = 1" (if 1, unorganized).
>>>>
>>>>
>>>> Let's make sure that we 2x check all the code in PCL and other affected packages that make use of is_dense. The aim is
>>>> to fix this for Diamondback.
>>>>
>>>> Cheers,
>>>> Radu.
>>>> --
>>>> http://pointclouds.org
>>>> _______________________________________________
>>>> [hidden email] / http://pointclouds.org
>>>> https://code.ros.org/mailman/listinfo/pcl-users
>>>> _______________________________________________
>>>> [hidden email] / http://pointclouds.org
>>>> https://code.ros.org/mailman/listinfo/pcl-users
>>> _______________________________________________
>>> [hidden email] / http://pointclouds.org
>>> https://code.ros.org/mailman/listinfo/pcl-users
>>>
>> _______________________________________________
>> [hidden email] / http://pointclouds.org
>> https://code.ros.org/mailman/listinfo/pcl-users
> _______________________________________________
> [hidden email] / http://pointclouds.org
> https://code.ros.org/mailman/listinfo/pcl-users


--
Bastian Steder

Albert-Ludwigs-University
Institute of Computer Science
Autonomous Intelligent Systems
Georges-Koehler-Allee 079
D-79110 Freiburg, Germany

Phone:  +49 (761) 203-8013
Fax  :  +49 (761) 203-8007
_______________________________________________
[hidden email] / http://pointclouds.org
https://code.ros.org/mailman/listinfo/pcl-users