The PR builds on top of the feature introduced in this sdf PR that supports the following new spec:
This is targeted at gazebo7. In order to preserve ABI, the protobuf msg definition has not been changed. As the result the scene (on the rendering side) does not get the link-light parent-child relationship. As a workaround, the lights on the rendering side are moved using the ~/pose/info and ~/pose/local/info topics.
An example has been added to the attach_lights.world. The sphere model (not the double pendulum) has a light attached using the new SDF spec.
I noticed that the AttachLightPlugin was also added in gazebo7 so we're deprecating a feature that was introduced in the same major version. Once deprecated, does that mean we are going to remove it in default / gazebo9?
I feel like there is a precedent for this but I'm not entirely sure what it was. If I recall correctly, what we did was to deprecate it on all currently released versions (in this case 7 and 8) plus the next release (9). But my head could just be making this up now.
Little detail: if I pause the world and change the pose of the light, it stays in that position until I press play and it snaps back to the link. This behaviour is inconsistent with other "immovable" entities, such as links - i.e. it is not allowed to manipulate a single link on the GUI.
ya light are currently stored in World so they are treated the same as lights without parents. This eventually won't be a problem when lights are loaded in Link class. I have changes to prevent them from being modified but those changes would need to be removed when merging forward so I'm tempted to leave this as is. What do you think?