终止支持通知:2025 年 9 月 10 日, AWS
将停止对的支持。 AWS RoboMaker2025 年 9 月 10 日之后,您将无法再访问 AWS RoboMaker 控制台或 AWS RoboMaker 资源。有关过渡 AWS Batch 到以帮助运行容器化仿真的更多信息,请访问此博客文章。
本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
JSON 格式的示例世界模板
templateBody
(模拟世界模板主体)是 CreateWorldTemplate API 的输入参数。此参数是 JSON 格式的字符串。JSON 指定了一个模拟世界模板,并包含 Simulation 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" } ] } } } ] } ] }
两个房间
例如,以下示例指定了一套一居室房屋。Simulation 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": {} } ] } ] } }