#2807 Merged at c39c596
  1. Ian Chen

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.


homebrew - ok

Comments (21)

    1. Ian Chen author

      I added a deprecation warning. 1eda51d.

      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?

      1. Louise Poubel

        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.

    1. Ian Chen author

      looks like the xenial-gpu machine is not installing the latest sdformat 4.4 .0 debs that have the new sdf spec. Do we need to update it manually?

  1. Louise Poubel

    So just to see if I caught all the things which need to be fixed on a later version (maybe too late for Gazebo 9?)

    • Add Light field to link.proto
    • Add worldPoseDirty to physics::Light and remove infinite pose checks
    • Use Light::GetRelativePose instead of Light::GetWorldPose in a few places
    • Add a Link::lights variable
    • Add id field to light.proto and remove empty id checks
    • Remove AttachLightPlugin
    1. Ian Chen author


      • Remove hack that publishes light pose message from physics to rendering
      • In rendering/Scene, update ProcessLinkMsg to process lights in link msgs and attach to parent link visual
      • In physics/Link, add LoadLight function, and update FillMsg to add light to msg.
  2. Louise Poubel

    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.

    1. Ian Chen author

      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?

  3. Louise Poubel

    Some of the things I checked:

    • Light correctly moves with the link
    • Deleting a model properly deletes its lights
    • Light shows up on the left panel (but under Lights, not under the link name)
    • Lights can still be added from the GUI with no issue
    • Changing light properties, such as color, from the left panel work - but are not logged or saved (issue #2057)
    • Light movement is properly recorded and played back
    • The relationship between lights and links is properly saved when the world is saved
    • Lights work inside nested models
    • When editing a model which has a light in the model editor, after saving the light is gone (we can ticket an issue)