diff --git a/src/systems/physics/Physics.cc b/src/systems/physics/Physics.cc index a879c5d615..b260add6e6 100644 --- a/src/systems/physics/Physics.cc +++ b/src/systems/physics/Physics.cc @@ -151,7 +151,7 @@ class ignition::gazebo::systems::PhysicsPrivate ignition::physics::FreeGroupFrameSemantics, ignition::physics::LinkFrameSemantics, ignition::physics::ForwardStep, - ignition::physics::RemoveEntities, + ignition::physics::RemoveModelFromWorld, ignition::physics::sdf::ConstructSdfLink, ignition::physics::sdf::ConstructSdfModel, ignition::physics::sdf::ConstructSdfWorld @@ -1184,6 +1184,14 @@ void PhysicsPrivate::CreateCollisionEntities(const EntityComponentManager &_ecm) linkCollisionFeature->ConstructCollision(collision); } + if (nullptr == collisionPtrPhys) + { + igndbg << "Failed to create collision [" << _name->Data() + << "]. Does the physics engine support geometries of type [" + << static_cast(_geom->Data().Type()) << "]?" << std::endl; + return true; + } + this->entityCollisionMap.AddEntity(_entity, collisionPtrPhys); // Check that the physics engine has a filter mask feature