habitat_sim.agent.ObjectControls class

Used to implement actions

Static methods

def is_body_action(action_name: str)
Checks to see if action_name is a body action

Methods

def action(self, obj: scene.SceneNode, action_name: str, actuation_spec: ActuationSpec, apply_filter: bool = True) -> bool
Performs the action specified by action_name on the object

Special methods

def __call__(self, obj: scene.SceneNode, action_name: str, actuation_spec: ActuationSpec, apply_filter: bool = True)
def __init__(self, move_filter_fn: typing.Callable[[typing.Union[numpy.ndarray, magnum.Vector3, typing.Tuple[float, float, float]], typing.Union[numpy.ndarray, magnum.Vector3, typing.Tuple[float, float, float]]], typing.Union[numpy.ndarray, magnum.Vector3, typing.Tuple[float, float, float]]] = <function _noop_filter>) -> None
Method generated by attrs for class ObjectControls.

Properties

move_filter_fn: typing.Callable[[typing.Union[numpy.ndarray, magnum.Vector3, typing.Tuple[float, float, float]], typing.Union[numpy.ndarray, magnum.Vector3, typing.Tuple[float, float, float]]], typing.Union[numpy.ndarray, magnum.Vector3, typing.Tuple[float, float, float]]] get set del
A function that is applied after actions to handle collisions

Method documentation

def habitat_sim.agent.ObjectControls.is_body_action(action_name: str) staticmethod

Checks to see if action_name is a body action

Parameters
action_name Name of the action

def habitat_sim.agent.ObjectControls.action(self, obj: scene.SceneNode, action_name: str, actuation_spec: ActuationSpec, apply_filter: bool = True) -> bool

Performs the action specified by action_name on the object

Parameters
obj scene.SceneNode to perform the action on
action_name Name of the action. Used to query the registry to retrieve the function which implements this action
actuation_spec Specifies the parameters needed by the function
apply_filter Whether or not to apply the move_filter_fn after the action
Returns Whether or not the action taken resulted in a collision

def habitat_sim.agent.ObjectControls.__init__(self, move_filter_fn: typing.Callable[[typing.Union[numpy.ndarray, magnum.Vector3, typing.Tuple[float, float, float]], typing.Union[numpy.ndarray, magnum.Vector3, typing.Tuple[float, float, float]]], typing.Union[numpy.ndarray, magnum.Vector3, typing.Tuple[float, float, float]]] = <function _noop_filter>) -> None

Method generated by attrs for class ObjectControls.

Parameters
move_filter_fn A function that is applied after actions to handle collisions, This should generally be nav.PathFinder.try_step