habitat_sim.physics.RigidObjectManager class

Methods

def add_object_by_template_handle(self, object_lib_handle: str, attachment_node: scene.SceneNode = None, light_setup_key: str = '') -> ManagedRigidObject
Instance an object into the scene via a template referenced by its handle. Optionally attach the object to an existing SceneNode and assign its initial LightSetup key. Returns a reference to the created object.
def add_object_by_template_id(self, object_lib_id: int, attachment_node: scene.SceneNode = None, light_setup_key: str = '') -> ManagedRigidObject
Instance an object into the scene via a template referenced by library id. Optionally attach the object to an existing SceneNode and assign its initial LightSetup key. Returns a reference to the created object.
def get_library_has_handle(self, handle: str) -> bool
Returns whether the passed handle describes an existing BulletRigidObject in the library.
def get_library_has_id(self, object_id: int) -> bool
Returns whether the passed object ID describes an existing BulletRigidObject in the library.
def get_num_objects(self, /) -> int
Returns the number of existing BulletRigidObjects being managed.
def get_object_by_handle(self, handle: str) -> ManagedBulletRigidObject
This returns a copy of the BulletRigidObject specified by the passed handle if it exists, and NULL if it does not.
def get_object_by_id(self, object_id: int) -> ManagedBulletRigidObject
This returns a copy of the BulletRigidObject specified by the passed ID if it exists, and NULL if it does not.
def get_object_handle_by_id(self, object_id: int) -> str
Returns string handle for the BulletRigidObject corresponding to passed ID.
def get_object_handles(self, search_str: str = '', contains: bool = True, sorted: bool = True) -> typing.List[str]
Returns a potentially sorted list of BulletRigidObject handles that either contain or explicitly do not contain the passed search_str, based on the value of boolean contains.
def get_object_id_by_handle(self, handle: str) -> int
Returns integer ID for the BulletRigidObject with the passed handle.
def get_objects_CSV_info(self, search_str: str = '', contains: bool = True) -> str
Returns a comma-separated string describing each BulletRigidObject whose handles either contain or explicitly do not contain the passed search_str, based on the value of boolean contains. Each BulletRigidObject’s info is separated by a newline.
def get_objects_by_handle_substring(self, search_str: str = '', contains: bool = True) -> typing.Dict[str, ManagedBulletRigidObject]
Returns a dictionary of BulletRigidObject objects, keyed by their handles, for all handles that either contain or explicitly do not contain the passed search_str, based on the value of boolean contains.
def get_objects_info(self, search_str: str = '', contains: bool = True) -> typing.List[str]
Returns a list of CSV strings describing each BulletRigidObject whose handles either contain or explicitly do not contain the passed search_str, based on the value of boolean contains.
def get_random_object_handle(self, /) -> str
Returns the handle for a random BulletRigidObject chosen from the existing BulletRigidObject being managed.
def get_undeletable_handles(self, /) -> typing.List[str]
Returns a list of BulletRigidObject handles for BulletRigidObjects that have been marked undeletable by the system. These BulletRigidObjects can still be modified.
def get_user_locked_handles(self, /) -> typing.List[str]
Returns a list of handles for BulletRigidObjects that have been marked locked by the user. These will be undeletable until unlocked by the user. These BulletRigidObject can still be modified.
def remove_all_objects(self, /) -> typing.List[ManagedRigidObject]
This removes a list of all the BulletRigidObjects referenced in the library that have not been marked undeletable by the system or read-only by the user.
def remove_object_by_handle(self, handle: str, delete_object_node: bool = True, delete_visual_node: bool = True) -> ManagedRigidObject
This removes the RigidObject referenced by the passed handle from the library, while allowing ” “for the optional retention of the object’s scene node and/or the visual node
def remove_object_by_id(self, object_id: int, delete_object_node: bool = True, delete_visual_node: bool = True) -> ManagedRigidObject
This removes the RigidObject referenced by the passed ID from the library, while allowing for ” “the optional retention of the object’s scene node and/or the visual node
def remove_objects_by_str(self, search_str: str = '', contains: bool = True) -> typing.List[ManagedRigidObject]
This removes a list of all the BulletRigidObjects referenced in the library that have not been marked undeletable by the system or read-only by the user and whose handles either contain or explicitly do not contain the passed search_str.
def set_lock_by_substring(self, lock: bool, search_str: str = '', contains: bool = True) -> typing.List[str]
This sets the lock state for all BulletRigidObjects whose handles either contain or explicitly do not contain the passed search_str. Returns a list of handles for BulletRigidObjects locked by this function call. Lock == True makes the BulletRigidObject unable to be deleted. Note : Locked BulletRigidObjects can still be modified.
def set_object_list_lock(self, handles: typing.List[str], lock: bool) -> typing.List[str]
This sets the lock state for all BulletRigidObjects whose handles are passed in list. Returns a list of handles for BulletRigidObjects locked by this function call. Lock == True makes the BulletRigidObject unable to be deleted. Note : Locked BulletRigidObjects can still be modified.
def set_object_lock(self, handle: str, lock: bool) -> bool
This sets the lock state for the BulletRigidObject that has the passed name. Lock == True makes the BulletRigidObject unable to be deleted. Note : Locked BulletRigidObjects can still be modified.