gazebosim / gazebosim/sdformat

Write a <geometry> once and reuse it

Open
#173 5 comments 0 reactions 0 assignees View on GitHub
minor proposal
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/173)) by Shane Loretz (Bitbucket: [Shane Loretz](https://bitbucket.org/%7B656e3311-aad9-45a1-aaf7-b0ee0e84b287%7D/), GitHub: [sloretz](https://github.com/sloretz)).**

----------------------------------------
# Issue

It feels tedious to type or copy/paste `` when multiple collisions/visuals use the same geometry. Making changes becomes prone to copy/paste errors when a lot of places have the same information.

# Proposal

* Add an optional attribute `name` to ``
* Add a child tag `` that allows referencing a geometry by a scoped name

```xml




1 1 1




model://my_car/some_link/its_visual/some_geom


```

# Alternatives

An alternative to this proposal is to have a tag that contains geometries that can be referenced. This is similar to Collada's `` ([Chapter 5 page 65](https://www.khronos.org/files/collada_spec_1_4.pdf))

Enhancement #75 could be an alternative to this proposal by allowing `` to include ``.

Contributor guide

Open the contributing guide

Research direction

No source files or tests are named. Start by locating the existing parser and any name or URI resolution logic, then evaluate the proposed named geometry and scoped reference against the library's current format rules. Done means repeated geometry can be defined once and referenced by scoped name, with the proposal's XML example covered by appropriate validation.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, xml
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.