gazebosim / gz-gui

Builds on top of Qt to provide widgets which are useful when developing robotics applications, such as a 3D view, plots, dashboard, etc, and can be used together in a convenient unified interface.
https://gazebosim.org
Apache License 2.0
74 stars 43 forks source link

"Point Cloud" plugin loosing point data and not usable without floatV messages. #568

Open Jakub-Krakowiak opened 1 year ago

Jakub-Krakowiak commented 1 year ago

The "Point Cloud" GUI plugin works well for a static number of points.

We are developing a LIDAR plugin for Gazebo and we would like to update it from Fortress to Garden. We are currently using a custom plugin RGLVisualize based on "Point Cloud" plugin, which wasn't available on fortress to render the visualization of our custom LIDAR, since our implementation is not compatiible with the VisualizeLidar plugin.

As we port the LIDAR plugin to Garden, we would like to use the built-in "Point Cloud" plugin to render our visualization.

Upon inspecting the "Point Cloud" plugin's code, I noticed that:

Desired behavior

The "Point Cloud" plugin can be used with only a pcMsg, without being untrue to the pcMsg and delivering better performance due to not doubling the update rate of the marker.

Alternatives considered

We could just continue using our custom RGLVisualize Plugin

Implementation suggestion

Additional context

If you would like to make those changes to the "Point Cloud" plugin, I am happy to contribute :)

mjcarroll commented 1 year ago

I agree that the performance hit here is not ideal.

Maybe another workaround would be to allow the point_cloud plugin to visualize multiple topics, which looking at the implementation maybe had been considered at some point?

Rather than keeping a single class-wide instance for float and pointcloud messages, we could introduce a collection mapping topics to data to be visualized.

To me that seems like the most flexible approach if it would be something you would be interested in tackling?

Jakub-Krakowiak commented 1 year ago

The performance issue persists, since if we have multiple topics to visualize we would have to have all points inside one marker or one marker per topic. Both options are not ideal in my opinion:

The main problem we are facing is to visualize point cloud without sending floatVMsg messages. We'd be grateful if point_cloud plugin would support it

mjcarroll commented 1 year ago

I think that the "only use PC" approach is good if that's what you have time for.