MJCF: change default link name to be more unique

This commit is contained in:
Oleg Klimov
2017-05-06 03:00:37 +03:00
parent 2c6b2211fc
commit acf57f25e6

View File

@@ -1025,9 +1025,9 @@ struct BulletMJCFImporterInternalData
UrdfModel* modelPtr = m_models[modelIndex]; UrdfModel* modelPtr = m_models[modelIndex];
int orgChildLinkIndex = modelPtr->m_links.size(); int orgChildLinkIndex = modelPtr->m_links.size();
UrdfLink* linkPtr = new UrdfLink(); UrdfLink* linkPtr = new UrdfLink();
char uniqueLinkName[1024]; char linkn[1024];
sprintf(uniqueLinkName,"link%d",orgChildLinkIndex ); sprintf(linkn, "link%d_%d", modelIndex, orgChildLinkIndex);
linkPtr->m_name = uniqueLinkName; linkPtr->m_name = linkn;
if (namePtr) if (namePtr)
{ {
linkPtr->m_name = namePtr; linkPtr->m_name = namePtr;