diff --git a/data/sphere2_rolling_friction.urdf b/data/sphere2_rolling_friction.urdf
index e4ff66341..e5785e3cd 100644
--- a/data/sphere2_rolling_friction.urdf
+++ b/data/sphere2_rolling_friction.urdf
@@ -3,6 +3,7 @@
+
diff --git a/docs/pybullet_quickstartguide.pdf b/docs/pybullet_quickstartguide.pdf
index b2ad0f70f..56cdb8af6 100644
Binary files a/docs/pybullet_quickstartguide.pdf and b/docs/pybullet_quickstartguide.pdf differ
diff --git a/examples/Importers/ImportURDFDemo/UrdfParser.cpp b/examples/Importers/ImportURDFDemo/UrdfParser.cpp
index db8f3c498..37cf5eb70 100644
--- a/examples/Importers/ImportURDFDemo/UrdfParser.cpp
+++ b/examples/Importers/ImportURDFDemo/UrdfParser.cpp
@@ -295,8 +295,19 @@ bool UrdfParser::parseInertia(UrdfInertia& inertia, TiXmlElement* config, ErrorL
inertia.m_izz = urdfLexicalCast(izz->GetText());
} else
{
- logger->reportError("Inertial: inertia element must have ixx,ixy,ixz,iyy,iyz,izz child elements");
- return false;
+ if (ixx && iyy && izz)
+ {
+ inertia.m_ixx = urdfLexicalCast(ixx->GetText());
+ inertia.m_ixy = 0;
+ inertia.m_ixz = 0;
+ inertia.m_iyy = urdfLexicalCast(iyy->GetText());
+ inertia.m_iyz = 0;
+ inertia.m_izz = urdfLexicalCast(izz->GetText());
+ } else
+ {
+ logger->reportError("Inertial: inertia element must have ixx,ixy,ixz,iyy,iyz,izz child elements");
+ return false;
+ }
}
} else
{
@@ -304,15 +315,29 @@ bool UrdfParser::parseInertia(UrdfInertia& inertia, TiXmlElement* config, ErrorL
inertia_xml->Attribute("iyy") && inertia_xml->Attribute("iyz") &&
inertia_xml->Attribute("izz")))
{
- logger->reportError("Inertial: inertia element must have ixx,ixy,ixz,iyy,iyz,izz attributes");
- return false;
- }
- inertia.m_ixx = urdfLexicalCast(inertia_xml->Attribute("ixx"));
- inertia.m_ixy = urdfLexicalCast(inertia_xml->Attribute("ixy"));
- inertia.m_ixz = urdfLexicalCast(inertia_xml->Attribute("ixz"));
- inertia.m_iyy = urdfLexicalCast(inertia_xml->Attribute("iyy"));
- inertia.m_iyz = urdfLexicalCast(inertia_xml->Attribute("iyz"));
- inertia.m_izz = urdfLexicalCast(inertia_xml->Attribute("izz"));
+ if ((inertia_xml->Attribute("ixx") && inertia_xml->Attribute("iyy") &&
+ inertia_xml->Attribute("izz")))
+ {
+ inertia.m_ixx = urdfLexicalCast(inertia_xml->Attribute("ixx"));
+ inertia.m_ixy = 0;
+ inertia.m_ixz = 0;
+ inertia.m_iyy = urdfLexicalCast(inertia_xml->Attribute("iyy"));
+ inertia.m_iyz = 0;
+ inertia.m_izz = urdfLexicalCast(inertia_xml->Attribute("izz"));
+ } else
+ {
+ logger->reportError("Inertial: inertia element must have ixx,ixy,ixz,iyy,iyz,izz attributes");
+ return false;
+ }
+ } else
+ {
+ inertia.m_ixx = urdfLexicalCast(inertia_xml->Attribute("ixx"));
+ inertia.m_ixy = urdfLexicalCast(inertia_xml->Attribute("ixy"));
+ inertia.m_ixz = urdfLexicalCast(inertia_xml->Attribute("ixz"));
+ inertia.m_iyy = urdfLexicalCast(inertia_xml->Attribute("iyy"));
+ inertia.m_iyz = urdfLexicalCast(inertia_xml->Attribute("iyz"));
+ inertia.m_izz = urdfLexicalCast(inertia_xml->Attribute("izz"));
+ }
}
return true;
diff --git a/examples/ThirdPartyLibs/Wavefront/tiny_obj_loader.cpp b/examples/ThirdPartyLibs/Wavefront/tiny_obj_loader.cpp
index 16b0522ea..7483936ba 100644
--- a/examples/ThirdPartyLibs/Wavefront/tiny_obj_loader.cpp
+++ b/examples/ThirdPartyLibs/Wavefront/tiny_obj_loader.cpp
@@ -211,7 +211,7 @@ updateVertex(
positions.push_back(in_positions[3*i.v_idx+1]);
positions.push_back(in_positions[3*i.v_idx+2]);
- if (i.vn_idx >= 0) {
+ if (i.vn_idx >= 0 && ((3*i.vn_idx+2)