Merge pull request #1846 from erwincoumans/master

also drop 'model://' from URDF file names (like we drop package://)
This commit is contained in:
erwincoumans 2018-08-26 11:40:13 -07:00 committed by GitHub
commit d5514ef68d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -564,9 +564,13 @@ bool findExistingMeshFile(
return false;
}
std::string drop_it = "package://";
if (fn.substr(0, drop_it.length())==drop_it)
fn = fn.substr(drop_it.length());
std::string drop_it_pack = "package://";
std::string drop_it_model = "model://";
if (fn.substr(0, drop_it_pack.length())==drop_it_pack)
fn = fn.substr(drop_it_pack.length());
else if (fn.substr(0, drop_it_model.length())==drop_it_model)
fn = fn.substr(drop_it_model.length());
std::list<std::string> shorter;
shorter.push_back("../..");