Robotics StackExchange | Archived questions

Visualize pointcloud2 without PCL

I have a stereo-camera and it provides rgb images as well as pointcloud2 data, to which I subscribe like this:

self.pointcloud_sub = rospy.Subscriber("/nerian_stereo/point_cloud", PointCloud2, self.pointcloud_cb) # get the pointcloud

now that I want to see the depth map via cloud, I think I need in my callback a way to interpret the data. Here is my starting point:

def pointcloud_cb(self, scan):
        points_list = []

        for data in pc2.read_points(scan, skip_nans=True):
            points_list.append([data[0], data[1], data[2], data[3]])

        print(points_list)

While this displays the output, it's far from what I want to do. Plus, I don't know how this data can be visualized without PCL. On rviz I can visualize the cloud nicely, opening up a window that does the same with the received data, would be really nice. Later on I can establish association with the RGB image it provides, with the depth map I see, and eventually fin the 3D locations of the objects I am interested in.

Does anyone have an idea?

Asked by Jägermeister on 2019-02-18 06:41:52 UTC

Comments

Might be due to me because this is not my area of expertise, but I haven't understood what you're trying to do and why. Could you clarify?

Asked by fvd on 2019-02-19 01:07:33 UTC

To visualize the incoming point cloud data without using PCL libraries (I'm on Python and the PCL bindings are buggy).

Asked by Jägermeister on 2019-02-19 02:13:33 UTC

Hey, you found a answer to the Question?

Asked by p2w2 on 2019-10-30 04:43:13 UTC

Answers