gazebosim / gazebosim/sdformat

override arbitrary parts of included models

Open
#128 4 comments 0 reactions 0 assignees View on GitHub
enhancement major
Dominant language
C++
Stars
216
Forks
125
Avg merge
1d 14h
Merged PRs (30d)
14

Description

**Original report ([archived issue](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/issues/128)) by Dirk Thomas (Bitbucket: [Dirk Thomas](https://bitbucket.org/%7Ba8effe61-90f2-4949-89a8-9c6972071de7%7D/), GitHub: [dirk-thomas](https://github.com/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:

```

model://reused-model


```

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`.

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named in the issue, so begin by locating the include-model parsing and model-element merge logic. Done should allow arbitrary valid model elements, including nested visual material overrides, while defining whether matching elements are replaced or appended.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.