@@ -188,14 +188,7 @@ def draw_object_highlight(
188188 if color is None :
189189 color = mn .Color4 .magenta ()
190190
191- obj_bb = None
192- if obj .is_articulated :
193- from habitat .sims .habitat_simulator .sim_utilities import get_ao_root_bb
194-
195- obj_bb = get_ao_root_bb (obj )
196- else :
197- obj_bb = obj .root_scene_node .cumulative_bb
198-
191+ obj_bb = obj .aabb
199192 obj_center = obj .transformation .transform_point (obj_bb .center ())
200193 obj_size = obj_bb .size ().max () / 2
201194
@@ -619,34 +612,8 @@ def peek(
619612 subject = subject_obj
620613
621614 if subject_bb is None :
622- # if we have gathered an object instance, process the bounding box and transform
623- if isinstance (
624- subject , habitat_sim .physics .ManagedArticulatedObject
625- ):
626- from habitat .sims .habitat_simulator .sim_utilities import (
627- get_ao_global_bb ,
628- )
629-
630- obj_bb = get_ao_global_bb (subject )
631- obj_bb_local = mn .Range3D .from_center (
632- subject .transformation .inverted ().transform_point (
633- obj_bb .center ()
634- ),
635- obj_bb .size () / 2.0 ,
636- )
637- subject_bb = obj_bb_local
638- subject_transform = (
639- subject .root_scene_node .absolute_transformation ()
640- )
641- elif isinstance (subject , habitat_sim .physics .ManagedRigidObject ):
642- subject_bb = subject .root_scene_node .cumulative_bb
643- subject_transform = (
644- subject .root_scene_node .absolute_transformation ()
645- )
646- else :
647- raise AssertionError (
648- f"The subject, '{ subject } ', is not a supported value. Should be an object, object handle, object_id integer, or one of 'stage' or 'scene'."
649- )
615+ subject_bb = subject .aabb
616+ subject_transform = subject .transformation
650617
651618 return self ._peek_bb (
652619 bb = subject_bb ,
0 commit comments