fix multiple visuals.
This commit is contained in:
parent
48ae818ce0
commit
f9c4811229
|
@ -268,6 +268,14 @@ bool Visual::initXml(TiXmlElement *config)
|
|||
}
|
||||
}
|
||||
|
||||
// Group Tag (optional)
|
||||
// collision blocks without a group tag are designated to the "default" group
|
||||
const char *group_name_char = config->Attribute("group");
|
||||
if (!group_name_char)
|
||||
group_name = std::string("default");
|
||||
else
|
||||
group_name = std::string(group_name_char);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -440,18 +448,6 @@ bool Link::initXml(TiXmlElement* config)
|
|||
}
|
||||
}
|
||||
|
||||
// Visual (optional)
|
||||
TiXmlElement *v = config->FirstChildElement("visual");
|
||||
if (v)
|
||||
{
|
||||
visual.reset(new Visual);
|
||||
if (!visual->initXml(v))
|
||||
{
|
||||
ROS_ERROR("Could not parse visual element for Link '%s'", this->name.c_str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Multiple Visuals (optional)
|
||||
for (TiXmlElement* vis_xml = config->FirstChildElement("visual"); vis_xml; vis_xml = vis_xml->NextSiblingElement("visual"))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue