You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ComponentInspector GUI plugin displays all the components of an entity.
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.
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:
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.)
The ComponentInspector GUI plugin displays all the components of an entity.
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 hasstd::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 accompanyingqml
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 hassdf::Scene
data:https://github.com/ignitionrobotics/ign-gazebo/blob/44951e3ddfd238f24182d4d80b1376f0d426bd43/include/ignition/gazebo/components/Scene.hh#L44-L45
The text was updated successfully, but these errors were encountered: