def _construct_lane(self, lane, lane_index):
        """
        Construct a physics body for the lane localization
        """
        if lane_index is not None:
            lane.index = lane_index
        # build physics contact
        if not lane.need_lane_localization:
            return
        assert lane.polygon is not None, "Polygon is required for building lane"
        if self.engine and self.engine.global_config["cull_lanes_outside_map"]:
            polygons = TerrainProperty.clip_polygon(lane.polygon)
            if not polygons:
                return
        else:
            polygons = [lane.polygon]
        for polygon in polygons:
            # It might be Lane surface intersection
            n = BaseRigidBodyNode(lane_index, lane.metadrive_type)
            segment_np = NodePath(n)

            self._node_path_list.append(segment_np)
            self._node_path_list.append(n)

            segment_node = segment_np.node()
            segment_node.set_active(False)
            segment_node.setKinematic(False)
            segment_node.setStatic(True)
            shape = BulletConvexHullShape()
            for point in polygon:
                # Panda coordinate is different from metadrive coordinate
                point_up = LPoint3f(*point, 0.0)
                shape.addPoint(LPoint3f(*point_up))
                point_down = LPoint3f(*point, -0.1)
                shape.addPoint(LPoint3f(*point_down))
            segment_node.addShape(shape)
            self.static_nodes.append(segment_node)
            segment_np.reparentTo(self.lane_node_path)

        Construct a physics body for the lane localization
        
metadrive/component/block/base_block.py