def generate_static_box_physics_body(
    heading_length: float,
    side_width: float,
    height=10,
    ghost_node=False,
    object_id=None,
    type_name=MetaDriveType.INVISIBLE_WALL,
    collision_group=CollisionGroup.InvisibleWall
):
    """
    Add an invisible physics wall to physics world
    You can add some building models to the same location, add make it be detected by lidar
    ----------------------------------
    |               *                |  --->>>
    ----------------------------------
    * position
    --->>> heading direction
    ------ longitude length
    | lateral width

    **CAUTION**: position is the middle point of longitude edge
    :param heading_length: rect length in heading direction
    :param side_width: rect width in side direction
    :param height: the detect will be executed from this height to 0
    :param object_id: name of this invisible wall
    :param ghost_node: need physics reaction or not
    :param type_name: default invisible wall
    :param collision_group: control the collision of this static wall and other elements
    :return node_path
    """
    shape = BulletBoxShape(Vec3(heading_length / 2, side_width / 2, height))
    body_node = BaseRigidBodyNode(object_id, type_name) if not ghost_node else BaseGhostBodyNode(object_id, type_name)
    body_node.setActive(False)
    body_node.setKinematic(False)
    body_node.setStatic(True)
    body_node.addShape(shape)
    body_node.setIntoCollideMask(collision_group)
    return body_node

    Add an invisible physics wall to physics world
    You can add some building models to the same location, add make it be detected by lidar
    ----------------------------------
    |               *                |  --->>>
    ----------------------------------
    * position
    --->>> heading direction
    ------ longitude length
    | lateral width

    **CAUTION**: position is the middle point of longitude edge
    :param heading_length: rect length in heading direction
    :param side_width: rect width in side direction
    :param height: the detect will be executed from this height to 0
    :param object_id: name of this invisible wall
    :param ghost_node: need physics reaction or not
    :param type_name: default invisible wall
    :param collision_group: control the collision of this static wall and other elements
    :return node_path
    
metadrive/utils/pg/utils.py