支援終止通知:2025 年 9 月 10 日, AWS 將停止對 的支援 AWS RoboMaker。2025 年 9 月 10 日後,您將無法再存取 AWS RoboMaker 主控台或 AWS RoboMaker 資源。如需有關轉換至 AWS Batch 以協助執行容器化模擬的詳細資訊,請造訪此部落格文章
本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
JSON 中的範例世界範本
templateBody
(模擬世界範本主體) 是 CreateWorldTemplateAPI 的輸入參數。此參數是 JSON 格式化字串。JSON 會指定模擬世界範本,並包含模擬 WorldForge 用於產生世界的參數。
本節包含範例模擬世界樣板本體。
一臥室房子
以下範例指定一間臥室的房子。它指定室內材料和家具。
{ "name": "OneBedroomHouse", "templateBody": { "Version": "2", "Buildings": [ { "Floors": [ { "Floorplan": { "Footprint": { "DesiredAspectRatio": { "x": 1, "y": 1 } }, "Ceiling": { "Height": 3 }, "Rooms": [ { "Type": "Bedroom", "Name": "Bedroom", "DesiredShape": { "Area": 25, "AspectRatio": { "x": 1, "y": 1.2 } } }, { "Type": "Living", "Name": "Living room", "DesiredShape": { "Area": 30, "AspectRatio": { "x": 1, "y": 1.5 } } }, { "Type": "Bathroom", "Name": "Bathroom", "DesiredShape": { "Area": 10, "AspectRatio": { "x": 1, "y": 1.5 } } }, { "Type": "Kitchen", "Name": "Kitchen", "DesiredShape": { "Area": 15, "AspectRatio": { "x": 1.5, "y": 1 } } } ], "DesiredConnections": [ { "Location": [ "Bathroom", "Living room" ], "ConnectionType": "Doorway" }, { "Location": [ "Living room", "Kitchen" ], "ConnectionType": "Opening" }, { "Location": [ "Bedroom", "Living room" ], "ConnectionType": "Doorway" } ] }, "Interior": { "Flooring": { "MaterialSets": [ { "Name": "Floorboard room types", "TargetSet": { "RoomTypes": [ "Kitchen" ] }, "SampleSet": { "MaterialTypes": [ "Floorboards" ] } }, { "Name": "Carpet room types", "TargetSet": { "RoomTypes": [ "Living", "Bedroom" ] }, "SampleSet": { "MaterialTypes": [ "Carpet" ] } }, { "Name": "Bathroom", "TargetSet": { "RoomNames": [ "Bathroom" ] }, "SampleSet": { "MaterialTypes": [ "Parquetry" ] } } ] }, "Walls": { "MaterialSets": [ { "Name": "Brick room types", "TargetSet": { "RoomTypes": [ "Living" ] }, "SampleSet": { "MaterialTypes": [ "Brick" ] } }, { "Name": "Tiles room types", "TargetSet": { "RoomTypes": [ "Bathroom" ] }, "SampleSet": { "MaterialTypes": [ "Tiles" ] } } ] }, "Furniture": { "FurnitureArrangements": [ { "Name": "Dense furniture room types", "TargetSet": { "RoomTypes": [ "Living", "Bedroom", "Kitchen", "Bathroom" ] }, "DesiredSpatialDensity": "Dense" } ] } } } ] } ] } }
只有一個房間
以下範例指定一間臥室的房子。它指定室內家具。
{ "Version": "2", "Buildings": [ { "Floors": [ { "Floorplan": { "Footprint": { "DesiredAspectRatio": { "x": 1, "y": 1 } }, "Ceiling": { "Height": 3 }, "Rooms": [ { "Type": "Bedroom", "Name": "Bedroom", "DesiredShape": { "Area": 40, "AspectRatio": { "x": 1, "y": 1.61 } } } ], "DesiredConnections": [] }, "Interior": { "Furniture": { "FurnitureArrangements": [ { "Name": "Bedroom furniture", "TargetSet": { "RoomNames": [ "Bedroom" ] }, "DesiredSpatialDensity": "Dense" } ] } } } ] } ] }
兩房
以下範例指定一間臥室的房子。模擬 WorldForge 決定詳細資料,包括樓板材料、牆材料、家具放置和連接性。
{ "name": "TwoRooms", "templateBody": { "Version": "2", "Buildings": [ { "Floors": [ { "Floorplan": { "Footprint": { "DesiredAspectRatio": { "x": 1, "y": 1 } }, "Ceiling": { "Height": 3 }, "Rooms": [ { "Type": "Living", "Name": "Living room", "DesiredShape": { "Area": 30, "AspectRatio": { "x": 1, "y": 1.5 } } }, { "Type": "Dining", "Name": "Dining room", "DesiredShape": { "Area": 30, "AspectRatio": { "x": 1, "y": 1.5 } } } ], "DesiredConnections": [] }, "Interior": {} } ] } ] } }