From e6180ef98a0f8bec80f2e2cf6b2bd0215683ef2a Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Thu, 25 May 2017 13:02:20 -0700 Subject: [PATCH] use a fixed joint instead of crashing for unsupported joint types (planar, floating joint) --- examples/Importers/ImportURDFDemo/URDF2Bullet.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/Importers/ImportURDFDemo/URDF2Bullet.cpp b/examples/Importers/ImportURDFDemo/URDF2Bullet.cpp index d7ed716b0..97c92292a 100644 --- a/examples/Importers/ImportURDFDemo/URDF2Bullet.cpp +++ b/examples/Importers/ImportURDFDemo/URDF2Bullet.cpp @@ -362,8 +362,14 @@ void ConvertURDF2BulletInternal( switch (jointType) { + case URDFFloatingJoint: + case URDFPlanarJoint: case URDFFixedJoint: { + if ((jointType==URDFFloatingJoint)||(jointType==URDFPlanarJoint)) + { + printf("Warning: joint unsupported, creating a fixed joint instead."); + } if (createMultiBody) { //todo: adjust the center of mass transform and pivot axis properly