[ros-users] point cloud questions

Radu Bogdan Rusu rusu at willowgarage.com
Fri Jul 30 17:34:51 UTC 2010

Michael, I just replied to you privately since this is getting a bit too "PCL technical" for ros-users :)


On 07/30/2010 09:52 AM, Michael Styer wrote:
> Hi Radu,
> On Thu, 2010-07-29 at 18:09 -0700, Radu Bogdan Rusu wrote:
>> On 07/29/2010 05:55 PM, Michael Styer wrote:
> <snip>
>>> It doesn't look like there's a structured accessor for organized point
>>> clouds, i.e. a way to index into the points array as a 2-d matrix rather
>>> than a vector -- is that right, or have I just missed it?
>> You're absolutely right, there isn't any, as we thought that index = v * cloud.width + u is easy (and vice versa).
>> However, if you have any good idea on how to wrap this without causing confusion, we could do that!
> I was thinking about something like this (just a sketch, no bounds
> checking on the indices):
> PointT PointCloud::operator()(int u, int v) {
>      if (this->is_dense)
> 	return points[v*this->width+u];
>      else
> 	ROS_ERROR("Can't use 2D indexing with a sparse point cloud");
> }
> But just calculating the linear index directly is perfectly easy to do
> too. Whether the above clarifies or confuses things is probably
> debatable.
> <snip>
>>> In any case, thanks very much again for your help. PCL is significantly
>>> clearer to me now than it was this morning.
>> You're welcome! If you don't mind contributing with some of these things to the wiki (Q&  A), that would be great!
> No problem; I'll write something up for the wiki.
>> Cheers,
>> Radu.
> Mike

| Radu Bogdan Rusu | http://rbrusu.com/

More information about the ros-users mailing list