def _render_callback()

in robogym/envs/rearrange/common/base.py [0:0]


    def _render_callback(self, _sim, _viewer):
        super()._render_callback(_sim, _viewer)

        if not self.parameters.debug:
            return

        # Debug visualization of object bounding boxes.
        bounding_boxes = (
            self.mujoco_simulation.get_object_bounding_boxes_in_table_coordinates()
        )
        for idx, (pos, size) in enumerate(bounding_boxes):
            name = f"object{idx}"
            _viewer.add_marker(
                size=size, pos=pos, rgba=np.array([0, 0.5, 1, 0.1]), label=name
            )

        # Debug visualization of target bounding boxes.
        bounding_boxes = (
            self.mujoco_simulation.get_target_bounding_boxes_in_table_coordinates()
        )
        for idx, (pos, size) in enumerate(bounding_boxes):
            name = f"target:object{idx}"
            _viewer.add_marker(
                size=size, pos=pos, rgba=np.array([0.5, 0, 1, 0.1]), label=name
            )

        # Debug visualization of the placement area.
        (
            table_pos,
            table_size,
            table_height,
        ) = self.mujoco_simulation.get_table_dimensions()
        placement_area = self.mujoco_simulation.get_placement_area()
        size = np.array(placement_area.size) / 2.0
        pos = np.array([placement_area.offset]) + table_pos - table_size + size
        _viewer.add_marker(
            size=size, pos=pos, rgba=np.array([1, 0.5, 0, 0.1]), label="placement_area"
        )