Added properties to access point and disk shader#7
Added properties to access point and disk shader#7nicolapiccinelli wants to merge 1 commit intokeijiro:masterfrom nicolapiccinelli:patch-1
Conversation
I've extended your project to render a point cloud received in realtime from ROS. During the creation of that point cloud the point and disk shaders need to be set programmatically. To do so, two public properties are added to the PointCloudRenderer.
Hi @nicolapiccinelli , could you please elaborate on the process for visualizing point clouds in realtime from ROS? |
|
Hi @akashcastelino, basically the visualization process mainly relies on ROS# and rosbridge_suite in order to stream the ROS messages PointCloud2 inside Unity3D. To do so I've written a class PointCloudReceiver which implements the ROS# MessageReceiver base class and at each new message callback the point cloud was converted from the ROS PointCloud data structure to your PointCloudData class. The converted data fills the sourceData property of your renderer. It's no more than an experiment, I'm attaching the main files that you need to try to run the example. The main issue that i founded was that the conversion between the PoinCloud2 data structure and the arrays used inside PointCloudData which is really time taking. Should be interesting to write a specific shader in order to copy directly the plain raw data from the ros message on the GPU and see how much the performaces will increase. I'm attaching the Assets of the project, the involved files are:
The Unity scene is called PoinCloudViewer. Sorry if there are some missing information but I've no more work on it :). Anyway if you need any further information let me know! |
I've extended your project to render a point cloud received in realtime from ROS. During the creation of that point cloud the point and disk shaders need to be set programmatically. To do so, two public properties are added to the PointCloudRenderer.