PyBullet: add signed distance field support, with example/signedDistanceField.py
See also data\toys\concave_box.urdf and data\toys\concave_box.cdf data\toys\concave_box.cdf was generated from concave_box.obj using //GenerateSDF.exe -r "32 32 32" -d "-1.6 -1.6 -.6 1.6 1.6 .6" concave_box.obj //SDF is based on code from DiscreGrid, https://github.com/InteractiveComputerGraphics/Discregrid
This commit is contained in:
@@ -436,9 +436,16 @@ bool UrdfParser::parseGeometry(UrdfGeometry& geom, XMLElement* g, ErrorLogger* l
|
||||
geom.m_capsuleHeight = m_urdfScaling * urdfLexicalCast<double>(shape->Attribute("length"));
|
||||
}
|
||||
}
|
||||
else if (type_name == "mesh")
|
||||
else if ((type_name == "mesh") || (type_name == "cdf"))
|
||||
{
|
||||
geom.m_type = URDF_GEOM_MESH;
|
||||
if ((type_name == "cdf"))
|
||||
{
|
||||
geom.m_type = URDF_GEOM_CDF;
|
||||
}
|
||||
else
|
||||
{
|
||||
geom.m_type = URDF_GEOM_MESH;
|
||||
}
|
||||
geom.m_meshScale.setValue(1,1,1);
|
||||
std::string fn;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user