How to use PointCloud2 messages in Unity?
Hello there,
I have two pcs and i am trying to publish messages on ROS topic "/camera/color/dept/points". Then, on the other computer using ROS TCP Connector and ROS TCP Endpoint, get ROS messages coming from the other pc into Unity, in Unity with a C# code subscribe to the ROS topic which actually is a PointCloud2 type message. I can get the points into Unity. But, not sure how to use the message i got to display a point cloud in Unity. I would really appreciate it if you could explain how can i use the PointCloud2 messages in Unity to display point cloud there.
Thanks in advance.
Asked by mericgeren on 2023-06-01 09:10:02 UTC
Comments
I saw https://forum.unity.com/threads/how-to-show-point-cloud-from-ros-pointcloud2-coming-from-camera-depth-color-points-topic-in-unity.1443748/ probably you opened? You might get more responses about Unity there. I might be wrong, but it's an uncommon usecase, as pointcloud is used typically as a virtual representation of surface/occupancy info in 3D space, and Unity is a simulated 3D space. So the direction is 3D info in Unity -> pointcloud. What you're trying sounds the opposite.
Asked by 130s on 2023-06-04 16:10:20 UTC
Yes, it was me. I know that generally people trying to get pointcloud from Unity to ROS and that, i am trying to do the opposite. Now, i am able to see the pointcloud in the unity when i select the GameObject the C# code is attached. But, without any color or transparent.
Asked by mericgeren on 2023-06-06 02:10:51 UTC