How to show Point Cloud from ROS PointCloud2 coming from "camera/depth/color/points" topic in Unity

Hello there,

This question is related to this Thread i opened: " https://discussions.unity.com/t/919423/1 ". I want to get point clouds from a D435 camera plugged to a pc then, through ROS to send it to another computer in same local network and finally, display the point cloud in Unity.

Now, i can publish point clouds to unity on another computer via "/camera/depth/color/points" ROS topic and subscribe to the topic from the computer where Unity is (thanks to ROS TCP Endpoint and ROS TCp Connector packages from Unity Robotics Hub). I know that the topic i have mentioned sends messages in the type "sensor_msgs/PointCloud2Msg". Also, when i run the the C# ROS subscriber code i have wrote i can see that i get points and be able to show field info for each point i get. But, i can't see any pointcloud on Scene view. So i wonder:

How can i use ROS PointCloud2 coming from "camera/depth/color/points" topic in Unity to display point cloud?

Thanks in advance,

Kindest Regards.

Update: Now, i can see the pointcloud in the Scene view. But, when i switch to Game view, i see it only renders things far from the camera and in even then, in a heavily distorted manner and it shows the colors only with UI and GUI shaders. When i try to use Standard shader with material.EnableKeyword("_VERTEXCOLOR"); it shows it in single color (light pink)

1 Like

I encounter the same problem. How to see the pointcloud in the Scene view? Are you making progress?