Skip to content
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

Fix STATIC RigidObject interactions. #536

Merged
merged 6 commits into from
Mar 20, 2020
Merged

Conversation

aclegg3
Copy link
Contributor

@aclegg3 aclegg3 commented Mar 20, 2020

Motivation and Context

As shown in the before frames below, MotionType::STATIC RigidObjects were not properly responding to collisions. This changes fixes the issue by adding a static collision object to the world in pace of a rigid body when MotionType::STATIC is requested.

Other minor changes:

  • Modified transform_box.glb asset to include material colors and outfacing normals.
  • Adjusted ResourceManagerTest for object joining to modified asset.
  • Changed default color for new LightInfo objects to white.

How Has This Been Tested

Added a new C++ test to check for this issue.

Practical Example:

Before:
STATIC_object_bug

After:
STATIC_object_bug_fixed

Example of new test:

Before fix:
motiontype_test_bug

After fix:
motiontype_test

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have completed my CLA (see CONTRIBUTING)
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@aclegg3 aclegg3 requested a review from bigbike March 20, 2020 00:43
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Mar 20, 2020
@codecov
Copy link

codecov bot commented Mar 20, 2020

Codecov Report

Merging #536 into master will increase coverage by 0.32%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #536      +/-   ##
==========================================
+ Coverage   62.64%   62.96%   +0.32%     
==========================================
  Files         162      162              
  Lines        7667     7734      +67     
  Branches       84       84              
==========================================
+ Hits         4803     4870      +67     
  Misses       2864     2864              
Flag Coverage Δ
#CPP 59.01% <100.00%> (+0.65%) ⬆️
#JavaScript 10.00% <ø> (ø)
#Python 80.31% <ø> (ø)
Impacted Files Coverage Δ
src/esp/physics/bullet/BulletRigidObject.cpp 76.32% <100.00%> (+0.76%) ⬆️
src/tests/PhysicsTest.cpp 98.36% <100.00%> (+0.37%) ⬆️
src/tests/ResourceManagerTest.cpp 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8336948...7710154. Read the comment docs.

src/esp/physics/bullet/BulletRigidObject.cpp Outdated Show resolved Hide resolved
@aclegg3 aclegg3 merged commit 4c05fcb into master Mar 20, 2020
@aclegg3 aclegg3 deleted the fix-static-rigidbodies branch March 20, 2020 20:49
Ram81 pushed a commit to Ram81/habitat-web-sim that referenced this pull request Dec 10, 2020
* Fixed STATIC MotionType RigidObject by adding btCollisionObject to bWorld_ instead of btRigidBody.

* Default white light color. 

* Modified color/normals for transform_box asset.

* C++ unit tests improved for changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants