KdTreeANN search space

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

KdTreeANN search space

Dejan Pangercic
Hi there,
I apologize up front if this is a rather newbie question, but I
somehow could not decipher this issue I have by myself.
I have the following chunk of code:

std::string GlobalRSD::process (const boost::shared_ptr<const
GlobalRSD::InputType>& cloud)
{
.......
pcl::fromROSMsg(*cloud, *cloud_vrsd_);
typedef pcl::KdTree<pcl::PointXYZRGBNormal>::Ptr KdTreePtr;
KdTreePtr tree = boost::make_shared<pcl::KdTreeANN<pcl::PointXYZRGBNormal> > ();
tree->setInputCloud(cloud_vrsd_);
tree->radiusSearch(...);
......
}
The point is that my cloud = cloud_vrsd_  is templated on
PointXYZRGBNormal. So, what does this now mean - that I have just
created a 7 (or 9 if you count Normal for 3 dimensions) dimensional Kd
Tree search space? If this is the case how can I tell the kdtree to
only search in XYZ dimensions? Can I cast PointXYZRGBNormal to
PointXZY?

cheers and thx, D.
--
MSc. Dejan Pangercic
PhD Student/Researcher
Intelligent Autonomous Systems Group
Technische Universität München
Telephone: +49 (89) 289-26908
E-Mail: [hidden email]
WWW: http://ias.cs.tum.edu/people/pangercic
_______________________________________________
[hidden email] / http://pointclouds.org
https://code.ros.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: KdTreeANN search space

Radu B. Rusu
Administrator
Dejan,

You can definitely set what dimensions your tree should work with through PointRepresentations. The test/test_kdtree.cpp
file shows how that can be done, but in a nutshell you should just need to set kdtree.setPointRepresentation
(boost::make_shared <MyPointRepresenation>()); before performing the search.

We need a wiki page + better tutorial for this.

Cheers,
Radu.
--
http://pointclouds.org

On 12/06/2010 11:25 AM, Dejan Pangercic wrote:

> Hi there,
> I apologize up front if this is a rather newbie question, but I
> somehow could not decipher this issue I have by myself.
> I have the following chunk of code:
>
> std::string GlobalRSD::process (const boost::shared_ptr<const
> GlobalRSD::InputType>&  cloud)
> {
> .......
> pcl::fromROSMsg(*cloud, *cloud_vrsd_);
> typedef pcl::KdTree<pcl::PointXYZRGBNormal>::Ptr KdTreePtr;
> KdTreePtr tree = boost::make_shared<pcl::KdTreeANN<pcl::PointXYZRGBNormal>  >  ();
> tree->setInputCloud(cloud_vrsd_);
> tree->radiusSearch(...);
> ......
> }
> The point is that my cloud = cloud_vrsd_  is templated on
> PointXYZRGBNormal. So, what does this now mean - that I have just
> created a 7 (or 9 if you count Normal for 3 dimensions) dimensional Kd
> Tree search space? If this is the case how can I tell the kdtree to
> only search in XYZ dimensions? Can I cast PointXYZRGBNormal to
> PointXZY?
>
> cheers and thx, D.
_______________________________________________
[hidden email] / http://pointclouds.org
https://code.ros.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: KdTreeANN search space

Marius Muja-2
Also, by default (the DefaultPointRepresentation) uses only the first
3 dimensions (X,Y,Z) of the standard point types.

Marius

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

