def _construct_sidewalk(self):
        """
        Construct the sidewalk with collision shape
        """
        if self.engine is None or (self.engine.global_config["show_sidewalk"]):
            for sidewalk_id, sidewalk in self.sidewalks.items():
                if len(sidewalk["polygon"]) == 0:
                    continue
                polygons = TerrainProperty.clip_polygon(sidewalk["polygon"])
                if polygons is None:
                    continue
                for polygon in polygons:
                    height = sidewalk.get("height", None)
                    if height is None:
                        height = PGDrivableAreaProperty.SIDEWALK_THICKNESS
                    z_pos = height / 2
                    np = make_polygon_model(polygon, height)
                    np.reparentTo(self.sidewalk_node_path)
                    np.setPos(0, 0, z_pos)

                    body_node = BaseRigidBodyNode(None, MetaDriveType.BOUNDARY_SIDEWALK)
                    body_node.setKinematic(False)
                    body_node.setStatic(True)
                    body_np = self.sidewalk_node_path.attachNewNode(body_node)
                    body_np.setPos(0, 0, z_pos)
                    self._node_path_list.append(body_np)

                    geom = np.node().getGeom(0)
                    mesh = BulletTriangleMesh()
                    mesh.addGeom(geom)
                    shape = BulletTriangleMeshShape(mesh, dynamic=False)

                    body_node.addShape(shape)
                    self.dynamic_nodes.append(body_node)
                    body_node.setIntoCollideMask(CollisionGroup.Sidewalk)
                    self._node_path_list.append(np)

        Construct the sidewalk with collision shape
        
metadrive/component/block/base_block.py