parse plane geom for URDF files (not just SDF)
This commit is contained in:
@@ -492,13 +492,12 @@ bool UrdfParser::parseGeometry(UrdfGeometry& geom, TiXmlElement* g, ErrorLogger*
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
if (this->m_parseSDF)
|
|
||||||
{
|
{
|
||||||
if (type_name == "plane")
|
if (type_name == "plane")
|
||||||
{
|
{
|
||||||
geom.m_type = URDF_GEOM_PLANE;
|
geom.m_type = URDF_GEOM_PLANE;
|
||||||
|
if (this->m_parseSDF)
|
||||||
|
{
|
||||||
TiXmlElement *n = shape->FirstChildElement("normal");
|
TiXmlElement *n = shape->FirstChildElement("normal");
|
||||||
TiXmlElement *s = shape->FirstChildElement("size");
|
TiXmlElement *s = shape->FirstChildElement("size");
|
||||||
|
|
||||||
@@ -509,8 +508,22 @@ bool UrdfParser::parseGeometry(UrdfGeometry& geom, TiXmlElement* g, ErrorLogger*
|
|||||||
}
|
}
|
||||||
|
|
||||||
parseVector3(geom.m_planeNormal,n->GetText(),logger);
|
parseVector3(geom.m_planeNormal,n->GetText(),logger);
|
||||||
}
|
|
||||||
} else
|
} else
|
||||||
|
{
|
||||||
|
if (!shape->Attribute("normal"))
|
||||||
|
{
|
||||||
|
logger->reportError("plane requires a normal attribute");
|
||||||
|
return false;
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
parseVector3(geom.m_planeNormal,shape->Attribute("normal"),logger);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
logger->reportError("Unknown geometry type:");
|
logger->reportError("Unknown geometry type:");
|
||||||
logger->reportError(type_name.c_str());
|
logger->reportError(type_name.c_str());
|
||||||
|
|||||||
Reference in New Issue
Block a user