-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optional physics features #62
Conversation
@osrf-jenkins run tests |
@chapulina, should we conclude the test failures from thils thread were flaky tests? |
No, I think they're introduced by this PR. I'll take a look. Also, I'd like to refactor this a bit to prevent some |
Signed-off-by: Louise Poubel <louise@openrobotics.org>
@azeey , I just realized that the test passed on the latest OSX build. 🤔
Done on db37fb6. I had thought of caching an |
Signed-off-by: Louise Poubel <louise@openrobotics.org>
* Add and use entityCast helper function * return early for missing features * move minimum map out of entityCast Signed-off-by: Louise Poubel <louise@openrobotics.org> Signed-off-by: Nate Koenig <nate@openrobotics.org>
* Add and use entityCast helper function * return early for missing features * move minimum map out of entityCast Signed-off-by: Louise Poubel <louise@openrobotics.org> Signed-off-by: Nate Koenig <nate@openrobotics.org>
Reopening this BitBucket PR, resolves #58.
Overview
Reduce
MinimumFeatureList
so that physics engines are not required to implement all features, and some of them are treated as optional.Bullet
This enables running Bullet with Ignition. You must use⚠️ As of that branch, Bullet is not fully functional yet though. But it loads 🙂
ign-physics
' bullet_chapulina branch.Implementation
This PR makes the following features optional:
Features for detachable joints:
ignition::physics::AttachFixedJointFeature
ignition::physics::DetachJointFeature
ignition::physics::SetJointTransformFromParentFeature
Features for bounding box:
ignition::physics::GetModelBoundingBox
Features for joint velocity commands:
ignition::physics::SetJointVelocityCommandFeature
Features for 3D meshes:
ignition::physics::mesh::AttachMeshShapeFeature
For each group of optional features:
DetachableJointFeatureList
JointDetachableJointPtrType
entityJointDetachableJointMap
entityCast
to cast from the original entity, created withMinimumFeatureList
, to the specialized entity.entityCast
will also populate the specialized map the first time it's called and get the entity from that map on subsequent calls. This means thatRequestFeature
is only called once for each combination of entity + feature list.Any engine implementing all the minimum features will be loaded. If, at runtime, there's an attempt to use an unsupported feature, a warning is printed. That is:
component::DetachableJoint
is created, a warning is printed and the joint isn't attached or detached.components::AxisAlignedBox
is created, a warning is printed and the box is not populated.components::JointVelocityCmd
is created, a warning is printed and the command has no effect.I'll remove features not needed by TPE on a subsequent PR, that's currently on the
chapulina/tpe
branch.