Open osrf-migration opened 7 years ago
Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).
We already have ways to toggle visualization of the Grid, Origin, Contacts, Link Frames, Joints, etc. I think we could add this for lights as well.
Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).
Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).
We added Link Frame visualizations to the GUI in pull request #1762, which may provide an example for some of the changes to be made, for example adding a new bool
to ScenePrivate.hh for showLights
. Since the visual already exists, it should be easier to solve this problem, just adding the enable/disable visualization logic.
With #3011, is there anything exposed to the end user to toggle light visualization (e.g. from the CLI, GUI or within URDF)? Thanks!
not that I know of. In the end, we wrote a plugin that loops through the lights in the scene and call ShowVisual(false)
to turn them off.
@iche033 Would you be able to point me to this plugin you wrote that disables the light visual? I'm attempting to do something similar. Thanks!
looks like that particular branch with the plugin was lost when migrating a repo from bitbucket to github. So I'll just post the code here. I took out some include headers related to other projects so there maybe additional gazebo headers you'll need to add to the code to build it.
If I remember correctly, the usage is:
<plugin ....>
<light>
<id>some_light_name</id>
<visualize>false</visualize>
</light>
<light>
...
</light>
</plugin>
Original report (archived issue) by Andrew Symington (Bitbucket: asymingt).
I would like to be able to turn off the visualization of lights in the GUI, as I have a green laser plugin for my model that looks confusingly like the lines used to visualize all directional/spot lights! The method would be similar to the
<visualize>
child of<sensor>
in SDF.Perhaps something along these lines:
In addition, since one cannot attach a
VisualPlugin
to a light visual, it would be extremely useful to set visibility flags in themsgs::Light
, so that one can programatically create / update light visibility.