> Dejan,
>
> You can definitely set what dimensions your tree should work with through PointRepresentations. The test/test_kdtree.cpp
> file shows how that can be done, but in a nutshell you should just need to set kdtree.setPointRepresentation
> (boost::make_shared <MyPointRepresenation>()); before performing the search.
>
> We need a wiki page + better tutorial for this.
>
> Cheers,
> Radu.
> --
> http://pointclouds.org
>
> On 12/06/2010 11:25 AM, Dejan Pangercic wrote:
>> Hi there,
>> I apologize up front if this is a rather newbie question, but I
>> somehow could not decipher this issue I have by myself.
>> I have the following chunk of code:
>>
>> std::string GlobalRSD::process (const boost::shared_ptr<const
>> GlobalRSD::InputType>&  cloud)
>> {
>> .......
>> pcl::fromROSMsg(*cloud, *cloud_vrsd_);
>> typedef pcl::KdTree<pcl::PointXYZRGBNormal>::Ptr KdTreePtr;
>> KdTreePtr tree = boost::make_shared<pcl::KdTreeANN<pcl::PointXYZRGBNormal>  >  ();
>> tree->setInputCloud(cloud_vrsd_);
>> tree->radiusSearch(...);
>> ......
>> }
>> The point is that my cloud = cloud_vrsd_  is templated on
>> PointXYZRGBNormal. So, what does this now mean - that I have just
>> created a 7 (or 9 if you count Normal for 3 dimensions) dimensional Kd
>> Tree search space? If this is the case how can I tell the kdtree to
>> only search in XYZ dimensions? Can I cast PointXYZRGBNormal to
>> PointXZY?
>>
>> cheers and thx, D.
> _______________________________________________
> [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: KdTreeANN search space

Dejan Pangercic
ahh, cool, thx a lot.
D.

On Tue, Dec 7, 2010 at 8:37 PM, Marius Muja <[hidden email]> wrote:

> Also, by default (the DefaultPointRepresentation) uses only the first
> 3 dimensions (X,Y,Z) of the standard point types.
>
> Marius
>
> On Tue, Dec 7, 2010 at 9:31 AM, Radu Bogdan Rusu <[hidden email]> wrote:
>> Dejan,
>>
>> You can definitely set what dimensions your tree should work with through PointRepresentations. The test/test_kdtree.cpp
>> file shows how that can be done, but in a nutshell you should just need to set kdtree.setPointRepresentation
>> (boost::make_shared <MyPointRepresenation>()); before performing the search.
>>
>> We need a wiki page + better tutorial for this.
>>
>> Cheers,
>> Radu.
>> --
>> http://pointclouds.org
>>
>> On 12/06/2010 11:25 AM, Dejan Pangercic wrote:
>>> Hi there,
>>> I apologize up front if this is a rather newbie question, but I
>>> somehow could not decipher this issue I have by myself.
>>> I have the following chunk of code:
>>>
>>> std::string GlobalRSD::process (const boost::shared_ptr<const
>>> GlobalRSD::InputType>&  cloud)
>>> {
>>> .......
>>> pcl::fromROSMsg(*cloud, *cloud_vrsd_);
>>> typedef pcl::KdTree<pcl::PointXYZRGBNormal>::Ptr KdTreePtr;
>>> KdTreePtr tree = boost::make_shared<pcl::KdTreeANN<pcl::PointXYZRGBNormal>  >  ();
>>> tree->setInputCloud(cloud_vrsd_);
>>> tree->radiusSearch(...);
>>> ......
>>> }
>>> The point is that my cloud = cloud_vrsd_  is templated on
>>> PointXYZRGBNormal. So, what does this now mean - that I have just
>>> created a 7 (or 9 if you count Normal for 3 dimensions) dimensional Kd
>>> Tree search space? If this is the case how can I tell the kdtree to
>>> only search in XYZ dimensions? Can I cast PointXYZRGBNormal to
>>> PointXZY?
>>>
>>> cheers and thx, D.
>> _______________________________________________
>> [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
>



--
MSc. Dejan Pangercic
PhD Student/Researcher
Intelligent Autonomous Systems Group
Technische Universität München
Telephone: +49 (89) 289-26908
E-Mail: [hidden email]
WWW: http://ias.cs.tum.edu/people/pangercic
_______________________________________________
[hidden email] / http://pointclouds.org
https://code.ros.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: KdTreeANN search space

Ivan Dryanovski
Hi Dejan,

This tutorial might have an example of what you need:

https://code.ros.org/svn/ros-pkg/stacks/perception_pcl_addons/trunk/pcl_tutorials/src/pairwise_incremental_registration.cpp

It defines a custom point representation (x,y,z, curvature)

Cheers,

Ivan

On Tue, Dec 7, 2010 at 5:33 PM, Dejan Pangercic
<[hidden email]> wrote:

> ahh, cool, thx a lot.
> D.
>
> On Tue, Dec 7, 2010 at 8:37 PM, Marius Muja <[hidden email]> wrote:
>> Also, by default (the DefaultPointRepresentation) uses only the first
>> 3 dimensions (X,Y,Z) of the standard point types.
>>
>> Marius
>>
>> On Tue, Dec 7, 2010 at 9:31 AM, Radu Bogdan Rusu <[hidden email]> wrote:
>>> Dejan,
>>>
>>> You can definitely set what dimensions your tree should work with through PointRepresentations. The test/test_kdtree.cpp
>>> file shows how that can be done, but in a nutshell you should just need to set kdtree.setPointRepresentation
>>> (boost::make_shared <MyPointRepresenation>()); before performing the search.
>>>
>>> We need a wiki page + better tutorial for this.
>>>
>>> Cheers,
>>> Radu.
>>> --
>>> http://pointclouds.org
>>>
>>> On 12/06/2010 11:25 AM, Dejan Pangercic wrote:
>>>> Hi there,
>>>> I apologize up front if this is a rather newbie question, but I
>>>> somehow could not decipher this issue I have by myself.
>>>> I have the following chunk of code:
>>>>
>>>> std::string GlobalRSD::process (const boost::shared_ptr<const
>>>> GlobalRSD::InputType>&  cloud)
>>>> {
>>>> .......
>>>> pcl::fromROSMsg(*cloud, *cloud_vrsd_);
>>>> typedef pcl::KdTree<pcl::PointXYZRGBNormal>::Ptr KdTreePtr;
>>>> KdTreePtr tree = boost::make_shared<pcl::KdTreeANN<pcl::PointXYZRGBNormal>  >  ();
>>>> tree->setInputCloud(cloud_vrsd_);
>>>> tree->radiusSearch(...);
>>>> ......
>>>> }
>>>> The point is that my cloud = cloud_vrsd_  is templated on
>>>> PointXYZRGBNormal. So, what does this now mean - that I have just
>>>> created a 7 (or 9 if you count Normal for 3 dimensions) dimensional Kd
>>>> Tree search space? If this is the case how can I tell the kdtree to
>>>> only search in XYZ dimensions? Can I cast PointXYZRGBNormal to
>>>> PointXZY?
>>>>
>>>> cheers and thx, D.
>>> _______________________________________________
>>> [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
>>
>
>
>
> --
> MSc. Dejan Pangercic
> PhD Student/Researcher
> Intelligent Autonomous Systems Group
> Technische Universität München
> Telephone: +49 (89) 289-26908
> E-Mail: [hidden email]
> WWW: http://ias.cs.tum.edu/people/pangercic
> _______________________________________________
> [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