Visualize pointcloud2 without PCL [closed]

asked 2019-02-18 05:41:52 -0600

Jägermeister gravatar image

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]])


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?

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by Jägermeister
close date 2019-03-06 04:24:59.055214


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?

fvd gravatar image fvd  ( 2019-02-19 00:07:33 -0600 )edit

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

Jägermeister gravatar image Jägermeister  ( 2019-02-19 01:13:33 -0600 )edit

Hey, you found a answer to the Question?

p2w2 gravatar image p2w2  ( 2019-10-30 04:43:13 -0600 )edit