Skip to content

override arbitrary parts of included models #128

@osrf-migration

Description

@osrf-migration

Original report (archived issue) by Dirk Thomas (Bitbucket: Dirk Thomas, GitHub: dirk-thomas).


Currently only the pose and the static flag can be overridden for an included model. It would be great if this would be possible for any element.

An example use case would be to override the visual material and give the model a different color.

Without this feature it is not possible to reuse an existing model without either:

  • converting it into a template (which you might not have write access to if it is a third-party model)
  • copy-n-paste it and then modify it (which is kind of sad)

The markup could look like this:

<include>
  <uri>model://reused-model</uri>
  <override>
    <!-- allow anything here which is valid in a normal model -->
  </override>
</include>

In order to determine if (nested) elements in the override section should be appended or actually override existing elements of the included model each tag (the tag name as well as its attributes) could be checked for equality. The override tag itself isn't necessary. The overriding elements could be direct children of include.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions