Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added properties to access point and disk shader #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Added properties to access point and disk shader #7

wants to merge 1 commit into from

Conversation

nicolapiccinelli
Copy link

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.

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.
@akashcastelino
Copy link

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?

@keijiro keijiro self-assigned this Mar 25, 2019
@nicolapiccinelli
Copy link
Author

nicolapiccinelli commented Mar 25, 2019

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:

  1. PointCloudData: I've added a overloading method for the initialization
  2. PointCloudReceiver: The point cloud receiver extension for ROS#
  3. PointCloudManager: The manager which instantiate the PointCloudRenderer and load the data
  4. PCloud: Which actually a mod of the PointCloud2 class but it's useless right now

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!

Assets.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants