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

Display more component types in the component inspector #158

Open
chapulina opened this issue May 28, 2020 · 1 comment
Open

Display more component types in the component inspector #158

chapulina opened this issue May 28, 2020 · 1 comment
Labels
good first issue Good for newcomers GUI Gazebo's graphical interface (not pure Ignition GUI)

Comments

@chapulina
Copy link
Contributor

The ComponentInspector GUI plugin displays all the components of an entity.

image

For all components, even custom ones, it will display the component name. But it will only display the values of the component if the component is listed in the plugin. We have several components which are not listed there yet though. On the example above, Physics Engine Plugin is the component's name, and its value is not being displayed.


If the component's data type is already supported, like String it should just be a matter of adding an #include and an if statement like the one below.

https://github.com/ignitionrobotics/ign-gazebo/blob/44951e3ddfd238f24182d4d80b1376f0d426bd43/src/gui/plugins/component_inspector/ComponentInspector.cc#L467-L475

That's the case of Physics Engine Plugin above, which has std::string data:

https://github.com/ignitionrobotics/ign-gazebo/blob/44951e3ddfd238f24182d4d80b1376f0d426bd43/include/ignition/gazebo/components/PhysicsEnginePlugin.hh#L34-L35


If the component's data type is not supported yet, the work should involve adding a new setData function for that type and an accompanying qml file, such as:

https://github.com/ignitionrobotics/ign-gazebo/blob/44951e3ddfd238f24182d4d80b1376f0d426bd43/src/gui/plugins/component_inspector/ComponentInspector.cc#L124-L132

That's the case of Scene above, which has sdf::Scene data:

https://github.com/ignitionrobotics/ign-gazebo/blob/44951e3ddfd238f24182d4d80b1376f0d426bd43/include/ignition/gazebo/components/Scene.hh#L44-L45

@chapulina chapulina added good first issue Good for newcomers GUI Gazebo's graphical interface (not pure Ignition GUI) labels May 28, 2020
@JShep1 JShep1 self-assigned this Sep 18, 2020
@chapulina chapulina mentioned this issue Oct 6, 2021
8 tasks
@chapulina chapulina mentioned this issue Apr 27, 2022
5 tasks
@chapulina
Copy link
Contributor Author

When implementing new component displays, let's use the pattern introduced in #1400, to make the code more manageable. (That is, look at Pose3d as an example.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers GUI Gazebo's graphical interface (not pure Ignition GUI)
Projects
None yet
Development

No branches or pull requests

2 participants