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

Move general-purpose functions from VisualizationCapabilities to Util #1242

Open
chapulina opened this issue Dec 10, 2021 · 0 comments
Open
Labels
enhancement New feature or request good first issue Good for newcomers help wanted We accept pull requests!

Comments

@chapulina
Copy link
Contributor

Desired behavior

There are functions inside the visualization capabilities plugin that could be generally useful for other plugins, for example:

https://github.com/ignitionrobotics/ign-gazebo/blob/25df2996cf68649fc0b7cdb898d90f8953d7f005/src/gui/plugins/visualization_capabilities/VisualizationCapabilities.cc#L96-L105

We should move these to the Util header, so other plugins can make use of them without duplicating code. When doing so, we should make sure that the functions are actually generic and don't have specific behaviour for that plugin.

Alternatives considered

Duplicating the functions on other plugins.

We may also want to wait until other plugins actually need these functions to make them generic. It could be the case that no plugins actually need them.

Implementation suggestion

Make sure that the functions take in the ECM as one of the parameters, and that they don't rely on any internal state (all parameters should be passed to the function).

Additional context

Motivated by this comment: #1105 (comment)

@chapulina chapulina added enhancement New feature or request good first issue Good for newcomers labels Dec 10, 2021
@chapulina chapulina added the help wanted We accept pull requests! label Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted We accept pull requests!
Projects
None yet
Development

No branches or pull requests

1 participant