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

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

Open
Jakub-Krakowiak opened this issue Sep 5, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@Jakub-Krakowiak
Copy link

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:

  • the marker is updated each time a pcMsg or floatVMsg arrives, wich leads to poor performance

  • because the number of points rendered is based on last floatVMsg length, when a new pcMsg arrives that is longer than the last floatVMsg, the new points will be ignored before a longer floatVMsg arrives, leading to a discrepancy between what robots sense (pcMsg) and what is displayed in the scene ("Point Cloud" plugin output)

  • the "Point Cloud" plugin is unusable if you want to only display a pcMsg (as in our case), since the number of points in the marker is based on floatVMsg length

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

  • add a checkbox in the "Point Cloud" plugin's window in the GUI to "only use pcMsg", ignoring the floatVMsg
  • when the checkbox is marked, marker updates will be done only when a pcMsg arrives and all of the points from the message will be saved to the marker with the minColor color
  • when the checkbox is unmarked, marker updates will be done only when a floatVMsg arrives

Additional context

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

@Jakub-Krakowiak Jakub-Krakowiak added the enhancement New feature or request label Sep 5, 2023
@mjcarroll
Copy link
Contributor

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
Copy link
Author

Jakub-Krakowiak commented Sep 6, 2023

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:

  • having all points inside one marker will make it so we would have to update the whole marker every time we receive any point cloud message
  • having one marker per topic can be handled in a more intuitive way by having one point_cloud plugin window open per topic

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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In progress
Development

No branches or pull requests

2 participants