gazebosim / sdformat

Simulation Description Format (SDFormat) parser and description files.
http://sdformat.org
Apache License 2.0
155 stars 90 forks source link

Converter's file search semantics are unclear and problematic #57

Open osrf-migration opened 10 years ago

osrf-migration commented 10 years ago

Original report (archived issue) by andy_somerville (Bitbucket: andy_somerville).


Converter::Convert appears to make unnecessary assumptions about the file structure which prevent use case where parent directory to version number is not "sdformat" which includes source builds which have not yet been installed where the parent directory is named "sdf".

Additionally sdf::findFile itself prepends "sdformat" when searching the SDF_SHARE_PATH and so searches will not match as they will end up prepended with "sdformat/sdformat"

This specific case prevents certain test cases from running correctly.

Some clients may rely on this behavior so it may make sense to create fix which searches multiple paths decendent to SDF

sdformat/src/Converter.cc

#!c++
std::string filename = sdf::findFile(  std::string("sdformat/") 
    + _toVersion + "/" + origVersion + ".convert");
osrf-migration commented 10 years ago

Original comment by andy_somerville (Bitbucket: andy_somerville).


working on a patch