gazebosim/sdformat

XSD schema generation doesn't parse all nested elements

開放

#633 建立於 2021年7月24日

 (2 則留言) (0 個反應) (0 位負責人)C++ (122 個分叉)auto 404
bughelp wanted

倉庫指標

星標
 (216 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

The current xmlschema.b parses each X.sdf file and generates an accompanying X.xsd file; however, if any element other than the root element contains a nested <include> tag this tag is ignored. This is because the root element is parsed by the function printXSD, whereas other elements are parsed by printElem and the latter doesn't check for <include> tags.

This is a problem with more recent SDFormat files, which introduce <pose> as a complex type with an optionally nested <relative_to>. Pose is now <include>d, and hence never makes it into the produced .xsd.

The two solutions I can think of are: (1) copy the include parsing code from printXSD to printElem (works, but dirty). Refactor xmlschema.b and merge all code paths that parse element tags.

貢獻者指南