Skip to content

write visual and collision name to xml - #211

Open
bsoe-flexiv wants to merge 2 commits into
ros:rollingfrom
bsoe-flexiv:master
Open

bsoe-flexiv wants to merge 2 commits into
ros:rollingfrom
bsoe-flexiv:master

Conversation

@bsoe-flexiv

Copy link
Copy Markdown

write visual and collision name to xml

@SuperJappie08

Copy link
Copy Markdown
Contributor

@briansoe66, The XSD for the visual element should then be updated as well, as it currently does not list the name attribute.

urdfdom/xsd/urdf.xsd

Lines 123 to 133 in 3f6bf9a

<!-- visual node type -->
<xs:complexType name="visual">
<xs:sequence>
<xs:element name="origin"
type="pose" minOccurs="0" maxOccurs="1" />
<xs:element name="geometry"
type="geometry" minOccurs="1" maxOccurs="1" />
<xs:element name="material"
type="material" minOccurs="0" maxOccurs="1" />
</xs:sequence>
</xs:complexType>

It already is described for the collision element.

urdfdom/xsd/urdf.xsd

Lines 135 to 147 in 3f6bf9a

<!-- collision node type -->
<xs:complexType name="collision">
<xs:sequence>
<xs:element name="origin"
type="pose" minOccurs="0" maxOccurs="1" />
<xs:element name="geometry"
type="geometry" minOccurs="1" maxOccurs="1" />
<xs:element name="verbose"
type="verbose" minOccurs="0" maxOccurs="1" />
</xs:sequence>
<!-- FIXME: used but not documented -->
<xs:attribute name="name" type="xs:string" />
</xs:complexType>

Signed-off-by: brian soe <6686625+briansoe66@users.noreply.github.com>
@bsoe-flexiv
bsoe-flexiv changed the base branch from master to rolling September 16, 2026 11:24
@bsoe-flexiv

Copy link
Copy Markdown
Author

@SuperJappie08 I updated the XSD, per your comment. This PR now targets rolling.

The parser already accepts a name attribute on <visual> (and on
<collision>, which the schema documents), and the exporter now writes
it back out, so list it in the schema as an optional attribute.

Signed-off-by: Brian Soe <6686625+bsoe-flexiv@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants