MATLAB ros 3D visualizing in real time

5 visualizaciones (últimos 30 días)
Eirik Furuholt
Eirik Furuholt el 12 de Mzo. de 2021
Comentada: Hamed Dawlatshahi el 24 de Mzo. de 2021
I am trying to visualize a ros pointcloud2 data stream, like one can do in RViz. I can't find a matlab guide on how to do this. My data comes from a SICK MRS6000. I have all the toolboxes for ROS and autonomous driving. Any help is apriciated

Respuestas (1)

Cam Salzberger
Cam Salzberger el 12 de Mzo. de 2021
Hello Eirik,
You can create a ROS subscriber for the PointCloud2 topic, and in the callback have it update a scatter3 plot showing the point cloud.
Alternatively, create a pcplayer. Then you can extract the points using readXYZ (and optionally readRGB) and use that to construct a pointCloud object, and provide that to the pcplayer view method to display it.
If you have R2021a, you can create the subscriber using "DataFormat","struct", and make use of "rosPlot" for the scatter3 workflow, or "rosReadXYZ" (and "rosReadRGB") for the pcplayer workflow. Using struct format will make the data manipulation faster.
-Cam
  1 comentario
Hamed Dawlatshahi
Hamed Dawlatshahi el 24 de Mzo. de 2021
Thank you for the answer Cam Salzberger,
I work with Eirik on this project and we have managed to get the data in a scatter3 plot and also been able to display the data in pcplayer, but we only get the data for one frame. Do you know how we can get a continous stream of data and visualize it?
-Hamed

Iniciar sesión para comentar.

Categorías

Más información sobre Specialized Messages en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by