[ros-users] Publishing a vector of point clouds

Kei Okada k-okada at jsk.t.u-tokyo.ac.jp
Mon Jan 24 11:59:34 UTC 2011


> Frequently, these problems are better solved by republishing some or
> all of the original points as a single PointCloud2 with a
> categorization field. The data can be sorted on that field for
> efficient access, sometimes that occurs naturally as a result of your
> algorithm, anyway.

I see, that's seems good solution.

Just to be clear, your suggestion is to make PointCloud2 data as followings.
    sensor_msgs::PointCloud2 cloud2_;
    cloud2_.fields.resize( 5 );
    cloud2_.fields[0].name = "x";
    cloud2_.fields[1].name = "y";
    cloud2_.fields[2].name = "z";
    cloud2_.fields[3].name = "rgb";
    cloud2_.fields[3].name = "label" or "category";
if this is correct, is there a way to convert from/to pcl::Point*** ??
Usually, we will write program using pcll:PointCloud<pcl::PointXYZRGB>...


On Sun, Jan 23, 2011 at 2:43 AM, Jack O'Quin <jack.oquin at gmail.com> wrote:
> On Fri, Jan 21, 2011 at 7:32 AM, cmuell2s
> <christian.mueller at smail.inf.fh-bonn-rhein-sieg.de> wrote:
>> Hello all,
>>
>> I stuck at a small problem. I would like to publish a vector/array of
>> pcl::PointCloud<pcl::PointXYZ>.
>> I couldn't find a sensor_msg or std_msg which would do it, did I
>> overlooked sth?
>
> This comes up frequently. In many cases it seems the obvious solution.
>
> Often, problems become apparent on further consideration: who will
> read this vector of pointclouds? What operations must be performed on
> it?
>
> Frequently, these problems are better solved by republishing some or
> all of the original points as a single PointCloud2 with a
> categorization field. The data can be sorted on that field for
> efficient access, sometimes that occurs naturally as a result of your
> algorithm, anyway.
> --
>  joq
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>



More information about the ros-users mailing list