-
Notifications
You must be signed in to change notification settings - Fork 400
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
Use controls to report if a collision occurred #70
Conversation
… better-collision-detection
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.
LGTM! 👍
@@ -150,7 +150,7 @@ def detach(self): | |||
for _, v in self.sensors.items(): | |||
v.detach() | |||
|
|||
def act(self, action_id: Any): | |||
def act(self, action_id: Any) -> bool: | |||
r"""Take the action specified by action_id |
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.
Add semantics of return value to docstring (i.e. collision during action)
import habitat_sim.bindings as hsim | ||
from habitat_sim import utils | ||
|
||
__all__ = ["ActuationSpec", "SceneNodeControl", "ObjectControls"] | ||
|
||
|
||
EPS = 1e-5 |
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.
Add brief comment about semantics of EPS
for readability
observations = self.get_sensor_observations() | ||
observations["collided"] = collided |
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.
It would be good to document this added field somewhere
* Have controls report if the control function results in a collision * Some docs * Comments/docs
Motivation and Context
Our current collision logic is a little buggy :( It also requires knowing if an action can results in a collision (i.e. move_forward can result in a collision but turn_left cannot); this problem will only get worse know that we allow people to define their own actions.
This PR seeks to resolve this by having the controls check if a collision occurred by checking to see if the filtering step caused us to move less than expected.
@msavva, thoughts in the API?
How Has This Been Tested
Visually/with the collision test in the api side.
Types of changes