-
Notifications
You must be signed in to change notification settings - Fork 426
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
--[BE/Bugfix] Early Bullet/Physics enabled check; C++ test fixes for no-bullet; Python enable_physics default change if no_bullet #2189
Conversation
2051c3a
to
93edb9e
Compare
68d12c8
to
099a258
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor nits ans suggestion.
Overall, looks good. I like your idea to fill the enable_physics default from the built_with_bullet
arg. 👍
src/esp/sim/Simulator.cpp
Outdated
"cfg.enable_physics to False, or verify your Bullet installation " | ||
"and recompile Habitat-Sim using the '--bullet' flag."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggesting on the message advice. This change probably needs to be re-formatted with pre-commit.
"cfg.enable_physics to False, or verify your Bullet installation " | |
"and recompile Habitat-Sim using the '--bullet' flag."); | |
"cfg.enable_physics to False, or verify your Bullet installation (e.g. " | |
recompile Habitat-Sim using the '--bullet' flag or choose a 'withbullet' conda build)."); |
tests/test_examples.py
Outdated
@@ -63,10 +83,14 @@ def powerset(iterable): | |||
("examples/tutorials/async_rendering.py",), | |||
], | |||
) | |||
def test_example_modules(args): | |||
def test_example_modules_no_bullet(args): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Naming nit. Some of these (e.g. managed_rigid_object_tutorial
) are optional physics rather than no-physics.
def test_example_modules_no_bullet(args): | |
def test_example_modules_optional_bullet(args): |
tests/test_examples.py
Outdated
run_main_subproc(args) | ||
|
||
|
||
@pytest.mark.skipif( | ||
not habitat_sim.bindings.built_with_bullet, | ||
reason="Bullet physics required for ReplicaCAD Artciulated Objects.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reason="Bullet physics required for ReplicaCAD Artciulated Objects.", | |
reason="Bullet physics required for ReplicaCAD Articulated Objects.", |
…ullet If bullet is not found or was not used to compile HabitatSim, enablePhysics should never be true. We want to fail early on this to make the user aware before training begins.
--Make enable physics true only if built with Bullet --Make all tests use both the SimConfig and MetadataMediator methods for creating a Simulator. TODO : disable tests that explicitly rely on Bullet if Bullet not found.
…th bullet. Note : there may now be situations where enable_physics is explicitly, although perhaps needlessly ,set to True that will now fail if no Bullet is present.
We just want to skip Bullet-dependent tests if Bullet is absent.
…ullet is present.
099a258
to
c644cb1
Compare
Motivation and Context
This PR contains a bugfix and a few updates/improvements relating to whether Bullet dynamics library is present or not.
How Has This Been Tested
Locally C++ and python tests pass. Some of the python tests required modifications or skipping if bullet was not present).
Types of changes
Checklist