-
Notifications
You must be signed in to change notification settings - Fork 380
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
Visualise pointcloud from ros #211
Comments
Hello, ROS# does not have point cloud subscriber/publisher/processor/visualizer scripts at the moment, but it is possible to adapt your application needs into current ROS# communication framework. You can directly communicate over point cloud topics, i.e. bring the poincloud2 messages of ROS into Unity, process and visualize them by creating a custom mesh. However, as the pointcloud2 messages are quite big in terms of size, this would create bottleneck in the communication Another idea would be to communicate over two compressed 2D images, i.e bring compressed rgb images and compressed depth images into Unity, apply back projection techniques to obtain 3D point coordinates, and then visualize them by create a custom mesh. Communicating over compressed image messages rather then poincloud2 messages would result in less bottleneck in the framework. Please also refer to the issues #79 #152 and #153 . I guess it would be nice to have a custom material with a custom shader in Unity. You can always search for a simple and high performance shader on web. I hope it helps. |
I believe you can google the ros-reality package. Alternatively u can write a subscriber for PointCloud2 and use it to animate a particle system. |
Hi @berkayalpcakal |
@stevensu1838 yes, you have to create your own compressed depth image subscriber. |
Hi Martin, very clear. Will try it hard |
@stevensu1838 have you been able to visualize pointCloud points in Unity by writing a compressed depth image subscriber ? |
Hello everyone. I have written a Pointcloud subscriber, feel free to copy & paste if it helps you. @melkishengue I am currently working on combining depth & color images to create an RGB point cloud, I can post that here as well. The "custom/vertex_color" shader can be found here: http://www.kamend.com/2014/05/rendering-a-point-cloud-inside-unity/
|
Hi @Bradyk27 , thank you for sharing your PointCloud2 subscriber class here! We decided against including it in ROS# as PointCloud2 messages are relatively huge and entail some latency. |
EDIT: I've found one of the issues is that the for loop is never completing--it appears that assigning using Points[u + v * width].x causes a loop freeze. Have you encountered this Dr. Bischoff? Happy to help @MartinBischoff.
So I've noticed--quite a pain. I've started work on creating a visualizer script via a depth & rgb image subscriber based on your PointCloud.cs script. It's not working yet, but I'll paste what I have thus far and update over the next few days. If you or anyone else sees anything immediately wrong, please point it out. Excuse the slightly messy comments & redundancy--it's a work in progress. If you have time and could explain to me the following aspects of your code, I'd thoroughly appreciate it.
And the accompanying modified image subscriber:
|
I have a question!
Here is my question:
Thank you for sharing the awesome code. I am trying to use it with a mapping robot but struggled to find a way to visualise the pointcloud map from the robot.
I wonder if there is any material I can follow to set it up correctly in unity?
Thank you in advance.
Chang
The text was updated successfully, but these errors were encountered: