clean up urdf mesh input names

This commit is contained in:
jingyuc 2021-11-22 13:26:46 -05:00
parent 4c9d6275aa
commit bc8adf7bd1
4 changed files with 9924 additions and 6 deletions

View File

@ -9,6 +9,6 @@
<cfm value= "0.2"/>
<friction value= "0.5"/>
<damping_coefficient value="0.00001"/>
<visual filename="torus_mesh.vtk"/>
<visual filename="torus_mesh_visual.vtk"/>
</reduced_deformable>
</robot>

File diff suppressed because it is too large Load Diff

View File

@ -1288,7 +1288,7 @@ bool UrdfParser::parseReducedDeformable(UrdfModel& model, tinyxml2::XMLElement*
const char* name = config->Attribute("name");
if (!name)
{
logger->reportError("Deformable with no name");
logger->reportError("Reduced deformable with no name");
return false;
}
reduced_deformable.m_name = name;
@ -1422,6 +1422,7 @@ bool UrdfParser::parseReducedDeformable(UrdfModel& model, tinyxml2::XMLElement*
return false;
}
// collision mesh is optional
XMLElement* col_xml = config->FirstChildElement("collision");
if (col_xml)
{
@ -1430,9 +1431,9 @@ bool UrdfParser::parseReducedDeformable(UrdfModel& model, tinyxml2::XMLElement*
logger->reportError("expected a filename for collision geoemtry");
return false;
}
fn = vis_xml->Attribute("filename");
fn = col_xml->Attribute("filename");
success = UrdfFindMeshFile(m_fileIO,
model.m_sourceFile, fn, sourceFileLocation(vis_xml),
model.m_sourceFile, fn, sourceFileLocation(col_xml),
&reduced_deformable.m_simFileName, &out_type);
if (!success)

View File

@ -264,11 +264,11 @@ struct UrdfReducedDeformable
UrdfReducedDeformable()
: m_numModes(1),
m_mass(1),
m_stiffnessScale(100),
m_erp(0.2), // generally, 0.2 is a good value for erp and cfm
m_cfm(0.2),
m_friction(0),
m_mass(1),
m_stiffnessScale(100),
m_collisionMargin(0.02),
m_damping(0),
m_visualFileName(""),