Skip to content

Commit 783818a

Browse files
FracturedShaderAddisu Z. Taddese
andauthored
Allowing relative paths in URDF (#1213)
When parsing a URDF file, the `_source` parameter is set to "urdf file" which breaks relative path resolution downstream. This commit changes the call to `sdf::readDoc` to use `filename` as the `_source` parameter instead. Signed-off-by: Robert Plante <RobertDPlante@gmail.com> Co-authored-by: Addisu Z. Taddese <addisu@openrobotics.org>
1 parent fb69269 commit 783818a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/parser.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ bool readFileInternal(const std::string &_filename, SDFPtr _sdf,
415415
{
416416
URDF2SDF u2g;
417417
TiXmlDocument doc = u2g.InitModelFile(filename);
418-
if (sdf::readDoc(&doc, _sdf, "urdf file", _convert, _errors))
418+
if (sdf::readDoc(&doc, _sdf, filename, _convert, _errors))
419419
{
420420
sdfdbg << "parse from urdf file [" << _filename << "].\n";
421421
return true;

0 commit comments

Comments
 (0)