AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker...

466
AWS RoboMaker 开发人员指南

Transcript of AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker...

Page 1: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker开发人员指南

Page 2: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南

AWS RoboMaker: 开发人员指南Copyright © 2021 Amazon Web Services, Inc. and/or its affiliates. All rights reserved.

Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's,in any manner that is likely to cause confusion among customers, or in any manner that disparages or discreditsAmazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may notbe affiliated with, connected to, or sponsored by Amazon.

Page 3: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南

Table of Contents什么是 AWS RoboMaker? .................................................................................................................. 1

您是 AWS RoboMaker 的新用户吗? ............................................................................................. 1支持的软件和版本 ....................................................................................................................... 1软件支持策略 ............................................................................................................................. 2

支持将于 2021 年 4 月结束 .................................................................................................. 3ROS 2 Dashing(测试版) ................................................................................................................... 4

ROS2 中的已知区别 .................................................................................................................... 4使用 Colcon 交叉编译应用程序 ............................................................................................. 4通过 rosout 捕获日志数据 .................................................................................................... 4使用 ROS2 命令行界面 ........................................................................................................ 4使用 AWS RoboMaker 模拟 ROS 服务 .................................................................................. 4

已知问题 .................................................................................................................................... 5:工作方式 ........................................................................................................................................ 6

使用 AWS RoboMaker 开发机器人 ................................................................................................ 6创建 ROS 开发环境 .................................................................................................................... 6创建机器人应用程序 .................................................................................................................... 7开发模拟和测试数据 .................................................................................................................... 7队组管理和部署 .......................................................................................................................... 8

入门 .................................................................................................................................................. 9开始使用 AWS RoboMaker .......................................................................................................... 9

重要许可信息 ..................................................................................................................... 9步骤 1. 创建 账户。 .......................................................................................................... 10步骤 2. 运行HelloWorldSample应用程序 ............................................................................... 11步骤 3 配置环境和构建应用程序 .......................................................................................... 11步骤 4. 运行模拟 ............................................................................................................... 12步骤 5. 部署Robot应用程序 ................................................................................................ 14步骤 6. 清除 ..................................................................................................................... 15其他样本机器人 ................................................................................................................. 16

开始使用 Simulation WorldForge ................................................................................................. 17步骤 1. 完成前提条件 ......................................................................................................... 17步骤 2. 创建模拟世界模板 ................................................................................................... 17步骤 3 从模拟世界模板生成模拟世界 .................................................................................... 17步骤 4. 在HelloWorldSimulation中使用生成的世界 .................................................................. 18步骤 5. 清理 资源 .............................................................................................................. 18

示例应用程序 .................................................................................................................................... 19启动示例应用程序 ...................................................................................................................... 19配置 权限 ................................................................................................................................. 19

最小权限 .......................................................................................................................... 20应用程序版本控制 .............................................................................................................................. 22

$LATEST 版本 ......................................................................................................................... 22更新应用程序版本 ...................................................................................................................... 22删除应用程序版本 ...................................................................................................................... 22

开发 应用程序 .................................................................................................................................. 23创建新自动化应用程序 ............................................................................................................... 23

Prerequisites .................................................................................................................... 24创建机器人应用程序工作区 ................................................................................................. 24创建模拟应用程序工作区 .................................................................................................... 27构建机器人和模拟应用程序捆绑 ........................................................................................... 30

使用 Colcon 构建和捆绑机器人应用程序 ....................................................................................... 30安装 Colcon ..................................................................................................................... 31使用 Colcon 构建和捆绑 ..................................................................................................... 31

创建模拟作业 ............................................................................................................................ 31Prerequisites .................................................................................................................... 32创建源和输出 Amazon S3 存储桶 ........................................................................................ 32

iii

Page 4: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南

创建机器人应用程序 .......................................................................................................... 32创建模拟应用程序 .............................................................................................................. 33创建模拟作业角色 .............................................................................................................. 33创建模拟作业 .................................................................................................................... 34

在您的模拟中使用生成的世界 ...................................................................................................... 35在模拟作业中使用导入的世界 .............................................................................................. 35在ROS和Gazebo使用当地出口的世界 ................................................................................... 36使用带有自定义物理、照明和型号的导出世界 ......................................................................... 36

AWS RoboMaker 云扩展 ............................................................................................................ 37Prerequisites .................................................................................................................... 37安装AWS RoboMaker 云扩展 .............................................................................................. 37

通过 AWS Cloud9 进行开发 ....................................................................................................... 38创建开发环境 .................................................................................................................... 38使用开发环境 .................................................................................................................... 39删除环境 .......................................................................................................................... 45

使用机器人应用程序 .......................................................................................................................... 46创建机器人应用程序 .................................................................................................................. 46创建机器人应用程序版本 ............................................................................................................ 47查看机器人应用程序 .................................................................................................................. 47更新机器人应用程序 .................................................................................................................. 48删除机器人应用程序 .................................................................................................................. 48删除机器人应用程序版本 ............................................................................................................ 49

使用模拟应用程序 .............................................................................................................................. 50创建模拟应用程序 ...................................................................................................................... 50创建模拟应用程序版本 ............................................................................................................... 51查看模拟应用程序 ...................................................................................................................... 51更新模拟应用程序 ...................................................................................................................... 52删除模拟应用程序 ...................................................................................................................... 53删除模拟应用程序版本 ............................................................................................................... 53

使用 Simulation WorldForge 创建世界 .................................................................................................. 55Simulation WorldForge 概念 ....................................................................................................... 55了解模拟世界模板 ...................................................................................................................... 55

平面图 ............................................................................................................................. 56Interiors ........................................................................................................................... 56

常见任务 .................................................................................................................................. 58指定底部的房间列表 .......................................................................................................... 58请求长通道 ....................................................................................................................... 59在房间之间请求出入口 ....................................................................................................... 60请求宽地平面占用空间 ....................................................................................................... 60请求自定义概括高度 .......................................................................................................... 61在不同的房间中为地面指定相同的材质类型 ............................................................................ 61在相同类型的房间之间指定不同的材质类型 ............................................................................ 62在房间中指定更多或更少的毛发 ........................................................................................... 63将特定毛发类型添加到所有管道和单个共享的生命/决策室 ......................................................... 64指定没有毛发的房间 .......................................................................................................... 65

适用于模拟世界模板主体的JSON架构 ........................................................................................... 66示例世界模板 (JSON) ............................................................................................................ 77

一个光室 .......................................................................................................................... 78仅一个房间 ....................................................................................................................... 80两个房间 .......................................................................................................................... 81

管理模拟世界模板 ...................................................................................................................... 82创建模拟世界模板 .............................................................................................................. 83查看模拟世界模板 .............................................................................................................. 95修改模拟世界模板 .............................................................................................................. 95删除模拟世界模板 .............................................................................................................. 96

管理世界生成作业 ...................................................................................................................... 96创建世界生成作业 .............................................................................................................. 96

iv

Page 5: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南

查看世界生成作业 .............................................................................................................. 97取消世界生成作业 .............................................................................................................. 98

管理世界导出任务 ...................................................................................................................... 98创建世界导出任务 .............................................................................................................. 99查看世界导出任务 .............................................................................................................. 99

管理创造的世界 ....................................................................................................................... 100正在导出生成世界 ............................................................................................................ 100查看生成的世界 ............................................................................................................... 100删除生成世界 .................................................................................................................. 101

运行模拟作业 .................................................................................................................................. 102VPC 设置 ............................................................................................................................... 102

为 Amazon VPC 访问配置 AWS RoboMaker 模拟作业 .......................................................... 102模拟作业的 Internet 访问 .................................................................................................. 103

连接到模拟作业 ....................................................................................................................... 103在您启用端口转发之前 ...................................................................................................... 103启用端口转发 .................................................................................................................. 103端口转发示例 .................................................................................................................. 104

访问模拟作业数据 .................................................................................................................... 105根访问和系统功能 .................................................................................................................... 106AWS RoboMaker 创建的环境变量 .............................................................................................. 107在模拟作业中管理标记 .............................................................................................................. 108

通过 ROS 命令行工具使用标记 .......................................................................................... 108通过模拟应用程序中的代码使用标记 ................................................................................... 108

使用 ROS 包进行播放 .............................................................................................................. 109示例启动文件配置 ............................................................................................................ 109播放结束时避免模拟作业失败 ............................................................................................. 112对自定义状态和属性值使用标记 ......................................................................................... 112提前取消模拟作业 ............................................................................................................ 112

管理模拟作业 .......................................................................................................................... 114创建模拟作业 .................................................................................................................. 114查看模拟作业 .................................................................................................................. 118取消模拟作业 .................................................................................................................. 119克隆模拟作业 .................................................................................................................. 119重新启动模拟作业 ............................................................................................................ 120

管理模拟作业批处理 ................................................................................................................. 120启动模拟作业批处理 ......................................................................................................... 121查看模拟作业批处理 ......................................................................................................... 122取消模拟作业批处理 ......................................................................................................... 122克隆模拟作业批处理 ......................................................................................................... 123

模拟工具 ................................................................................................................................ 123GZClient ........................................................................................................................ 124rqt ................................................................................................................................. 125rviz ................................................................................................................................ 126Terminal ........................................................................................................................ 127

队列管理 ........................................................................................................................................ 128部署机器人应用程序 ................................................................................................................. 128

如何部署机器人应用程序 ................................................................................................... 128管理机器人 ............................................................................................................................. 129

创建机器人 ..................................................................................................................... 129删除机器人 ..................................................................................................................... 131

管理队列 ................................................................................................................................ 132创建队列 ........................................................................................................................ 132注册和取消注册机器人 ...................................................................................................... 132删除队列 ........................................................................................................................ 133

管理部署 ................................................................................................................................ 134有条件部署 ..................................................................................................................... 134创建部署作业 .................................................................................................................. 135

v

Page 6: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南

查看部署作业 .................................................................................................................. 136安全性 ........................................................................................................................................... 138

数据保护 ................................................................................................................................ 138身份验证和访问控制 ................................................................................................................. 138

授权和访问控制简介 ......................................................................................................... 139所需权限 ........................................................................................................................ 139AWS RoboMaker 如何与 IAM 协同工作 .............................................................................. 143身份验证和访问控制故障排除 ........................................................................................... 143什么是身份验证? ............................................................................................................ 144什么是访问控制? ............................................................................................................ 145什么是策略? .................................................................................................................. 147使用服务相关角色 ............................................................................................................ 149开始使用 IAM ................................................................................................................. 151

日志记录和监控 ....................................................................................................................... 157使用 Amazon CloudWatch 监控 AWS RoboMaker ................................................................ 157使用 AWS CloudTrail 记录 AWS RoboMaker API 调用 .......................................................... 159

安全合规性 ............................................................................................................................. 160恢复功能 ................................................................................................................................ 161基础设施安全 .......................................................................................................................... 161

标记您的 AWS RoboMaker 资源 ........................................................................................................ 162有关标签的基本知识 ................................................................................................................. 162

标签限制 ........................................................................................................................ 162在 IAM 策略中使用标签 ............................................................................................................ 163

Troubleshooting .............................................................................................................................. 165模拟作业问题排查 .................................................................................................................... 165

模拟作业失败 .................................................................................................................. 165Simulation WorldForge 疑难解答 ................................................................................................ 168

为什么我的世界代作业失败? .............................................................................................. 168为什么我的世界导出任务失败? ........................................................................................... 168

开发环境问题排查 .................................................................................................................... 168示例代码存在问题 ............................................................................................................ 169

部署问题排查 .......................................................................................................................... 169我的部署失败 .................................................................................................................. 169如何在机器人上使用本地库? ............................................................................................. 171您是否遇到机器人应用程序版本 ETag 不匹配的情况? ............................................................ 171

对 Colcon 构建和捆绑进行问题排查 ............................................................................................ 171Colcon 构建失败 ............................................................................................................. 171Colcon 捆绑失败 ............................................................................................................. 172缺少依赖项 ..................................................................................................................... 172

API 参考 ........................................................................................................................................ 173Actions .................................................................................................................................. 173

BatchDeleteWorlds .......................................................................................................... 175BatchDescribeSimulationJob ............................................................................................. 177CancelDeploymentJob ...................................................................................................... 181CancelSimulationJob ........................................................................................................ 183CancelSimulationJobBatch ................................................................................................ 185CancelWorldExportJob ..................................................................................................... 187CancelWorldGenerationJob ............................................................................................... 189CreateDeploymentJob ...................................................................................................... 191CreateFleet .................................................................................................................... 197CreateRobot ................................................................................................................... 200CreateRobotApplication .................................................................................................... 204CreateRobotApplicationVersion .......................................................................................... 208CreateSimulationApplication .............................................................................................. 212CreateSimulationApplicationVersion ................................................................................... 217CreateSimulationJob ........................................................................................................ 221CreateWorldExportJob ..................................................................................................... 231

vi

Page 7: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南

CreateWorldGenerationJob ............................................................................................... 236CreateWorldTemplate ...................................................................................................... 242DeleteFleet ..................................................................................................................... 246DeleteRobot ................................................................................................................... 248DeleteRobotApplication .................................................................................................... 250DeleteSimulationApplication .............................................................................................. 252DeleteWorldTemplate ....................................................................................................... 254DeregisterRobot .............................................................................................................. 256DescribeDeploymentJob ................................................................................................... 259DescribeFleet ................................................................................................................. 263DescribeRobot ................................................................................................................ 267DescribeRobotApplication ................................................................................................. 271DescribeSimulationApplication ........................................................................................... 275DescribeSimulationJob ..................................................................................................... 279DescribeSimulationJobBatch ............................................................................................. 286DescribeWorld ................................................................................................................ 293DescribeWorldExportJob .................................................................................................. 296DescribeWorldGenerationJob ............................................................................................ 300DescribeWorldTemplate .................................................................................................... 305GetWorldTemplateBody .................................................................................................... 308ListDeploymentJobs ......................................................................................................... 310ListFleets ....................................................................................................................... 314ListRobotApplications ....................................................................................................... 317ListRobots ...................................................................................................................... 320ListSimulationApplications ................................................................................................. 323ListSimulationJobBatches ................................................................................................. 326ListSimulationJobs ........................................................................................................... 329ListTagsForResource ....................................................................................................... 332ListWorldExportJobs ........................................................................................................ 334ListWorldGenerationJobs .................................................................................................. 337ListWorlds ...................................................................................................................... 340ListWorldTemplates ......................................................................................................... 343RegisterRobot ................................................................................................................. 346RestartSimulationJob ....................................................................................................... 349StartSimulationJobBatch ................................................................................................... 351SyncDeploymentJob ........................................................................................................ 360TagResource .................................................................................................................. 365UntagResource ............................................................................................................... 367UpdateRobotApplication ................................................................................................... 369UpdateSimulationApplication ............................................................................................. 373UpdateWorldTemplate ...................................................................................................... 378

Data Types ............................................................................................................................ 380BatchPolicy .................................................................................................................... 382Compute ........................................................................................................................ 383ComputeResponse .......................................................................................................... 384DataSource .................................................................................................................... 385DataSourceConfig ........................................................................................................... 386DeploymentApplicationConfig ............................................................................................ 387DeploymentConfig ........................................................................................................... 388DeploymentJob ............................................................................................................... 389DeploymentLaunchConfig ................................................................................................. 391FailedCreateSimulationJobRequest .................................................................................... 393FailureSummary .............................................................................................................. 395Filter .............................................................................................................................. 396FinishedWorldsSummary .................................................................................................. 397Fleet .............................................................................................................................. 398LaunchConfig ................................................................................................................. 400

vii

Page 8: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南

LoggingConfig ................................................................................................................. 402NetworkInterface ............................................................................................................. 403OutputLocation ................................................................................................................ 404PortForwardingConfig ....................................................................................................... 405PortMapping ................................................................................................................... 406ProgressDetail ................................................................................................................ 407RenderingEngine ............................................................................................................. 409Robot ............................................................................................................................ 410RobotApplicationConfig .................................................................................................... 412RobotApplicationSummary ................................................................................................ 413RobotDeployment ............................................................................................................ 415RobotSoftwareSuite ......................................................................................................... 417S3KeyOutput .................................................................................................................. 418S3Object ........................................................................................................................ 419SimulationApplicationConfig .............................................................................................. 420SimulationApplicationSummary .......................................................................................... 421SimulationJob ................................................................................................................. 423SimulationJobBatchSummary ............................................................................................ 427SimulationJobRequest ...................................................................................................... 429SimulationJobSummary .................................................................................................... 432SimulationSoftwareSuite ................................................................................................... 434Source ........................................................................................................................... 435SourceConfig .................................................................................................................. 436TemplateLocation ............................................................................................................ 437TemplateSummary .......................................................................................................... 438VPCConfig ..................................................................................................................... 439VPCConfigResponse ....................................................................................................... 440WorldConfig .................................................................................................................... 442WorldCount .................................................................................................................... 443WorldExportJobSummary ................................................................................................. 444WorldFailure ................................................................................................................... 446WorldGenerationJobSummary ........................................................................................... 448WorldSummary ............................................................................................................... 450

Common Errors ...................................................................................................................... 451Common Parameters ............................................................................................................... 452

限制和支持的区域 ............................................................................................................................ 455文档历史记录 .................................................................................................................................. 456AWS 词汇表 ................................................................................................................................... 457.................................................................................................................................................. cdlviii

viii

Page 9: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南您是 AWS RoboMaker 的新用户吗?

什么是 AWS RoboMaker?AWS RoboMaker 是一项服务,可让您轻松地大规模创建机器人应用程序。AWS RoboMaker 使用云服务扩展机器人操作系统 (ROS) 框架。这包括 AWS 机器学习服务。它包括监控服务。它甚至包括分析服务。借助这些服务的组合,机器人可自行完成一些工作。流式传输数据、导航、通信、理解和学习。AWSRoboMaker 提供了机器人应用程序开发环境。它提供了机器人模拟服务,可加快应用程序测试的速度。您可以利用 Simulation WorldForge 从您使用 定义的模板轻松创建数百个新世界。它提供了队列管理服务,因此您可以远程部署和管理应用程序。

您是 AWS RoboMaker 的新用户吗?如果您是首次接触 AWS RoboMaker 的用户,请执行以下操作。

1. 阅读 :工作方式 (p. 6) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和组件。请按提供的顺序阅读本主题。

2. 阅读开始使用 AWS RoboMaker (p. 9) – 帮助您构建您的第一个机器人应用程序和模拟的教程。介绍如何运行模拟作业。使用 AWS RoboMaker 提供的示例代码。

3. 阅读 开始使用 Simulation WorldForge (p. 17) – 一种教程,可帮助您创建模拟世界模板并生成要在模拟中使用的世界。

4. 根据您的需求,探索以下主题。• 了解机器人操作系统 (ROS)。在 AWS RoboMaker 中,您可以基于 ROS 构建应用程序和模拟。有关更

多信息,请参阅 http://wiki.ros.org/ROS/Tutorials。• 了解 Gazebo,这是一个用于测试机器人的模拟器。Gazebo 可帮助您测试算法。它可以帮助您设计机

器人和训练人工智能。有关更多信息,请参阅 http://gazebosim.org/tutorials。选择版本 9。

支持的软件和版本AWS RoboMaker 支持以下程序、工具和库。

名称 支持的版本 描述

机器人操作系统 (ROS) Kinetic(使用寿命结束:2021 年4 月)

Melodic(使用寿命结束:2023 年5 月)

用于帮助您创建机器人应用程序的库和工具。

机器人操作系统 2 (ROS 2) Dashing(处于 AWS RoboMaker测试版)

ROS 的新版本仍在开发之中。

Colcon 最新 用于捆绑 ROS 机器人和模拟应用程序的命令行工具。

Gazebo 7,9 用于模拟环境中的机器人的工具。

rviz ROS rviz

ROS2 rviz2

以 3D 形式可视化 ROS 中的传感器数据和状态信息的工具。

1

Page 10: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南软件支持策略

名称 支持的版本 描述

rqt latest 用于 ROS GUI 开发的基于 Qt 的框架和插件。

ROS 支持下面列出的 Python 和 Ubuntu 版本。

名称 支持的版本 支持的 Ubuntu 版本

ROS Kinetic Python 2 Ubuntu Xenial

ROS Melodic Python 2 Ubuntu Bionic

ROS2 Dashing Python 3 Ubuntu Bionic

下表显示不同 AWS RoboMaker 功能支持的 ROS 版本。

AWS RoboMaker 功能 支持的 ROS 版本

云扩展 Melodic、Kinetic、Dashing

开发环境(创建) Melodic、Kinetic、Dashing

模拟作业 Melodic、Kinetic、Dashing

队列管理 Melodic、Kinetic、Dashing

AWS RoboMaker 模拟作业支持此处所列的 ROS 发行版和 Gazebo 的组合。

• Kinetic 和 Gazebo 7• Kinetic 和 Gazebo 9• Melodic 和 Gazebo 9• Dashing 和 Gazebo 9

Gazebo 支持以下组件:

组件 支持的版本

物理引擎 ODE

渲染引擎 OGRE

软件支持策略AWS RoboMaker 支持 ROS、Gazebo 和其他依赖组件的特定开源软件版本。AWS RoboMaker 将弃用即将终止使用 (EOL) 的开源软件版本。一般而言,EOL 表示不再支持软件,从其维护者处接收软件更新或安全更新。

AWS RoboMaker 将通知您即将弃用的 EOL 开源软件。如果您的版本将被弃用,您应将 AWS RoboMaker资源迁移到支持的 ROS 分配,以便继续受益于最新的安全更新和性能升级。

2

Page 11: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南支持将于 2021 年 4 月结束

如果您的版本将被弃用,则应将资源迁移到支持的 ROS 发行版。有关 ROS 分配的更多信息,请参阅分配(ROS 1) 和分配 (ROS 2)。

支持将于 2021 年 4 月结束自 2021 年 4 月 30 日起,您将无法再在 AWS RoboMaker 中创建新的 ROS Kinetic、Gazebo 7.1、ROSDashing 或 Ubuntu 16.04 资源。但是,任何现有的 AWS RoboMaker 资源都将保留在您的账户中。如果您不升级,则 AWS RoboMaker 功能中的 ROS Kinetic、Gazebo 7.1、ROS Dashing 和 Ubuntu 16.04 资源的功能将发生更改甚至中断。

下表描述了哪些软件套件组合将被弃用:

软件套件组合 是否已在 4/30/2221 上弃用?

ROS Kinetic、Gazebo 7.1、Ubuntu 16.04 是

ROS Kinetic、Gazebo 9、Ubuntu 16.04 是

ROS Melodic、Gazebo 9、Ubuntu 16.04 否

ROS Dashing、Gazebo 9、Ubuntu 16.04 是

弃用操作将影响以下方面:

• AWS Cloud9 集成开发环境 (IDE)• 您将有权访问所有现有的基于 IDEs 的 ROS Kinetic 和 ROS Dashing。 您可以继续在 IDE 中工作。构建

和捆绑过程的成功执行不能保证。• 您将无法创建新的基于 IDEs 的 ROS Kinetic 和 ROS Dashing。

• 机器人和模拟应用程序• 您将无法创建新的基于 ROS Kinetic 和 ROS Dashing 的机器人应用程序。• 您将无法使用具有 Gazebo 7.1 的 ROS Kinetic、具有 Gazebo 9 的 ROS Kinetic 或具有 Gazebo 9 的

ROS Dashing 创建新的模拟应用程序。• 您将无法使用弃用的 ROS 和 Gazebo 版本创建现有机器人或模拟应用程序的新版本。

• 模拟作业和模拟批处理• 您无法使用 Kinetic、Dashing 或 Gazebo 7.1 通过机器人应用程序和模拟应用程序创建新的模拟作业。

在弃用日期之前启动并且其持续时间超过弃用日期的模拟作业将继续成功运行,直到完成。如果模拟作业的最大持续时间为 14 天,则这些作业在弃用后最多可运行 14 天。

• 部署作业• 您可以继续并创建基于 Kinetic 或 Dashing 的机器人应用程序的部署作业。

• 示例应用程序和云扩展• 在基于 ROS Kinetic 和 ROS Dashing 的应用程序中,不再支持云扩展。虽然您可以将云扩展安装到

ROS Kinetic 和 ROS Dashing 工作区中,但这些扩展可能有效,也可能不起作用。• 您无法再选择 ROS Kinetic 或 ROS Dashing 作为 ROS 分配来启动示例应用程序。示例应用程序仍可下

载到现有 ROS Kinetic 和 ROS Dashing IDEs 中,但它们不再受支持,并且可能会中断。

3

Page 12: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ROS2 中的已知区别

ROS 2 Dashing(测试版)AWS RoboMaker 现在支持机器人操作系统 2 (ROS2) 测试版本。ROS2 在数据分发标准 (DDS) 之上构建,是一个提供发现、序列化和传输功能的行业数据连接标准。ROS2 通过提高安全性、服务质量、支持嵌入式系统和实时方案扩展了 ROS 的使用案例。客户可以通过 AWS 管理控制台、AWS 开发工具包、AWSCLI 和 AWS API,在 AWS RoboMaker 中使用 ROS2-Dashing 开发和测试自己的机器人应用程序。AWSRoboMaker 建议客户不要将此测试版本的 ROS2-Dashing 功能用于生产工作负载。

我们正在发布 AWS RoboMaker ROS2 测试版功能,为客户提供使用 ROS2 构建自己的机器人应用程序的预览,尤其是 ROS2 Dashing,这是 ROS2 的第一个长期支持版本。ROS-2 Dashing 中有一些已知问题,社区正在努力解决这些问题,因此我们建议您不要使用 ROS2 Dashing 构建生产应用程序。不过,这是一个开发、测试和评估具有 AWS RoboMaker ROS2 功能的机器人应用程序的机会,并且在这些问题全部得到解决之后,在我们宣布在 AWS RoboMaker 中正式推出 ROS2 之前,您可以提供反馈。在这个测试计划结束后,我们将不再提供对 ROS2 Dashing 的支持。客户将需要关闭其基于 ROSS2 Dashing 构建的开发环境,并且无法启动新的模拟作业;现有的模拟作业将被允许运行到完成。客户还将需要迁移到新版本的 AWSRoboMaker ROS2 功能,使用该功能来管理他们的机器人队列。

有关测试条款和条件的更多信息,请参阅 AWS 服务条款。

主题• ROS2 中的已知区别 (p. 4)• 已知问题 (p. 5)

ROS2 中的已知区别此部分介绍了使用 AWS RoboMaker 时 ROS 与 ROS2 之间存在的已知区别。

使用 Colcon 交叉编译应用程序现在,您可以使用 colcon 的 cc-build 插件,交叉编译您的机器人应用程序。有关在开发环境中安装该插件的更多信息,请参阅 ros-tooling/cross-compile。

通过 rosout 捕获日志数据发送到 rosout 主题的日志输出将会保存到日志文件中。日志文件名格式为 rosout.log,并且将会复制到创建模拟作业时指定的 Amazon S3 存储桶中。具体而言,将复制到 bucket_name/simulation_id/run_id/ros-logs/rosout 中。

当日志文件由于大小问题而需要轮换时,将为该文件指定数值后缀(例如 rosout.log.1),并且较旧的日志文件会递增。

使用 ROS2 命令行界面要查看 ROS2 主题、消息、节点、服务以及其他信息,请使用 ros2 命令。有关如何使用 ros2 的更多信息,请参阅使用命令行工具执行自检。

使用 AWS RoboMaker 模拟 ROS 服务有关通过 ROS2 Dashing 使用标签和取消模拟的更多信息,请参阅 github.com/aws-robotics/aws-robomaker-simulation-ros-pkgs/tree/dashing。

4

Page 13: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南已知问题

已知问题此部分介绍了将 ROS2 与 AWS RoboMaker 结合使用的已知问题。

• 不支持播放 ROS 包。有关播放 ROS 包的更多信息,请参阅使用 ROS 包进行播放 (p. 109)。当您提供Amazon S3 输出位置时,我们不会自动记录 ROS2 应用程序的 ROS 包。要了解有关从 ROS2 应用程序记录 ROS 包的更多信息,请参阅 GitHub 上的 rosbag2 存储库。

• Hello World 和 机器人监控示例应用程序已更新,能够与 ROS2 结合使用。有关示例应用程序的说明,请参阅示例应用程序 (p. 19)。

5

Page 14: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南使用 AWS RoboMaker 开发机器人

:工作方式AWS RoboMaker 是一项服务,可让您快速开发、测试和部署机器人应用程序。本节概述了机器人开发。它说明了 AWS RoboMaker 的工作原理。如果您是首次接触 AWS RoboMaker 的用户,请按顺序阅读以下内容。

主题• 使用 AWS RoboMaker 开发机器人 (p. 6)• 创建 ROS 开发环境 (p. 6)• 创建机器人应用程序 (p. 7)• 开发模拟和测试数据 (p. 7)• 队组管理和部署 (p. 8)

使用 AWS RoboMaker 开发机器人本节介绍典型的机器人开发工作流程。它告诉您如何使用 AWS RoboMaker 完成任务。

机器人应用程序开发通常在选择物理机器人硬件后启动。首先,您将创建一个开发环境并加载用于构建应用程序的工具。接下来,创建机器人应用程序。编写响应环境数据的自定义逻辑。接下来,构建模拟或机器人将居住的世界模型。收集有关机器人在模拟作业中的运行方式的数据。在测试完成时,将应用程序部署到物理机器人。监控这些应用程序并在需要时更新软件。

作为机器人开发人员,您通常会执行以下活动。

1. 创建 ROS 开发环境 要创建机器人应用程序,您需要已针对 ROS 开发配置的环境以及用于构建和捆绑应用程序的工具(如 Colcon)。您还需要一些工具来帮助您为物理机器人交叉编译应用程序。借助集成开发环境,可更轻松地完成此操作。

在 AWS RoboMaker 中,您可以创建已配置用于开发机器人应用程序的工具的 AWS Cloud9 开发环境。您也可以使用现有环境。

2. 创建机器人应用程序。这是您可以编写代码的地方。在 ROS 提供的基础上构建,并集成您在其他地方找到的功能。您创建的应用程序可与机器人硬件结合使用,提供智能并与云配合使用。

3. 开发模拟和测试数据。在此阶段,在模拟环境中运行机器人应用程序。从模拟中收集传感器数据和其他性能数据。完成机器人编程需要多次模拟测试。

4. 将应用程序部署到机器人队列。当您的应用程序按预期执行时,您可以将其部署到机器人。在 AWSRoboMaker 中,机器人必须属于一组机器人 (一个队列), 才能接收部署的软件。AWS RoboMaker 中的每个虚拟机器人均代表一个物理机器人。

5. 监控和更新机器人。您的机器人正在世界上互动!通过使用您通过 AWS RoboMaker 云扩展 收集的数据对其进行优化。

以下各节探索了每个步骤的详细信息。

创建 ROS 开发环境在创建机器人应用程序之前,您需要一个正确配置的开发环境。使用 AWS RoboMaker 进行的机器人开发取决于大量开源程序包。

6

Page 15: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南创建机器人应用程序

程序包。 版本 Description

机器人操作系统 (ROS) Kinetic

Melodic

用于帮助开发人员创建机器人应用程序的库和工具。

机器人操作系统 2 (ROS2)

Dashing ROS 的新版本仍在开发之中。有关将 ROS 2 与AWS RoboMaker 结合使用的更多信息,请参阅ROS 2 Dashing(测试版) (p. 4)。

Colcon 最新 用于捆绑 ROS 机器人和模拟应用程序的命令行工具。

Gazebo 7.

9

用于在复杂环境中模拟机器人的工具。

rviz Melodic

Dashing

以 3D 形式可视化 ROS中的传感器数据和状态信息的工具。

rqt Melodic

Dashing

用于 ROS GUI 开发的基于 Qt 的框架和插件。

您可以创建自己的开发环境或更新现有开发环境,以支持 AWS RoboMaker。大多数开发人员使用 Ubuntu或其他受支持的 Linux 变体。其他操作系统可能是兼容的。

AWS RoboMaker 提供了一种快速轻松的方法来创建已为机器人开发配置的开发环境。

创建机器人应用程序配置开发环境后,创建一个机器人应用程序。建立在 ROS 提供的基础之上。ROS 依赖于计算图表。它是并发进程(或节点)的集合,这些进程执行像控制车轮电机或传递消息等此类任务。

您不必为常见的机器人硬件和算法创建节点。有一些用于处理各种电机、激光器、促动器、激光雷达和传感器的程序包(它们是节点和相关消息定义)。还有一些使用其他程序包中的数据来创建映射、查找路径等的程序包。要查看更加全面的列表,请参阅 ros.org。

借助 AWS RoboMaker 云扩展,捕获操作数据以帮助您通过智能功能进行故障排除并增强机器人。有关更多信息,请参阅 the section called “AWS RoboMaker 云扩展” (p. 37)。)

开发模拟和测试数据机器人应用程序开发人员使用模拟来帮助优化行为。他们使用模拟来测试机器人算法并执行回归测试。模拟使用逼真的场景和详细的虚拟环境来为世界建模并模拟机器人行为。

在 AWS RoboMaker 中,模拟应用程序 包含场景中组织的机器人、地形和资产的模型。模拟应用程序负责模拟机器人的物理方面,例如其传感器、运动学和动力学。传感器可能包括摄像机、激光雷达甚至 GPS 设备。需要运动学和动力学以允许机器人移动其关节或轮子,并物理地(如碰撞)与模拟的环境相互作用。

7

Page 16: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南队组管理和部署

您可以使用WorldTemplates生成数百个独特的世界 Simulation WorldForge. 每个世界模板都定义了在生成世界时使用的客房类型和家具等参数。当您的世界模板完成后,您使用世界一代的工作生成世界。您可以使用模拟作业中的世界,或导出它们在其他应用程序中使用。

要运行模拟,请在模拟作业中将机器人应用程序与模拟应用程序配对。模拟作业最多可运行 14 天。您可以在运行它时使用新应用程序重新启动它。您可以使用 Gazebo、rviz、rqt 和终端在命令行上进行交互,从而与正在运行的模拟进行交互。例如,使用 Gazebo 查看环境中的机器人的渲染模型,并使用终端侦听 ROS消息或将该消息发送到机器人。

机器人不知道它在模拟环境中。模拟器使用与机器人的物理设备相同的接口和数据类型。这样就可以在模拟中测试相同的机器人软件,然后将其部署到您的机器人中。

队组管理和部署测试完成后,您可以使用 AWS IoT Greengrass 无线更新将机器人应用程序部署到您的机器人。在部署应用程序之前,请将每个机器人设置为接受来自 AWS RoboMaker 的更新并通知其状态。接下来,将您的机器人注册到一个队列。队列是机器人的逻辑分组。设置队列后,部署机器人应用程序。您可以控制部署的进度。您还可以控制应用程序在机器人上启动之前和之后发生的情况。

部署相关信息由 AWS RoboMaker 提供。可以使用 AWS RoboMaker 云扩展 和自定义代码捕获特定于机器人和场景的其他信息。

8

Page 17: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南开始使用 AWS RoboMaker

开始使用 AWS RoboMaker此部分通过运行您的第一个机器人应用程序进行操作 AWS RoboMaker 使用 Simulation WorldForge. 您使用机器人应用程序和样本模拟世界模板 AWS RoboMaker.

主题• 开始使用 AWS RoboMaker (p. 9)• 开始使用 Simulation WorldForge (p. 17)

开始使用 AWS RoboMaker在本节中,您将学习如何构建机器人应用程序和模拟应用程序的基本知识。您还学习如何编辑代码、构建、启动新模拟,以及将应用程序部署到robot。HelloWorld是您可以使用的Robot应用程序和仿真应用示例。HelloWorld专为BOSS3设计。机器人在原地旋转。模拟是一个空的世界。

Note

本教程与 ROS动力学 和 ROS二极管. 有关 ROS2虚拟,参见 ROS 2 Dashing(测试版) (p. 4).

• 构建机器人应用程序。 robot应用程序是在物理robot上运行的robot操作系统(ROS)应用程序。要在 AWSRoboMaker 模拟,您可以构建Robot应用的x86_64架构版本。

• 构建模拟应用程序。 模拟应用包括3D人工世界和 花园亭台 控制该世界上机器人移动的插件。需要X86_64 架构版本的模拟应用程序。

• 启动 AWS RoboMaker 模拟。 模拟帮助您开发和测试算法、培训机器学习模型以及回归测试Robot应用。• 部署机器人应用程序。 您可以将机器人应用程序构建并部署到Plateau3Robot。使用 AWS IoT

Greengrass 通过无线方式完成部署。如需更多有关Plateau3的信息,请参阅 高领器械3.• 访问日志记录和监控功能。 您可以访问服务度量标准、写入的数据 stdout、ROS包和Gazebo日志文

件。可使用 IAM 限制访问。

主题• 重要许可信息 (p. 9)• 步骤 1. 创建 AWS 帐户和管理员 (p. 10)• 步骤 2. 运行HelloWorldSample应用程序 (p. 11)• 步骤 3 配置环境和构建应用程序 (p. 11)• 步骤 4. 运行模拟 (p. 12)• 步骤 5. 部署Robot应用程序 (p. 14)• 步骤 6. 清除 (p. 15)• 其他样本机器人 (p. 16)

重要许可信息AWS RoboMaker 示例应用程序包括在开源许可证下授权的第三方软件。样本仅供演示之用。合并或使用AWS RoboMaker 与您的生产工作负载或商业产品或设备相关的示例应用程序可能影响您在适用的开源许可证下的法律权利或义务。源文件信息包含在 readme 每个样品应用的文件。

• Hello World。• 导航和人员认可

9

Page 18: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南步骤 1. 创建 账户。

• 语音命令• 机器人监控• 使用强化学习的自动驾驶• 使用强化学习后的对象

AWSRobomaker开发环境和模拟包括在开源许可证下授权的第三方软件。在此查看源文件和许可信息:

• 模拟环境• 开发环境

步骤 1. 创建 AWS 帐户和管理员首次使用 AWS RoboMaker 之前,请完成以下任务。

主题• 创建 AWS 账户。 (p. 10)• 创建 IAM 管理员并登录 (p. 10)

创建 AWS 账户。如果您已有 AWS 账户,请跳过此步骤。

当您注册 Amazon Web Services (AWS) 时,您的 AWS 账户会自动注册所有 AWS 服务,包括 AWSRoboMaker。您只需为使用的服务付费。

创建 AWS 账户

1. 打开 https://portal.aws.amazon.com/billing/signup。2. 按照屏幕上的说明进行操作。

在注册时,您将接到一通电话,要求您使用电话键盘输入一个验证码。

请记下您的 AWS 账户 ID,您将在下一个任务中用到它。

创建 IAM 管理员并登录创建AWS帐户时,您会获得单一登录身份。这允许访问帐户中的所有AWS服务和资源。此身份称作 AWS 账户根用户。在使用用于创建账户的凭证登录 AWS 管理控制台时,您可以访问账户中所有的 AWS 资源。

强烈建议您不 使用根用户执行日常任务,即使是管理任务。而应该遵循创建单独的 IAM 用户中的说明。使用管理员权限创建 AWS Identity and Access Management (IAM) 用户。然后,请安全地存储根用户凭证,并仅使用这些凭证执行少数账户和服务管理任务。

要使用管理员权限创建 IAM 用户,请登录控制台

1. 在您的 AWS 账户中使用管理员权限创建账户。有关说明,请参阅 IAM 中的创建您的第一个 IAM 用户指南 用户和管理员组。

Note

我们假设您使用管理员级别的凭据进行本指南中的练习和程序。如果您选择创建并使用另一个IAM 用户,请向该用户授予最低权限。

2. 登录到 AWS 管理控制台。

10

Page 19: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南步骤 2. 运行HelloWorldSample应用程序

要以 IAM 用户身份登录到 AWS 管理控制台,您必须使用特定 URL。有关更多信息,请参阅 https://docs.aws.amazon.com/IAM/latest/UserGuide/getting-started_how-users-sign-in.html中的 IAM 用户指南用户如何登录您的账户。

有关 IAM 的更多信息,请参阅下文:

• AWS Identity and Access Management (IAM)• 入门• IAM 用户指南

步骤 2. 运行HelloWorldSample应用程序在开始使用机器人应用程序和模拟应用程序代码之前,请在 AWS RoboMaker 控制台中运行 Hello World 演示应用程序。这将设置应用程序所需的 AWS 资源,包括用于加载应用程序和编写模拟输出的适当的 IAM 角色和 Amazon S3 存储桶。

运行HelloWorld演示应用程序

1. 登录到 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在 AWS RoboMaker 控制台中,展开左侧的 Resources (资源),然后选择 Sample applications (示例应

用程序)。3. 在 Try AWS RoboMaker sample applications (试用 AWS RoboMaker 示例应用程序) 页面上,选择

Hello World!,然后选择 Launch (启动)。这将打开 simulation job detail (模拟作业详细信息) 页面,同时AWS RoboMaker 将启动示例模拟。

样品应用程序默认使用ROSMelanode和Gazebo9。4. 在 simulation job detail (模拟作业详细信息) 页面上,当状态变为 running (正在运行) 时,选择

Gazebo。5. 在 AWS RoboMaker gzclient 窗口中,使用鼠标或键盘在 TurtleBot 上放大。有关详细信息,请参阅

Gazebo键盘快捷键.

顺时针旋转。Gazebo 的功能齐全,因此您可以试用其他功能。例如,如果您想在机器人上更多光线,请选择 太阳 (点光)图标。然后将指针移动到机器人周围以照亮它。

6. 完成后,关闭浏览器窗口以关闭 Gazebo。

您HelloWorldSimulation运行了1小时。在后续步骤中,您有机会重新启动模拟。如果操作,模拟作业计时器将重置为零,并且模拟作业将再次运行1小时。

步骤 3 配置环境和构建应用程序在本节中,您创建了 AWS Cloud9 环境 AWS RoboMaker. 然后安装样品代码。在此开发环境中,您将修改机器人应用程序,然后构建机器人和模拟应用程序。

主题• 创建开发环境 (p. 11)• 修改和构建应用程序 (p. 12)

创建开发环境AWS Cloud9 开发环境提供了相应工具,以使用 ROS 和 AWS RoboMaker 开发机器人应用程序和模拟应用程序。

11

Page 20: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南步骤 4. 运行模拟

创建开发环境

1. 登录到 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧,展开 开发,选择 开发环境,然后选择 创建环境.3. 在 Create AWS RoboMaker development environment (创建 AWS RoboMaker 开发环境) 页面上,输入

HelloWorld 作为环境的 name (名称)。4. 对于 ROS分销,选择 ROS二极管.5. 接受默认 Instance type (实例类型) (m4.large)。您可以选择不同的实例类型来改善捆绑性能。6. 选择A VPC. 使用默认vpc。7. 选择 Subnet (子网)。使用公共子网。8. 选择 Create (创建) 以创建 AWS Cloud9 开发环境。

修改和构建应用程序在本节中,您使用 AWS Cloud9 修改Robot应用程序的开发环境。这些步骤显示如何逆时针旋转机器人,然后构建Robot和模拟应用。

构建机器人和模拟应用程序

1. 登录到 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧,展开 开发,选择 开发环境,选择 Helloworld,然后选择 开放环境. 可能需要几分钟来准备开发

环境。3. 在 Helloworld AWS Cloud9 开发环境,选择 资源,然后选择 下载样本,然后选择 1. Hello World4. 在左侧的 Environment (环境) 选项卡上,依次展开 HelloWorld、HelloWorld、robot_ws.

src、hello_world_robot 和 nodes (节点)。选择文件 rotate (旋转) 以加载到编辑器中。5. 在 旋转 选项卡,修改代码,使机器人顺时针转动,使速率呈阴性: self.twist.angular.z =

-0.1。通过选择保存文件 文件 然后 保存.6. 构建机器人应用程序。在菜单上,依次选择 Run (AWS RoboMaker 运行)、Build (构建) 和 HelloWorld

Robot (HelloWorld 机器人)。7. 构建模拟应用程序。在菜单上,依次选择 Run (AWS RoboMaker 运行)、Build (构建) 和 HelloWorld

Simulation (HelloWorld 模拟)。

下一步

步骤 4. 运行模拟 (p. 12)

步骤 4. 运行模拟在本节中,您将机器人应用程序和模拟应用程序捆绑到源文件中。源文件包括运行应用程序所需的所有依赖关系。您使用机器人应用程序源文件和模拟应用程序源文件来创建模拟作业。您使用robot应用程序源文件创建部署。

主题• 捆绑 Hello World 应用程序 (p. 12)• 重新启动 Hello World 模拟应用程序 (p. 13)• 探索模拟 (p. 13)

捆绑 Hello World 应用程序在上一步中,您建立了机器人和模拟应用。在此步骤中,您将每个应用程序捆绑到需要运行的资源和依赖关系中。例如,模拟应用程序需要 TurtleBot3 的模型和物理参数。

12

Page 21: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南步骤 4. 运行模拟

Warning

捆绑机器人应用程序和模拟应用程序可能分别需要 20 分钟或更长时间,具体取决于您的实例类型。

捆绑 Hello World 应用程序

1. 在 HelloWorld AWS Cloud9 开发环境中,选择菜单上的 Run (AWS RoboMaker 运行),再选择 Bundle(捆绑),然后选择 HelloWorld Robot (HelloWorld 机器人)。

2. 在菜单上,依次选择 Run (AWS RoboMaker 运行)、Bundle (捆绑) 和 HelloWorld Simulation(HelloWorld 模拟)。

重新启动 Hello World 模拟应用程序可以使用更新的Robot应用程序和模拟应用程序源重新启动运行模拟。在调试代码和进行频繁更改时,这很有用。

当您重新启动模拟时,其计时器将重置为零。它将在原始持续时间内运行,直到重置或取消。对于 HelloWorld,持续时间为 1 小时。

1. 在菜单上,选择 Simulation (AWS RoboMaker 模拟),然后选择 Connect (连接)。从列表中选择模拟作业,然后选择 OKay (确定)。使用新的机器人应用程序重新启动此正在运行的 Hello World 模拟。

2. 选择 AWS RoboMaker Simulation (AWS RoboMaker 模拟),然后选择 Restart with new bundle(s) (使用新的捆绑重新启动)。在 Restart simulation with selected bundles(使用新的捆绑重新启动模拟) 对话框中,为 Robot app bundle path (机器人应用程序捆绑路径) 键入 HelloWorld/robot_ws/bundle/output.tar,并为 Simulation app bundle path (模拟应用程序捆绑路径) 键入 HelloWorld/simulation_ws/bundle/output.tar,然后选择 OK (确定)。

AWS RoboMaker 使用新的应用程序重新启动模拟。这会将模拟的生命周期延长 1 小时。

探索模拟当模拟运行时,您可以启动 花园亭台 并验证Robot是否逆时针旋转。您还可以查看 AWS Cloud9 开发环境终端中的日志。

1. 模拟作业的状态显示在 Simulation (AWS RoboMaker 模拟) 菜单条目旁边。当它过渡到 Running (正在运行) 时,您可以启动应用程序并探究模拟。

2. 在 AWS RoboMaker 控制台中,选择左侧的 Simulation jobs (模拟作业),然后选择 Hello World 模拟作业。

3. 在 Simulation details screen (模型详细信息屏幕) 中的 Simulation tools (模拟工具) 部分,选择Gazebo。

4. 在 花园亭台,放大机器人。它的旋转位置。5. 日志数据将流式传输到 CloudWatch Logs 和 AWS Cloud9 开发环境中的选项卡。

要查看 CloudWatch Logs,选择 日志 在 模拟详情屏幕.6. 模拟作业生成的输出文件在模拟作业输出目标中可用。选择该链接以访问 Amazon S3 存储桶。

下一步

步骤 5. 部署Robot应用程序 (p. 14)

13

Page 22: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南步骤 5. 部署Robot应用程序

步骤 5. 部署Robot应用程序在此部分中,您可以编译“HelloWorldRobot”应用程序,适用于“ARMHF”架构,这些架构由Plateau3使用。您还将在 AWS RoboMaker 中创建机器人,然后使用 AWS IoT Greengrass 软件配置您的 TurtleBot3 机器人。然后,您将机器人注册到新的队组并部署应用程序。

主题• 准备您的Plateau3Robot (p. 14)• 捆绑并部署HelloWorldRobot应用程序 (p. 14)

准备您的Plateau3Robot在将robot应用程序部署到物理机器人之前,请在 AWS RoboMaker. 接下来,使用 AWS IoT Greengrass. 在此之后,创建一个车队并将您的机器人注册到Fleet中。

准备您的 TurtleBot3 机器人

1. 首先,在 AWS RoboMaker 中创建机器人并配置 TurtleBot3 机器人。按创建机器人 (p. 129)中的步骤操作。

2. 接下来,创建一个车队。按创建队列 (p. 132)中的步骤操作。3. 将您的机器人注册为新车队的一部分。执行以下步骤以将机器人 Register (注册) 到注册和取消注册机器

人 (p. 132)中的队组。

捆绑并部署HelloWorldRobot应用程序在本节中,使用 Docker 映像捆绑 ARMHF 架构的 Hello World 应用程序。然后,您将机器人应用程序包复制到 Amazon S3 存储桶并进行部署。

捆绑机器人应用程序和模拟应用程序可能分别需要 20 分钟或更长时间,具体取决于您的实例类型。

Note

TheThethe AWS RoboMaker 交叉编译容器使用 colcon bundle 包装编译来源。这可解决Ubuntu(Bionic和Xenial)的Debian包装。包裹在ROS分布中提供。在ROS分布中不可用的包裹(例如,对于覆盆子的Debian包裹)不受交叉编译容器支持。

捆绑和部署 Hello World 机器人应用程序

1. 登录到 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧,展开 开发,选择 开发环境,选择 Helloworld,然后选择 开放式IDE. 可能需要几分钟来准备开

发环境。3. 在 Helloworld AWS Cloud9 开发环境,选择 巴斯基 页面底部选项卡。接下来,运行以下命令以捆绑

Helloworld ARMHF的Robot应用程序:

Note

以下命令适用于 ROS Kinetic 和 ROS Melodic 应用程序。

$ cd /opt/robomaker/cross-compilation-dockerfile/$ sudo bin/build_image.bash $ cd ~/environment/HelloWorld/robot_ws$ sudo docker run -v $(pwd):/ws -it ros-cross-compile:armhf$ cd ws$ apt update$ rosdep install --from-paths src --ignore-src -r -y

14

Page 23: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南步骤 6. 清除

$ colcon build --build-base armhf_build --install-base armhf_install$ colcon bundle --build-base armhf_build --install-base armhf_install --bundle-base armhf_bundle --apt-sources-list /opt/cross/apt-sources.yaml$ exit

4. 在部署Robot应用程序之前,请将其复制到 Amazon S3 桶 AWS RoboMaker 可以访问。代表您创建一个代表 Helloworld Robot应用。使用以下命令查找存储桶的名称:

$ aws s3 ls | grep "robomakerhelloworld"

现在,将robot应用程序复制到上面找到的桶中。

$ aws s3 cp armhf_bundle/output.tar s3://robomakersampleapplicationhelloworld-bundlesbucket-##########/hello-world-robot.armhf.tar

ARMHF 版本的机器人应用程序为 hello-world-robot.armhf.tar。5. 使用ARMHF版本的Robot应用程序更新代表您创建的HelloWorldRobot应用程序。在 AWS RoboMaker

console (AWS RoboMaker 控制台) 中,选择 Development (开发),再选择 Robot applications (机器人应用程序),然后选择名称以 roboMakerSampleApplicationHelloWorld_ 开头的机器人应用程序。

6. 在 Robot application details (机器人应用程序详细信息) 页面上的 Versions (版本) 中,选择 $LATEST,然后选择 Update (更新)。

7. 在 更新robot应用程序 页面, 来源,指定 ARMHF 从第4步中的 ARMHF源文件 字段,然后选择 创建.8. 在 Robot application details (机器人应用程序详细信息) 页面上的 Versions (版本) 中,选择 Create new

version (创建新版本),然后选择 Create (创建)。9. 现在,您已准备好将Robot应用程序部署到您的Plateau3Robot。在 AWS RoboMaker console (AWS

RoboMaker 控制台) 中,依次选择 Fleet management (队组管理)、Deployments (部署) 和 Createdeployment (创建部署)。

10. 在 创建部署 页面,选择 车队 您已使用已注册的Robot创建了,然后选择 机器人应用 和 Robot应用程序版本 您已创建。

11. 在 部署启动配置,输入 hello_world_robot 对于 包名称. 然后,为 Launch file (启动文件) 键入deploy_rotate.launch。

12. 在 部署配置,接受默认值 并发部署百分比 和 故障阈值百分比.13. 选择 Create (创建)。您可以在 部署详情 第页。

下一步

步骤 6. 清除 (p. 15)

步骤 6. 清除为避免产生额外费用,请使用 AWS 管理控制台删除您为此练习创建的项目。

1. 从 https://console.aws.amazon.com/robomaker/ 打开 AWS RoboMaker 控制台。选择 模拟职位 然后选择 你好,世界 模拟作业。在 Simulation job details (模拟作业详细信息) 页面中,依次选择Actions (操作)、Cancel (取消) 和 Yes, cancel (是,取消)。

Note

90天后,模拟作业将自动删除。2. 从 https://console.aws.amazon.com/cloudformation/ 打开 AWS CloudFormation 控制台,然

后删除包含 HelloWorld 的堆栈。如果有多个条目,请按日期和时间选择。3. 从 https://console.aws.amazon.com/iam/ 打开 IAM 控制台,然后删除 IAM 角色。如果您已创建

权限策略,请将其删除。

15

Page 24: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南其他样本机器人

4. 打开 AWS Cloud9 控制台 https://console.aws.amazon.com/cloud9/。选择 Helloworld 环境,然后选择 删除. 通过键入确认 Delete 然后选择 删除.

其他样本机器人本节包含更高级的机器人和模拟。

主题• Robot Monitoring (p. 16)

Robot Monitoring本节说明如何使用 Amazon CloudWatch 指标和 Amazon CloudWatch Logs 监控模拟书店中机器人的运行状况和运行指标。流指标,包括速度、到最近障碍物的距离、到当前目标的距离、机器人 CPU 利用率和 RAM使用率。

首次使用 AWS RoboMaker 前,请完成创建账户 (p. 10)中的任务。之后,在 AWS RoboMaker 控制台中,启动 Robot Monitoring 示例应用程序。

主题• 查看机器人运行状况和性能指标 (p. 16)• 查看 CloudWatch Logs (p. 16)

查看机器人运行状况和性能指标

Robot Monitoring 示例应用程序使用 AWS RoboMaker 云扩展 将自定义运行状况和性能指标写入 AmazonCloudWatch。

查看机器人运行状况和性能指标

1. 通过以下网址打开 CloudWatch 控制台:https://console.aws.amazon.com/cloudwatch/。2. 在 CloudWatch 控制台中,选择 Metrics (指标)。3. 在 Metrics (指标) 页面上的 All metrics (所有指标) 选项卡中,选择 Robot Monitoring 示例。4. 在 Metrics (指标) 页面上的 All metrics (所有指标) 选项卡中,选择 Robot (机器人)。这些是机器人的运

行指标。5. 选择所有指标。每个指标均以不同的颜色显示在图表上。6. 将鼠标指针悬停在图表的上方可查看该时刻的值。您也可以在图表上选择一个区域以进行放大,或选择

页面顶部的 custom (自定义) 以选择自定义时段。

查看 CloudWatch Logs

在运行模拟作业时,模拟工具和模拟作业中的应用程序会生成日志。

查看日志

1. 通过以下网址打开 CloudWatch 控制台:https://console.aws.amazon.com/cloudwatch/。2. 在 CloudWatch 控制台中,选择 Logs (日志)。3. 在 Log groups (日志组) 页面上,选择 Robot Monitoring Log Group (日志组),然后选择 Turtlebot3。4. 选择一个事件以查看详细信息。例如,如果您筛选 monitor_obstacle_distance 事件,则可以查看

此时与最近障碍物的距离。

16

Page 25: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南开始使用 Simulation WorldForge

开始使用 Simulation WorldForge在本节中,您学习 Simulation WorldForge 概念以及如何创建描述您世界各地参数的模拟世界模板,包括楼层平面图、客房和家具。您还学习如何使用世界一代的工作来生成世界,然后在模拟应用中使用。

主题• 步骤 1. 完成前提条件 (p. 17)• 步骤 2. 创建模拟世界模板 (p. 17)• 步骤 3 从模拟世界模板生成模拟世界 (p. 17)• 步骤 4. 在HelloWorldSimulation中使用生成的世界 (p. 18)• 步骤 5. 清理 资源 (p. 18)

步骤 1. 完成前提条件在开始步行之前,请完成以下设置步骤。安装包括注册 AWS 帐户,配置用户,然后运行HelloWorldSample应用程序。您可以使用HelloWorldRobot应用程序和模拟应用程序在这个步骤中创建的世界。

如果您已经使用 AWS RoboMaker 并且拥有符合所述标准的机器人应用 在您的模拟中使用生成的世界 (p. 35),您可以跳过此步骤。

完成前提条件

1. 按照步骤 1. 创建 AWS 帐户和管理员 (p. 10)中的说明进行操作。2. 运行HelloWorldSample应用程序,详见 步骤 2. 运行HelloWorldSample应用程序 (p. 11).

步骤 2. 创建模拟世界模板在本节中,您将创建一个模拟世界模板。模拟世界模板包含参数 Simulation WorldForge 用于生成随机世界。 Simulation WorldForge 提供示例模板以帮助您开始。

创建模拟世界模板

1. 登录到 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在 AWS RoboMaker 控制台,展开 模拟WorldForge 然后选择 世界模板.3. 在 世界模板 页面,选择 创建模板.4. 在 创建世界模板 页面, 样本模板,选择 浏览并选择.5. 在 模板 页面, 中室,选择 开始.6. 在 模板详情 页面,选择 保存并退出 保存模拟世界模板。您将在下一个部分中使用它来生成模拟世界。

步骤 3 从模拟世界模板生成模拟世界在本节中,您使用创建的模拟世界模板创建世界一代工作。世界一代工作使用指定模板参数生成世界。当您创建生成工作时,您可以在全球范围内指定每个楼层平面图的平面图和内部差异。

从模拟世界模板创建模拟世界

1. 登录到 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在 AWS RoboMaker 控制台,展开 模拟WorldForge 然后选择 世界模板.3. 在 世界模板 页面,选择您创建的样本模板,然后选择 生成世界.

17

Page 26: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南步骤 4. 在HelloWorldSimulation中使用生成的世界

4. 在 生成世界 页面,指定 1 对于 楼层平面图 和 每层平面图的内部变化。 Simulation WorldForge 生成1个世界,或 number of floor plans * interior variations per floor plan。您可以生成多达50个世界。

5. 选择 生成 开始世界一代。6. 在 世界一代工作详情 页面,您可以跟踪世界一代进度。生成的世界显示在 完成的世界.

步骤 4. 在HelloWorldSimulation中使用生成的世界在本节中,您将创建一个模拟作业,其中运行HelloWorld应用程序与您生成的新世界。

在HelloWorldSimulation中使用生成的世界

1. 登录到 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在 AWS RoboMaker 控制台,展开 模拟 然后选择 模拟职位.3. 在 模拟职位 页面,选择HelloWorldSimulationJob。它是指名为robot应用程序的模拟作业

AwsRobomakerhelloworld.4. 在 模拟职位详情 页面,选择 操作 然后选择 克隆.5. 在 审核和创建模拟工作 页面,旁边 步骤3: 指定模拟应用程序,选择 编辑.6. 在 指定模拟应用程序 页面,更改 启动文件 至 worldforge_world.launch.7. 在 指定模拟应用程序 页面,展开 WorldForge进口世界,然后选择 浏览世界.8. 在 选择世界 页面, 世界,选择您之前创建的世界,然后选择 选择世界.9. 在 指定模拟应用程序 页面,选择 下一步.10. 在 审核和创建模拟工作 页面,选择 创建.11. 您可以使用模拟工具探索模拟。有关模拟工具的更多信息,请参阅模拟工具 (p. 123)。有关浏览模拟的

其他方法,请参阅 探索模拟 (p. 13).

步骤 5. 清理 资源为避免额外费用,请按照以下步骤清理示例 步骤 6. 清除 (p. 15).

18

Page 27: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南启动示例应用程序

示例应用程序AWS RoboMaker 附带示例程序,您可以在 AWS RoboMaker 控制台中启动它们。您也可以自行下载并构建它们。每个示例在 GitHub 上都有一个存储库。readme 文件描述此示例以及如何构建它。readme 说明如何在桌面上和在 AWS RoboMaker 中运行它。

• Hello world — 了解有关如何创建机器人应用程序和模拟应用程序的基础知识。从基本的项目模板着手,包含空白空环境中的机器人。

• 机器人监控 — 监控机器人在模拟书店中的运行状况和操作指标。使用 Amazon CloudWatch 指标和Amazon CloudWatch Logs。

在本节中,您将了解如何在 AWS RoboMaker 控制台中启动示例应用程序。此外,您将了解如何在您希望在启动示例应用程序时提供自己的 IAM 角色的情况下配置权限。

主题• 启动示例应用程序 (p. 19)• 配置 权限 (p. 19)

启动示例应用程序利用 AWS RoboMaker 控制台,您可以轻松启动预构建的 AWS RoboMaker 示例应用程序。您可以使用默认设置启动应用程序并让 AWS RoboMaker 管理权限。您也可以选择不同的 Gazebo 版本,并使用自定义 IAM角色。

启动示例应用程序

请按照以下选项卡之一中的步骤进行操作。

1. 登录到 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左窗格中,选择 Resources (资源),然后选择 Sample applications (示例应用程序)。3. 选择其中一个示例应用程序。4. :可选。选择 其他设置 查看其他配置选项。5. :可选。选择A ROS分销. ROS Melodic 是最新版本。它可与 Gazebo 9 一起使用。有关机器人操作系统

(ROS) 的更多信息,请参阅 www.ros.org。6. :可选。选择A 模拟软件套件. 每个示例应用程序都是为 Gazebo 7和 Gazebo 9 构建的。Gazebo 9 为机

器人开发人员提供了额外功能。7. :可选。选择 IAM role (IAM 角色)。AWS RoboMaker 将使用此角色创建示例应用程序环境并启动该环

境。示例应用程序也将使用该环境来访问资源(如 Amazon Rekognition)。Note

如果您是通过 AWS Educate 门户访问 AWS RoboMaker 的学生或教育工作者,则选择robomaker_students IAM 角色。

有关示例应用程序所需的权限的更多信息,请参阅??? (p. 19)

配置 权限在 AWS RoboMaker 控制台中启动示例程序时,您可以提供要使用的 IAM 角色。本节介绍您需要启动样品的内容。

19

Page 28: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南最小权限

有关 AWS Identity and Access Management 角色的更多信息,请参阅创建角色以向 AWS 服务委派权限。

最小权限要启动示例应用程序,您需要一个符合以下要求的角色:

• 与 robomaker.amazonaws.com 建立了信任关系。• 与 lambda.amazonaws.com 建立了信任关系。• 示例应用程序权限。

使用以下权限启动 Hello world 和 Robot monitoring.

将 account# 替换为您的账号。

{ "Version": "2012-10-17", "Statement": [ { "Action": [ "s3:ListBucket", "s3:GetObject", "s3:PutObject" ], "Resource": [ "*" ], "Effect": "Allow" }, { "Action": [ "iam:PassRole" ], "Resource": "arn:aws:iam::account#:role/*", "Effect": "Allow" }, { "Action": [ "robomaker:*" ], "Resource": "*", "Effect": "Allow" }, { "Action": [ "ec2:AssociateRouteTable", "ec2:AttachInternetGateway", "ec2:CreateInternetGateway", "ec2:CreateSubnet", "ec2:CreateVpc", "ec2:CreateTags", "ec2:CreateRoute", "ec2:CreateRouteTable", "ec2:CreateSecurityGroup", "ec2:DeleteSubnet", "ec2:DescribeSecurityGroups", "ec2:DescribeSubnets", "ec2:DescribeVpcs" ], "Resource": "*", "Effect": "Allow" }, {

20

Page 29: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南最小权限

"Action": [ "logs:CreateLogGroup", "logs:CreateLogStream", "logs:PutLogEvents" ], "Resource": [ "arn:aws:logs:us-west-2:account#:log-group:/aws/lambda/*:*" ], "Effect": "Allow" }, { "Condition": { "StringEquals": { "iam:AWSServiceName": [ "robomaker.amazonaws.com" ] } }, "Action": "iam:CreateServiceLinkedRole", "Resource": "*", "Effect": "Allow" }, { "Action": [ "cloudformation:DescribeStacks" ], "Resource": "arn:aws:cloudformation:*:account#:stack/*", "Effect": "Allow" } ]}

21

Page 30: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南$LATEST 版本

应用程序版本控制AWS RoboMaker 支持创建机器人应用程序和模拟应用程序的多个版本。这可以帮助您控制机器人和模拟使用哪个代码。版本是您应用程序的 $LATEST 的版本的带编号快照。您可以创建版本,以便在开发工作流程中的不同环节使用。例如,开发、测试部署或生产。

对 AWS RoboMaker 机器人应用程序或模拟应用程序进行版本控制时,您将创建该应用程序的快照。AWSRoboMaker 会记住每个版本的文件的 Amazon S3 路径和 ETag。您可以使用创建版本时现有的应用程序版本,前提是提供的版本仍然存在于 Amazon S3 路径中,并且未经过更改(其 ETag 未更改)。

对于每个应用程序,您最多可创建 40 个版本。

主题• $LATEST 版本 (p. 22)• 更新应用程序版本 (p. 22)• 删除应用程序版本 (p. 22)

$LATEST 版本创建版本时,AWS RoboMaker 会制作 $LATEST 版本的快照并将版本号递增 1。AWS RoboMaker 会记住文件的 Amazon S3 路径和 ETag。使用路径可以检索文件。使用 ETag 可以确认版本未发生更改。版本号绝不会重复使用。例如,如果最新版本为 10,而您删除了该版本,然后创建新版本,则新版本将为版本 11。

在开发应用程序时,您可以更新 $LATST 版本。选择 $LATEST 版本时,将从您指定的 Amazon S3 位置中检索该版本。例如,如果您使用最新版本的机器人应用程序和模拟应用程序来启动模拟作业,然后在Amazon S3 路径中对机器人应用程序进行更改,并重新启动模拟作业,则将使用更新后的机器人应用程序。

在您部署机器人应用程序时,必须选择特定的编号版本来部署。有关如何创建机器人应用程序版本的更多信息,请参阅创建机器人应用程序版本 (p. 47)。

有关如何创建模拟应用程序版本的更多信息,请参阅创建模拟应用程序版本 (p. 51)。有关 ETag 的更多信息,请参阅常用响应标头。

更新应用程序版本您只能更新 AWS RoboMaker 应用程序的 $LATEST 版本。在执行此操作时,它可在 AWS RoboMaker 中使用。例如,如果您重启某个模拟作业,模拟中将使用应用程序的最新版本。

有关更多信息,请参阅 更新机器人应用程序 (p. 48) 和 更新模拟应用程序 (p. 52)。

删除应用程序版本当您不再需要某个应用程序版本时,请删除它。有关更多信息,请参阅 删除机器人应用程序版本 (p. 49)和 删除模拟应用程序版本 (p. 53)。

22

Page 31: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南创建新自动化应用程序

开发 应用程序本节帮助您进行设置以使用机器人操作系统 (ROS) 进行开发。您将了解如何使用配置的 AWS Cloud9 开发环境创建机器人应用程序和模拟应用程序。您将了解如何使用 AWS RoboMaker 云扩展 扩展您的机器人应用程序。

其中还介绍了如何创建和管理 AWS RoboMaker 机器人应用程序和 AWS RoboMaker 模拟应用程序。

主题• 创建新自动化应用程序 (p. 23)• 使用 Colcon 构建和捆绑机器人应用程序 (p. 30)• 创建模拟作业 (p. 31)• 在您的模拟中使用生成的世界 (p. 35)• AWS RoboMaker 云扩展 (p. 37)• 通过 AWS Cloud9 进行开发 (p. 38)

创建新自动化应用程序此部分介绍如何创建自动化应用程序。它使用目录结构来分隔机器人应用程序和模拟应用程序。这样就可以更轻松地用于 AWS RoboMaker 模拟和其他自动化开发阶段中。

自动化应用程序通常包括机器人应用程序和模拟应用程序。机器人应用程序部署到物理机器人中。模拟应用程序用于对物理世界的不同方面建模。使用 AWS RoboMaker 模拟作业,机器人应用程序可以运行在模拟应用程序中并收集和可视化数据。

AWS RoboMaker 自动化应用程序通常具有以下目录结构和文件:

MyApplication### robot_ws # workspace for the robot system# ### src# ### robot_app # ROS package for the robot application# ### CMakeLists.txt # build config # ### launch# # ### rotate.launch # robot entrypoint, specifies running system # ### package.xml # ROS package config# ### scripts# # ### rotate.py # custom ROS node, loaded at launch# ### setup.py # allow ROS to find your python code# ### src# ### robot_app# ### __init__.py # python module for any .py code### simulation_ws # workspace for the simulation ### src ### simulation_app # ROS package for the simulation application ### CMakeLists.txt # build config ### launch # ### example.launch # simulation entrypoint, specifies world, etc # ### spawn_turtlebot.launch # launch file for spawning the simulated robot ### package.xml # ROS package config ### worlds ### example.world # world description

主题

23

Page 32: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南Prerequisites

• Prerequisites (p. 24)• 创建机器人应用程序工作区 (p. 24)• 创建模拟应用程序工作区 (p. 27)• 构建机器人和模拟应用程序捆绑 (p. 30)

Prerequisites您需要一个针对使用 AWS RoboMaker 进行自动化开发而配置的开发环境。您的开发环境必须具有以下组件:

• 机器人操作系统(ROS) 动力学 或 二极管 或ROS2。• Colcon

如需在 AWS Cloud9 中创建预配置自动化开发环境,请参阅创建开发环境 (p. 38)。

创建机器人应用程序工作区机器人应用程序工作区包含自定义的 ROS 节点和机器人应用程序所需的其他资产。

创建机器人应用程序工作区

1. 打开命令提示符。2. 创建项目目录,然后移动到新目录。

$ mkdir MyApplication$ cd MyApplication

3. 创建 ROS 启动文件、ROS 节点、部署脚本和源文件夹的目录。

$ mkdir -p robot_ws/src/robot_app$ cd robot_ws/src/robot_app $ mkdir -p launch scripts src/robot_app

4. 创建空 __init__.py 文件以将 Python 用于 ROS。

$ touch src/robot_app/__init__.py

5. 将以下 Python 脚本复制到名为 rotate.py 的文件中,然后将其保存到 scripts 目录。此示例节点定期旋转机器人。您的应用程序可能会有多个节点和更复杂的代码。

#!/usr/bin/env python

import rospyfrom geometry_msgs.msg import Twist

class Rotator(): def __init__(self): self._cmd_pub = rospy.Publisher('/cmd_vel', Twist, queue_size=1)

def rotate_forever(self): self.twist = Twist()

r = rospy.Rate(10) while not rospy.is_shutdown(): self.twist.angular.z = 0.1 self._cmd_pub.publish(self.twist)

24

Page 33: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南创建机器人应用程序工作区

rospy.loginfo("Rotating robot: %s", self.twist) r.sleep()

def main(): rospy.init_node('rotate') try: rotator = Rotator() rotator.rotate_forever() except rospy.ROSInterruptException: pass

if __name__ == '__main__': main()

6. 将 Python 脚本转换为可执行文件,以便通过 roslaunch 找到它。roslaunch 用于启动应用程序中的节点。

$ chmod +x scripts/rotate.py

7. 将以下 XML 复制到名为 rotate.launch 的文件中,然后将其保存到 launch 目录。启动文件配置为启动旋转节点。

<launch> <!-- Using simulation time means nodes initialized after this will not use the system clock for its ROS clock and instead wait for simulation ticks.

See http://wiki.ros.org/Clock

Note: set to false for deploying to a real robot. --> <arg name="use_sim_time" default="true"/> <param name="use_sim_time" value="$(arg use_sim_time)"/>

<!-- Rotate the robot on launch --> <node pkg="robot_app" type="rotate.py" name="rotate" output="screen"/></launch>

8. 将以下内容复制到名为 CMakeLists.txt 的文件中,然后将其保存到 robot_app 目录。有关为 ROS创建 make 文件的更多信息,请参阅 CMakeLists.txt。

################################################################################# Set minimum required version of cmake, project name and compile options################################################################################cmake_minimum_required(VERSION 2.8.3)

# Mention your package name project(robot_app)

################################################################################# Find catkin packages and libraries for catkin and system dependencies################################################################################find_package(catkin REQUIRED COMPONENTS rospy std_msgs)

################################################################################# Setup for python modules and scripts################################################################################catkin_python_setup()

25

Page 34: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南创建机器人应用程序工作区

################################################################################# Declare ROS messages, services and actions################################################################################

################################################################################# Declare ROS dynamic reconfigure parameters################################################################################

################################################################################# Declare catkin specific configuration to be passed to dependent projects################################################################################catkin_package( CATKIN_DEPENDS rospy std_msgs)

################################################################################# Build################################################################################include_directories( include ${catkin_INCLUDE_DIRS})

################################################################################# Install################################################################################# Add your custom nodes here. catkin_install_python(PROGRAMS scripts/rotate.py DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})

install(DIRECTORY launch DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})

################################################################################# Test################################################################################

9. 将以下 XML 复制到名为 package.xml 的文件中,然后将其保存到 robot_app 目录。它包括所有机器人应用程序的依赖项。

<?xml version="1.0"?><package format="2"> <name>robot_app</name> <version>1.0.0</version> <description> A custom AWS RoboMaker robot package with a rotating Turtlebot3 </description> <license>MIT</license> <author email="[email protected]">AWS RoboMaker</author> <maintainer email="[email protected]">AWS RoboMaker</maintainer> <buildtool_depend>catkin</buildtool_depend> <depend>rospy</depend> <depend>std_msgs</depend> <depend>turtlebot3_msgs</depend> <exec_depend>message_runtime</exec_depend> <exec_depend>turtlebot3_bringup</exec_depend></package>

26

Page 35: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南创建模拟应用程序工作区

10. 创建 setup.py 文件并将其保存到 robot_app 目录中。它帮助 ROS 查找您的 Python 节点。要了解有关 ROS Python makefile 的更多信息,请参阅 Writing a ROS Python Makefile。

## ! DO NOT MANUALLY INVOKE THIS setup.py, USE CATKIN INSTEAD## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html

from distutils.core import setupfrom catkin_pkg.python_setup import generate_distutils_setup

# fetch values from package.xmlsetup_args = generate_distutils_setup( packages=['robot_app'], package_dir={'': 'src'})

setup(**setup_args)

创建模拟应用程序工作区模拟应用程序工作区包含机器人和地形的模型。它还包括自定义 ROS 节点和模拟应用程序所需的其他资产。

1. 打开命令提示符并转到项目目录,然后运行以下命令以创建模拟应用程序目录。

$ mkdir -p simulation_ws/src/simulation_app$ cd simulation_ws/src/simulation_app$ mkdir launch worlds

2. 将以下 XML 复制到名为 example.launch 的文件中,然后将其保存到 launch 目录。它使用Turtlebot 加载模拟的世界。

<launch> <!-- Always set GUI to false for RoboMaker Simulation Use gui:=true on roslaunch command-line to run with a gui. --> <arg name="gui" default="false"/>

<include file="$(find gazebo_ros)/launch/empty_world.launch"> <arg name="world_name" value="$(find simulation_app)/worlds/example.world"/> <arg name="paused" value="false"/> <arg name="use_sim_time" value="true"/> <arg name="gui" value="$(arg gui)"/> <arg name="headless" value="false"/> <arg name="debug" value="false"/> <arg name="verbose" value="true"/> </include>

<!-- Spawn Robot This must be the same robot type as the robot application --> <include file="$(find simulation_app)/launch/spawn_turtlebot.launch"> <!-- Override arg parameters here e.g, <arg name="x_pos" default="10.0"/> <arg name="y_pos" default="5.0"/> --> </include></launch>

3. 将以下 XML 复制到名为 spawn_turtlebot.launch 的文件中,然后将其保存到 launch 目录。它在模拟中生成 Turtlebot 机器人。

27

Page 36: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南创建模拟应用程序工作区

<launch> <!-- Optional environment variable, default is "waffle_pi". Note that "burger" does not have a camera --> <arg name="model" default="$(optenv TURTLEBOT3_MODEL waffle_pi)" doc="model type [burger, waffle, waffle_pi]"/>

<!-- You may override arg parmaters when including this launch file --> <arg name="x_pos" default="0.0"/> <arg name="y_pos" default="0.0"/> <arg name="z_pos" default="0.0"/> <arg name="roll" default="0.0"/> <arg name="pitch" default="0.0"/> <arg name="yaw" default="0.0"/> <!-- Spawn the robot into Gazebo with the turtlebot description --> <param name="robot_description" command="$(find xacro)/xacro --inorder $(find turtlebot3_description)/urdf/turtlebot3_$(arg model).urdf.xacro" /> <node pkg="gazebo_ros" type="spawn_model" name="spawn_urdf" args="-urdf -param robot_description -model turtlebot3_$(arg model) -x $(arg x_pos) -y $(arg y_pos) -z $(arg z_pos) -R $(arg roll) -P $(arg pitch) -Y $(arg yaw)"/>

<!-- Publish robot and joint states. This allows rviz to display robot data, and in the robot's coordinate frame. These nodes could go into the robot application .launch files instead. --> <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" output="screen"/> <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" /></launch>

4. 将以下 XML 复制到名为 example.world 的文件中,然后将其保存到 worlds 目录。世界文件定义模拟环境中的静态和动态对象。有关为 Gazebo 构建世界的更多信息,请参阅构建世界。

<?xml version="1.0" encoding="utf-8"?><sdf version="1.4"> <world name="default"> <gui> <camera name="default_camera"> <pose>0.8 -0.75 0.35 0 0.25 2.35</pose> </camera> </gui>

<!-- A global light source --> <include> <uri>model://sun</uri> </include>

<!-- A ground plane --> <include> <uri>model://ground_plane</uri> </include>

<physics type="ode"> <real_time_update_rate>1000.0</real_time_update_rate> <max_step_size>0.001</max_step_size> <real_time_factor>1</real_time_factor> <ode> <solver> <type>quick</type> <iters>150</iters>

28

Page 37: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南创建模拟应用程序工作区

<precon_iters>0</precon_iters> <sor>1.400000</sor> <use_dynamic_moi_rescaling>1</use_dynamic_moi_rescaling> </solver> <constraints> <cfm>0.00001</cfm> <erp>0.2</erp> <contact_max_correcting_vel>2000.000000</contact_max_correcting_vel> <contact_surface_layer>0.01000</contact_surface_layer> </constraints> </ode> </physics> <scene> <ambient>0.4 0.4 0.4 1</ambient> <background>0.7 0.7 0.7 1</background> <shadows>true</shadows> </scene> </world></sdf>

5. 将以下文本复制到名为 CMakeLists.txt 的文件中,然后将其保存到 simulation_app 目录。

cmake_minimum_required(VERSION 2.8.3)

project(simulation_app)

find_package(catkin REQUIRED COMPONENTS gazebo_ros)

catkin_package(DEPENDS gazebo_ros)

install(DIRECTORY launch worlds DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})

6. 将以下 XML 复制到名为 package.xml 的文件中,然后将其保存到 simulation_app 目录。它包括所有模拟应用程序的依赖项。

<?xml version="1.0"?><package format="2"> <name>simulation_app</name> <version>1.0.0</version> <description> A custom AWS RoboMaker simulation package with a TurtleBot3 in an empty Gazebo world. </description> <license>MIT</license> <author email="[email protected]">AWS RoboMaker</author> <maintainer email="[email protected]">AWS RoboMaker</maintainer> <buildtool_depend>catkin</buildtool_depend> <depend>gazebo_ros</depend> <depend>gazebo_plugins</depend> <depend>turtlebot3_description</depend> <depend>turtlebot3_gazebo</depend> <depend>turtlebot3_simulations</depend> <exec_depend>gazebo</exec_depend></package>

29

Page 38: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南构建机器人和模拟应用程序捆绑

构建机器人和模拟应用程序捆绑AWS RoboMaker 可使用 colcon 来处理自动化应用程序的构建和捆绑。有关更多信息,请参阅 使用 Colcon构建和捆绑机器人应用程序 (p. 30)。)

1. 打开命令行并转到 robot_ws 目录,然后运行以下命令。

$ rosdep update$ rosdep install --from-paths src --ignore-src -r -y$ colcon build$ colcon bundle

如果您正在从命令行启动,请运行以下命令:

$ source install/setup.sh$ roslaunch robot_app rotate.launch

在 AWS RoboMaker 中使用以下内容启动机器人应用程序:

roslaunch robot_app rotate.launch

2. 转到 simulation_ws 目录,然后运行以下命令。

$ rosdep update$ rosdep install --from-paths src --ignore-src -r -y$ colcon build$ colcon bundle

如果您正在从命令行启动,请运行以下命令:

$ source install/setup.sh$ roslaunch simulation_app example.launch

在 AWS RoboMaker 中使用以下内容启动模拟应用程序:

roslaunch simulation_app example.launch

使用 Colcon 构建和捆绑机器人应用程序AWS RoboMaker 可使用 colcon 来处理自动化应用程序的构建和捆绑。colcon 是由构建的命令行工具 开源机器人基金会 (OSRF)。它将自动构建和捆绑 ROS 和 ROS2 应用程序。它应是 catkin_make 的简易替代。

有关 colcon 的更多信息,请参阅 Colcon。如果您在使用 colcon 进行构建时遇到问题,请参阅 colcon-ros。有关使用 colcon 进行构建时出现的问题,请参阅 colcon-bundle。

主题• 安装 Colcon (p. 31)• 使用 Colcon 构建和捆绑 (p. 31)

30

Page 39: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南安装 Colcon

安装 Colcon使用以下命令安装 colcon 和 colcon-bundle:

apt-get updateapt-get install python3-pip python3-aptpip3 install -U setuptoolspip3 install -U colcon-common-extensions colcon-ros-bundle

如果已安装 colcon,则可以使用以下命令安装捆绑支持:

pip3 install -U colcon-ros-bundle

使用 Colcon 构建和捆绑如果您从 catkin,请在使用colcon构建和捆绑机器人应用程序之前验证以下内容:

• 您要包括在应用程序中的所有文件夹均已定义。例如,以下代码包括常见的ROS文件夹 launch 和 nodes在由创建的安装目录中 colcon。您可以替换 launch 和 nodes 与您的应用程序使用的文件夹。确保此块已在您的 cMakeLists.txt 文件:

install(DIRECTORY launch nodes DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})

有关 CMakeList.txt 和 catkin,请参阅 小猫/ CMakeLists.txt文本 于 运连翻。场动法.• 您的所有应用程序依赖项均通过进行安装 rosdep 或 pip。确保所有依赖项均已添加到 package.xml

和/或包括 requirements.txt 文件。如果公共rosdep来源列表中没有依赖项,则可以创建自定义来源列表。要执行此操作,请按照 运连翻。场动法. 有关故障排除的更多信息,请参阅 对 Colcon 构建和捆绑进行问题排查 (p. 171).

• 您通过启动文件浏览的所有引数在中被定义为环境变量 AWS RoboMaker 模拟作业。您可以使用控制台或定义环境变量 AWS RoboMaker SDK。有关使用环境变量的示例,请参阅 ??? (p. 111).

使用以下命令构建并捆绑您的机器人应用程序:

cd robotic-application-workspacecolcon buildcolcon bundle

您可以在捆绑和上传应用程序之前测试您的应用程序:

source install/setup.shroslaunch package_name launch_file

创建模拟作业本节介绍如何从命令行创建模拟作业。

主题• Prerequisites (p. 32)• 创建源和输出 Amazon S3 存储桶 (p. 32)

31

Page 40: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南Prerequisites

• 创建机器人应用程序 (p. 32)• 创建模拟应用程序 (p. 33)• 创建模拟作业角色 (p. 33)• 创建模拟作业 (p. 34)

Prerequisites要从命令行创建 AWS RoboMaker 模拟作业,您需要以下组件:

• AWS命令行界面(AWS CLI)。有关安装 AWS CLI,参见 安装 AWS CLI.• 机器人应用程序和模拟应用程序。它们必须由 colcon 进行捆绑并针对 X86_64 架构。要从头开始创建简

单自动化应用程序和模拟应用程序,请参阅创建新自动化应用程序 (p. 23)。

(可选)您需要对 AWS RoboMaker 控制台的访问权限,以便轻松访问 Gazebo、rqt、rviz 和终端等模拟工具。这些工具在 Simulation Job Detail (模拟作业详细信息) 页面上可用。

创建源和输出 Amazon S3 存储桶在创建模拟作业之前,您需要创建存储桶,以用作应用程序的源位置。您也可以为模拟作业期间生成的输出创建存储桶。

1. 打开命令提示符。2. 为应用程序源创建存储桶。此存储桶将作为您机器人应用程序和模拟应用程序的源位置。选择唯一的存

储桶名称。

$ aws s3 mb s3://myapplicationsource

3. 为模拟作业生成的输出创建存储桶。AWS RoboMaker 在模拟作业完成时上传 ROS 包、ROS 日志和Gazebo 日志。选择唯一的存储桶名称。

$ aws s3 mb s3://mysimulationjoboutput

创建机器人应用程序您需要先在 AWS RoboMaker 中创建机器人应用程序,然后才可以创建模拟作业。它包含目标架构和 ROS版本等详细信息。它可直接在模拟作业中使用,也可以部署到机群中的物理机器人。

1. 打开命令提示符。2. 将机器人应用程序源捆绑复制到 Amazon S3 存储桶中。在复制期间,它会重命名为 /my-robot-

application.tar.gz。捆绑的扩展名必须为 .tar 或 .tar.gz。

机器人应用程序必须针对 X86_64 架构而构建。

$ aws s3 cp robot_ws/bundle/output.tar.gz s3://myapplicationsource/my-robot-application.tar.gz

3. 在 AWS RoboMaker 中创建机器人应用程序。

$ aws robomaker create-robot-application --name MyRobotApplication --sources s3Bucket=myapplicationsource,s3Key=my-robot-application.tar.gz,architecture=X86_64 --robot-software-suite name=ROS,version=Kinetic

32

Page 41: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南创建模拟应用程序

该调用返回新创建机器人应用程序的相关信息。创建模拟作业时,您将使用 Amazon 资源名称 (ARN)。

创建模拟应用程序一个模拟应用程序包含模拟环境所需的全部资产和逻辑。您需要先在 AWS RoboMaker 中创建模拟应用程序,然后才可以创建模拟作业。

1. 打开命令提示符。2. 将模拟应用程序源捆绑复制到 Amazon S3 存储桶中。模拟应用程序必须针对 X86_64 架构而构建。捆

绑的扩展名必须为 .tar 或 .tar.gz。

$ aws s3 cp simulation_app/bundle/robot_ws/bundle/output.tar.gz s3://myapplicationsource/my-simulation-application.tar.gz

3. 在 AWS RoboMaker 中创建模拟应用程序

$ aws robomaker create-simulation-application --name MySimulationApplication --sources s3Bucket=myapplicationsource,s3Key=my-simulation-application.tar.gz,architecture=X86_64 --robot-software-suite name=ROS,version=Kinetic --simulation-software-suite name=Gazebo,version=7 --rendering-engine name=OGRE,version=1.x

该调用返回新创建模拟应用程序的相关信息。创建模拟作业时,您将使用 Amazon 资源名称 (ARN)。

创建模拟作业角色在创建模拟作业时,您需要指定 IAM 角色,AWS RoboMaker 可以使用该角色访问 Amazon S3 存储桶和Amazon CloudWatch Logs 等资源。您的机器人应用程序也将使用该角色来访问所用的资源,例如 AmazonLex 或 Amazon Rekognition。

如果您已创建了角色,请跳至创建模拟作业 (p. 34)。

创建模拟作业角色

1. 登录 AWS 管理控制台 并通过以下网址打开 AWS Identity and Access Management 控制台:console.aws.amazon.com/iam。

2. 创建访问策略。在左侧,选择 Policies (策略),然后选择 Create policy (创建策略)。选择 JSON,然后粘贴以下代码:

{ "Version": "2012-10-17", "Statement": [ { "Action": "s3:ListBucket", "Resource": [ "arn:aws:s3:::my-input-bucket" ], "Effect": "Allow" }, { "Action": [ "s3:Get*", "s3:List*" ], "Resource": [

33

Page 42: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南创建模拟作业

"arn:aws:s3:::my-input-bucket/*" ], "Effect": "Allow" }, { "Action": "s3:Put*", "Resource": [ "arn:aws:s3:::my-output-bucket/*" ], "Effect": "Allow" }, { "Action": [ "logs:CreateLogGroup", "logs:CreateLogStream", "logs:PutLogEvents", "logs:DescribeLogStreams" ], "Resource": [ "arn:aws:logs:*:account#:log-group:/aws/robomaker/SimulationJobs*" ], "Effect": "Allow" } ]}

使用您的输入和输出存储桶名称替换 my-input-bucket 和 my-output-bucket。使用您的 AWS 账号替换 account#。

选择 Review policy (查看策略),键入 Name (名称),然后选择 Create policy (创建策略)。3. 选择 Role,然后选择 Create role。4. 在 创建角色: 步骤1 页面,选择 机器人. 选择 Robomaker-模拟 作为使用情形,然后选择 下一步:

Permissions (权限)5. 在 权限 页面,选择您在上面创建的策略,然后选择 下一步: 标签6. 在 添加标签 页面,向角色添加可选标签,然后选择 下一步: 审核7. 在 Review (查看) 页面上,键入 Role name (角色名称),然后选择 Create role (创建角色)。8. 选择角色,然后选择您创建的角色。记录角色的 Amazon 资源名称 (ARN)。创建模拟作业时,您将会用

到它。

创建模拟作业创建模拟作业时,您指定模拟中的应用程序及其启动配置、IAM 角色和模拟持续时间。

创建模拟作业

1. 打开命令提示符。2. 创建模拟作业。

$ aws robomaker create-simulation-job --max-job-duration-in-seconds 3600 --iam-role arn:aws:iam::111111111111:role/RoboMakerSimulationJobRole --robot-applications application=arn:aws:robomaker:us-west-2:111111111111:robot-application/MyRobotApplication/1551987693226,launchConfig='{packageName=robot_app,launchFile=rotate.launch}' --simulation-applications application=arn:aws:robomaker:us-west-2:111111111111:simulation-application/MyRobotApplication/1551988628094,launchConfig='{packageName=simulation_app,launchFile=example.launch}'

3. 使用以下命令检查您的模拟作业的状态。

34

Page 43: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南在您的模拟中使用生成的世界

$ aws robomaker list-simulation-jobs$ aws robomaker describe-simulation-job --job arn:aws:robomaker:us-west-2:111111111111:simulation-job/sim-pql32v7pfjy6

当模拟处于 Running 状态时,您可以使用 Gazebo、rqt、rviz 和终端等工具来可视化传感器、设备和模拟的其他方面。要访问工具,请通过 https://console.aws.amazon.com/robomaker/ 打开 AWSRoboMaker 控制台,然后选择 Simulation jobs (模拟作业) 并选择您的模拟。向下滚动并选择其中一个工具。

有关模拟工具的更多信息,请参阅模拟工具 (p. 123)。

在您的模拟中使用生成的世界Simulation WorldForge 已与 AWS RoboMaker 集成。您创造的世界 Simulation WorldForge 可用于模拟AWS RoboMaker. 您不需要导出、修改、捆绑和上传世界以在模拟中使用。但是,如果您的世界要求,您可能需要导出并修改世界:

• 不同于 默认SDF物理• 专业照明• 自定义模型

本节提供了有关如何在模拟中使用生成世界的更多信息。您无需导出世界以在模拟中使用。

Important

要了解如何向您收取 AWS RoboMaker 费用的信息,请参阅 AWS RoboMaker 定价。

主题• 在模拟作业中使用导入的世界 (p. 35)• 在ROS和Gazebo使用当地出口的世界 (p. 36)• 使用带有自定义物理、照明和型号的导出世界 (p. 36)

在模拟作业中使用导入的世界Simulation WorldForge 整合到 AWS RoboMaker. 您可以通过修改模拟应用程序启动文件,在模拟中使用生成的世界。除非您有独特的情景,否则您不需要导出或修改世界。

修改启动文件

1. 更新您的模拟应用程序启动文件。

<launch> <!-- Always set GUI to false for AWS RoboMaker Simulation Use gui:=true on roslaunch command-line to run with gzclient. --> <arg name="gui" default="false"/>

<include file="$(find aws_robomaker_worldforge_worlds)/launch/launch_world.launch"> <arg name="gui" value="$(arg gui)"/> </include>

35

Page 44: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南在ROS和Gazebo使用当地出口的世界

<!-- Your other launch commands go here. --> </launch>

您可以在(0、0、0)的机器人中喷洒您的机器人。世界 Simulation WorldForge 保证在(0、0、0)的1米圆柱体内生成产品。

2. 在控制台上,当您创建或克隆模拟作业时, WorldForge进口世界 请选择一个世界。

在 AWS CLI,指定世界 worldConfigs:

worldConfigs={world=arn:aws:robomaker:eu-west-1:MyAccount:world/MyGeneration/MyWorld

在ROS和Gazebo使用当地出口的世界Simulation WorldForge 使您可以在您的ROS环境中使用的导出世界很容易。您选择导出的世界被复制到一个单个.zip文件。.zip文件包括使用ROS和Gazebo修改和可视化世界所需的所有资产。它包括以下重要文件夹:

• 根文件夹, 工作区_src是ROS工作区。它包含全球共享模式、世界数据和其他信息。它与ROS1和ROS2兼容。

• 共享模式 已复制到 workspace_src/src/aws_robomaker_worldforge_shared_models/models。例如,如果同一个椅子在多个世界中使用,它将放置在共享型号文件夹中。

• 世界数据 已复制到 workspace_src/src/aws_robomaker_worldforge_worlds/worlds/.

创建和推出世界

1. 按照 创建世界导出任务 (p. 99) 导出世界。2. Unzip 全世界。

$ cd MyApplication/simulation_ws$ unzip MyExportedWorld.zip

3. 创造世界。

$ rosdep install --from-paths src --ignore-src -r -y$ colcon build

4. 启动世界。

$ source install/setup.sh$ roslaunch aws_robomaker_worldforge_worlds launch_world.launch gui:=true

使用带有自定义物理、照明和型号的导出世界如果您的模拟场景需要自定义,您可以导出和修改世界。例如,您可以应用自定义物理、不同的照明效果、添加自定义模型或进行其他修改。

在导出世界之后,您需要修改 .world 文件包括导出的世界模式。TheThethe .world 文件使用SDF。有关SDF的更多信息,请参阅 SD格式.

修改您的 .world 包括导出的世界模型的文件

1. 按照 创建世界导出任务 (p. 99) 导出世界。

36

Page 45: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南AWS RoboMaker 云扩展

2. 将以下内容复制到 .world 文件。确保世界名称与导出型号名称匹配。

<sdf version="1.6"> <world name="generation_82856b0yq33y_world_16"> <model name="WorldForge World" <include> <uri>model://generation_82856b0yq33y_world_16</uri> </include> </model> <!-- Your other <world> elements go here --> </world></sdf>

3. 验证您的启动文件是否包含已修改的 .world 文件。使用更新的启动文件启动模拟。

AWS RoboMaker 云扩展AWS RoboMaker 云扩展是 ROS 程序包集合,您可将其与机器人和模拟应用程序配合使用来轻松访问AWS。该扩展实现了众多激动人心的方案。例如,您可能会在物理机器人探索环境时,捕获来自机器人的视频及其他传感器数据。您可以为机器人提供语音并处理语音命令。您可以识别人脸和物体。

可用的软件包如下所述。

• Amazon CloudWatch 指标 — 从您的机器人流式传输传感器数据、性能指标和其他信息。查看一段时间的数据并设置警报,在数据达到特定阈值(例如,电量不足)时接收提醒。

• Amazon CloudWatch Logs — 将日志记录数据从机器人队列流式传输到集中位置以便于分析。在一个位置搜索数百个机器人生成的数据。

• Amazon Kinesis Video Streams — 将实时视频从机器人流式传输到 AWS 中。• Amazon Lex — 创建具有参与式用户体验以及逼真交谈功能的机器人。• Amazon Polly — 使用逼真的声音将文本转换为语音,支持不同语言。• Amazon S3 — 轻松记录和存储机器人应用程序数据。

要查看这些扩展的使用,请访问 AWS RoboMaker 示例应用程序页面 AWS RoboMaker 示例应用程序。您可以快速轻松地启动并参与到不同的机器人模拟中。

Prerequisites要使用 AWS RoboMaker 云扩展,必须拥有:

• 一个 AWS 账户。要注册 AWS 账户,请参阅步骤 1. 创建 AWS 帐户和管理员 (p. 10)• AWS 凭证。这些凭证用于访问 AWS 服务。• 配置 IAM 角色权限以允许 AWS RoboMaker 云扩展 使用 AWS 服务。各个扩展中包含的 README 文件中

说明了所需的权限。• Ubuntu 16.04 上的 ROS Kinetic、Ubuntu 18.04 上的 ROS Melodic 或Ubuntu 18.04 上的 ROS 2

Dashing。如果您使用的是 AWS RoboMaker 开发环境,该环境已针对使用选定发行版进行机器人开发进行了预配置。有关 ROS 2 Dashing 的更多信息,请参阅ROS 2 Dashing(测试版) (p. 4)。

安装AWS RoboMaker 云扩展要安装 AWS RoboMaker 云扩展,请按照各个程序包的 README 文件中提供的说明操作。

37

Page 46: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南通过 AWS Cloud9 进行开发

• Amazon Kinesis & Amazon Rekognition• Amazon Lex• Amazon Polly• Amazon CloudWatch Logs• Amazon CloudWatch Metrics (指标)。• Amazon S3 Rosbag

通过 AWS Cloud9 进行开发您可为 AWS RoboMaker 和机器人开发创建 AWS Cloud9 开发环境。该环境预配置有 ROS 并集成其他AWS RoboMaker 功能。通过该环境,您可以管理生成配置、创建模拟作业并通过 Gazebo、rviz、rqt 和终端来研究运行的模拟。

您可以通过 Web 浏览器访问 AWS Cloud9 开发环境。

主题• 创建开发环境 (p. 38)• 使用开发环境 (p. 39)• 删除环境 (p. 45)

创建开发环境在本节中,您将创建一个开发环境并从浏览器访问它。

Note

完成这些步骤可能会对您的 AWS 账户收费。其中可能包括服务(Amazon EC2 和 AWSRoboMaker)费用。有关更多信息,请参阅 Amazon EC2 定价、AWS RoboMaker 定价和 云服务定价。

创建开发环境

按照以下步骤操作:

1. 登录 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航窗格中选择 Development (开发),然后选择 IDE。3. 在 Create AWS RoboMaker development environment (创建 AWS RoboMaker 开发环境) 页面上,键入

环境的 name (名称)。4. 选择 ROS Distribution (ROS 发行版)。有关机器人操作系统 (ROS) 的更多信息,请参阅 www.ros.org。有

关将 ROS 2 与 AWS RoboMaker 结合使用的更多信息,请参阅ROS 2 Dashing(测试版) (p. 4)。5. 对于 Instance type (实例类型),根据所要执行的任务类型,选择带有您认为所需的 RAM 和 vCPU 数量的

实例类型。也可以保留默认选项。

Note

选择 RAM 和 vCPU 更多的实例类型可能会导致对您的 AWS 账户收取额外的 Amazon EC2 费用。

6. 在 Networking (联网) 中,如果您的开发环境需要访问 Amazon VPC 上的资源,请选择 VPC 和子网。7. 选择 Create (创建) 以创建开发环境。

38

Page 47: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南使用开发环境

8. 在 Environment details (环境详细信息) 页面上,选择 Open environment (打开环境)。准备环境可能需要一点时间。

您可在左侧导航窗格中选择 Development (开发),然后选择 Development environments (开发环境),以此来列出可用的开发环境。

使用开发环境本节提供有关在 AWS Cloud9 开发环境中使用 AWS RoboMaker 功能的更多信息。

主题• 手动切换 Gazebo 版本 (p. 39)• 环境设置 (p. 40)• 创建工作流 (p. 41)• 菜单命令参考 (p. 43)

手动切换 Gazebo 版本此部分介绍如何更改 AWS Cloud9 开发环境中所支持 Gazebo 的版本。这只适用于 ROS Kinetic 开发环境。

切换 Gazebo 版本时,它会影响整个 开发环境。开发环境中的所有机器人应用程序和模拟应用程序将在切换后的环境中构建和捆绑。

Note

模拟应用程序依赖于版本。要更改版本,您需要更新应用程序中的依赖项。

主题• 从 Gazebo 7 切换到 Gazebo 9 (p. 39)• 从 Gazebo 9 切换到 Gazebo 7 (p. 40)

从 Gazebo 7 切换到 Gazebo 9

从 Gazebo 7 环境切换到 Gazebo 9 环境

1. 打开命令提示符。2. 运行以下代码以在当前目录中创建名为 gazebo7to9.sh 的 shell 脚本:

$ echo '#!/bin/bashset -e

echo "Switching to Gazebo9…"

sudo touch /etc/apt/sources.list.d/gazebo-stable.listsudo chmod 666 /etc/apt/sources.list.d/gazebo-stable.listsudo echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.listsudo wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -sudo apt-get update

sudo touch /etc/ros/rosdep/sources.list.d/00-gazebo9.listsudo chmod 666 /etc/ros/rosdep/sources.list.d/00-gazebo9.listsudo echo "yaml https://github.com/osrf/osrf-rosdep/raw/master/gazebo9/gazebo.yamlyaml https://github.com/osrf/osrf-rosdep/raw/master/gazebo9/releases/indigo.yaml indigoyaml https://github.com/osrf/osrf-rosdep/raw/master/gazebo9/releases/jade.yaml jade

39

Page 48: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南使用开发环境

yaml https://github.com/osrf/osrf-rosdep/raw/master/gazebo9/releases/kinetic.yaml kinetic yaml https://github.com/osrf/osrf-rosdep/raw/master/gazebo9/releases/lunar.yaml lunar" >> /etc/ros/rosdep/sources.list.d/00-gazebo9.list

sudo apt-get remove ros-kinetic-gazebo*sudo apt-get remove libgazebo*sudo apt-get remove gazebo*

echo "Done switching…"' > gazebo7to9.sh && chmod +x gazebo7to9.sh

您只需要在环境中创建一次此脚本。3. 在命令行上,运行所创建的脚本:

$ gazebo7to9.sh

环境将配置为使用 Gazebo 9 构建和捆绑应用程序。

从 Gazebo 9 切换到 Gazebo 7

从 Gazebo 9 环境切换到 Gazebo 7 环境

1. 打开命令提示符。2. 运行以下代码以在当前目录中创建名为 gazebo9to7.sh 的 shell 脚本:

$ echo ' !/bin/bash set -e echo "Switching to Gazebo7…" sudo apt-get remove ros-kinetic-gazebo* sudo apt-get remove libgazebo* sudo apt-get remove gazebo* sudo rm /etc/ros/rosdep/sources.list.d/00-gazebo9.list echo "Done switching…"' > gazebo9to7.sh && chmod +x gazebo9to7.sh

3. 在命令行上,运行所创建的脚本:

$ gazebo9to7.sh

环境将配置为使用 Gazebo 7 构建和捆绑应用程序。

环境设置该环境设置配置应用到 AWS RoboMaker 开发环境中所有项目的元素。

主题• 模拟软件套件 (p. 40)

模拟软件套件

开发环境可配置为使用不同版本的 Gazebo 进行构建和捆绑。每次只能有一个版本处于活动状态。

Note

为模拟应用程序选择的模拟软件套件必须与环境设置匹配。

40

Page 49: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南使用开发环境

创建工作流此部分介绍如何为现有应用程序创建 AWS RoboMaker 工作流。

工作流是按顺序运行的多个任务的集合。这些任务包括构建应用程序、捆绑应用程序和创建模拟作业。工作流和任务在 AWS RoboMaker AWS Cloud9 开发环境中创建。可以从 AWS RoboMaker Run (运行) 菜单选择和运行工作流。

对于在迭代开发期间执行重复性任务,工作流非常有用。在此部分中,您将创建执行以下任务的工作流:

• 使用 colcon 构建机器人应用程序和模拟应用程序。• 使用 colcon 捆绑机器人应用程序和模拟应用程序。• 创建模拟作业。

主题• 先决条件 (p. 41)• 创建源和输出 Amazon S3 存储桶 (p. 41)• 创建模拟作业角色 (p. 41)• 创建应用程序构建配置 (p. 41)• 创建应用程序捆绑配置 (p. 42)• 创建模拟配置 (p. 42)• 创建工作流配置 (p. 42)

先决条件

要从命令行创建 AWS RoboMaker 模拟作业,您需要以下组件:

• AWS RoboMaker 开发环境。有关创建开发环境的更多信息,请参阅创建开发环境 (p. 38)。• 机器人应用程序和模拟应用程序。要从头开始创建简单自动化应用程序和模拟应用程序,请参阅创建新自

动化应用程序 (p. 23)。

(可选)您可以使用 AWS RoboMaker 控制台,轻松访问 Gazebo、rqt、rviz 和终端等模拟工具。这些工具在 Simulation Job Detail (模拟作业详细信息) 页面上可用。

创建源和输出 Amazon S3 存储桶

在创建模拟作业之前,您需要创建存储桶,以用作应用程序的源位置。要创建存储桶,请按照创建源和输出Amazon S3 存储桶 (p. 32)中的步骤操作。

创建模拟作业角色

模拟作业需要具有 Amazon S3 存储桶和 Amazon CloudWatch Logs 等资源的访问权限的 IAM 角色。要创建模拟作业角色,请按照创建模拟作业角色 (p. 33)中的步骤操作。

创建应用程序构建配置

AWS RoboMaker 使用 colcon 构建机器人应用程序和模拟应用程序。

创建机器人应用程序和模拟应用程序构建配置

1. 打开包含您自动化应用程序的 AWS RoboMaker 开发环境。

41

Page 50: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南使用开发环境

2. 在 AWS Cloud9 菜单中,选择 RoboMaker Run,然后选择 Build (构建) 和 Add or Edit Configurations(添加或编辑配置)。

3. 在 RoboMaker Configuration (RoboMaker 配置) 对话框中的 Create New Configuration (创建新配置)下,选择 Colcon build (Colcon 构建)。

4. 在 RoboMaker Configuration (RoboMaker 配置) 对话框的 Colcon Build Configuration (Colcon 构建配置) 下,提供机器人应用程序构建配置的名称。例如:MyRobot v3 build, bundle, and createsimulation。

5. 键入机器人应用程序工作目录的路径。您也可以选择 ...,使用文件选取器选择工作目录。工作目录将包含 CMakeLists.txt。

6. 重复这些步骤以创建模拟应用程序构建配置。将 Working directory (工作目录) 设置为模拟应用程序工作区。

7. 要开始构建,请选择 RoboMaker Run,然后选择 Build (构建) 并选择构建配置。此时将在 IDE 底部打开新终端窗口。使用它来跟踪构建进度。

创建应用程序捆绑配置

AWS RoboMaker 使用 colcon 捆绑机器人应用程序和模拟应用程序。

创建机器人应用程序和模拟应用程序构建配置

1. 打开包含您自动化应用程序的 AWS RoboMaker 开发环境。2. 在 AWS Cloud9 菜单中,选择 RoboMaker Run,然后选择 Bundle (捆绑) 和 Add or Edit Configurations

(添加或编辑配置)。3. 在 Create New Configuration (创建新配置) 下,选择 Colcon bundle (Colcon 捆绑)。4. 在 RoboMaker Configuration (RoboMaker 配置) 对话框的 Colcon Bundle Configuration (Colcon 捆绑配

置) 下,提供机器人应用程序捆绑配置的名称。5. 键入机器人应用程序工作目录的路径。您也可以选择 ...,使用文件选取器选择工作目录。工作目录将包

含 CMakeLists.txt。例如:./MySample/robot_ws。6. 重复这些步骤以创建模拟应用程序捆绑配置。将 Working directory (工作目录) 设置为模拟应用程序工作

区。7. 要开始捆绑过程,请选择 RoboMaker Run,然后选择 Bundle (捆绑) 并选择捆绑配置。此时将在 IDE 底

部打开新终端窗口。使用它来跟踪捆绑进度。您必须先构建应用程序,然后才能进行捆绑。

创建模拟配置

创建模拟配置

1. 打开包含您自动化应用程序的 AWS RoboMaker 开发环境。2. 在 AWS Cloud9 菜单中,选择 RoboMaker Run,然后选择 Launch Simulation(启动模拟) 和 Add or Edit

Configurations (添加或编辑配置)。3. 在 Create New Configuration (创建新配置) 下,选择 Simulation (模拟)。4. 在 RoboMaker Configuration (RoboMaker 配置) 对话框的 Simulation Configuration (模拟配置) 下,提

供机器人应用程序捆绑配置的名称。5. 提供 Simulation job duration (模拟作业持续时间),以秒为单位。例如,对于要运行一个小时的模拟作

业,键入 3600。6. 在 Failure behavior (失败行为) 中,选择 fail (失败)。7. 选择您为模拟作业创建的 IAM role (IAM 角色)。8. 为模拟作业输出选择可选的 Amazon S3 存储桶。

42

Page 51: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南使用开发环境

9. 在 Robot application (机器人应用程序) 下,提供机器人应用程序名称。10. 指定 Robot app bundle path (机器人应用程序捆绑路径)。这是捆绑进程为机器人应用程序创建的文件的

路径。例如:./MySample/robot_ws/output.tar。(可选)选择 .. 以查找文件。11. 对于 Architecture (架构),选择 X86_6412. 选择用作机器人应用程序源的 Amazon S3 存储桶。捆绑将使用捆绑文件的路径作为前缀,上传

到此位置。例如,如果您的应用程序包为 ./MySample/robot_ws/output.tar,则文件名为output.tar,前缀为 ./MySample/robot_ws/。

13. 指定 Launch package name (启动程序包名称) 和 Launch file (启动文件)。如果您使用来自创建新自动化应用程序 (p. 23)的项目,则启动程序包名称为 robot_app,启动文件为 rotate.launch。

14. 在 Simulation application (模拟应用程序) 下,键入模拟应用程序名称。15. 指定 Sim app bundle path (模拟应用程序捆绑路径)。这是捆绑进程为模拟应用程序创建的文件的路径。

例如:./MySample/simulation_ws/output.tar。(可选)选择 .. 以查找文件。16. 选择用作模拟应用程序源的 Amazon S3 存储桶。捆绑将使用捆绑文件的路径作为前缀,上传到此位

置。17. 指定 Launch package name (启动程序包名称) 和 Launch file (启动文件)。如果您使用来自创

建新自动化应用程序 (p. 23)的项目,则启动程序包名称为 simulation_app,启动文件为example.launch。

18. 选择 Save (保存) 以保存配置。19. 要启动模拟作业,请选择 RoboMaker Run,然后选择 Launch Simulation (启动模拟) 并选择模拟配置。

创建工作流配置

创建工作流配置

1. 打开包含您自动化应用程序的 AWS RoboMaker 开发环境。2. 在 AWS Cloud9 菜单中,选择 RoboMaker Run,然后选择 Workflow (工作流) 和 Add or Edit

Configurations (添加或编辑配置)。3. 在 Create New Configuration (创建新配置) 下,选择 Workflow (工作流)。4. 在 RoboMaker Configuration (RoboMaker 配置) 对话框的 Colcon Bundle Configuration (Colcon 捆绑配

置) 下,提供工作流配置的名称。5. 对于 Action 1 (操作 1),选择机器人应用程序的 colcon 构建步骤。6. 选择添加操作,然后为您的模拟应用程序选择 colcon 构建步骤作为操作。7. 选择添加操作,然后为您的机器人应用程序选择 colcon 捆绑步骤作为操作。8. 选择添加操作,然后为您的模拟应用程序选择 colcon 捆绑步骤作为操作。9. 选择添加操作,然后为您的应用程序选择模拟步骤作为操作。10. 选择保存。11. 要运行工作流,请选择 RoboMaker Run,然后选择 Workflow (工作流) 并选择工作流配置。使用终端窗

口来跟踪工作流程的进度。

使用 Gazebo 和其他模拟工具连接到正在运行的模拟作业,并研究传感器数据和其他信息。您可在Applications (应用程序) 下的 RoboMaker Simulation (RoboMaker 模拟) 中找到这些工具。

菜单命令参考以下列表介绍了 AWS Cloud9 开发环境中 AWS RoboMaker 的默认菜单栏命令。如果未显示菜单栏,请选择开发环境上边缘的细条以显示菜单栏。

主题

43

Page 52: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南使用开发环境

• AWS RoboMaker 运行 (p. 44)• AWS RoboMaker 模拟 (p. 44)• AWS RoboMaker 资源 (p. 45)

AWS RoboMaker 运行

命令 描述

Build (生成) 生成选定的应用程序或添加/编辑生成配置。

Bundle (捆绑) 捆绑所选的应用程序或添加/编辑捆绑配置。

Launch simulation (启动模拟)

启动所选模拟。

Workflow (工作流程) 运行所选工作流程或添加/编辑工作流程配置。

Add or EditConfigurations (添加或编辑配置)

添加或编辑生成、捆绑、模拟和工作流程配置。

AWS RoboMaker 模拟

命令 描述

Connect (连接) 连接到正在运行的模拟作业。

Stop (停止) 停止所连接的正在运行的模拟作业。

Restart (重新启动) 重新启动已连接的模拟作业。仅在当前工作流程包含模拟步骤时可用。

Restart With NewBundles (使用新的捆绑重新启动)

使用新捆绑重新启动模拟。

Restart With Workflow(使用工作流程重新启动)

使用选定的工作流程重新启动模拟。

Applications, Gazebo(应用程序,Gazebo)

启动 Gazebo,这是一款用于在复杂环境中模拟机器人的工具。

Applications, rviz (应用程序,rviz)

启动 rviz (ROSVisualizer),这是一种用于以 3D 形式可视化ROS 中的传感器数据和状态信息的工具。

44

Page 53: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南删除环境

命令 描述

Applications, rqt (应用程序,rqt)

启动 rqt,这是用于 ROSGUI 开发的基于 Qt 的框架和插件。

Applications, Terminal(应用程序,终端)

启动连接到模拟主机的终端。

View Simulation JobDetails (查看模拟作业详细信息)

在 RoboMaker 控制台中打开具有模拟作业详细信息的新页面。

Switch simulation (切换模拟)

连接到其他正在运行的模拟。

Disconnect 从模拟断开连接。

AWS RoboMaker 资源

命令 描述

Download Samples (下载示例)

下载所选示例应用程序。

View Extensions (查看扩展)

下载所选云扩展。

删除环境为了防止在您的 AWS 账户中持续产生与不再使用的 AWS Cloud9 开发环境相关的任何费用,应删除该环境。

删除环境

按照以下步骤操作:

1. 登录 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航窗格中选择 Development (开发),然后选择 Development environments (开发环境)。3. 选择要删除的环境,然后选择 Edit (编辑)。4. 在 AWS Cloud9 的 Environment details (环境详细信息) 页面中,选择 Delete (删除)。键入 Delete,然

后选择 Delete (删除) 以永久删除该环境。

45

Page 54: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南创建机器人应用程序

使用机器人应用程序AWS RoboMaker 机器人应用程序包含一个或多个具有机器人应用程序捆绑的 Amazon S3 位置。AmazonS3 资源包括机器人应用程序所使用的 ROS 分配。

您的机器人应用程序可以与模拟应用程序配对。这称为模拟作业。您也可以将应用程序部署到物理机器人。

主题• 创建机器人应用程序 (p. 46)• 创建机器人应用程序版本 (p. 47)• 查看机器人应用程序 (p. 47)• 更新机器人应用程序 (p. 48)• 删除机器人应用程序 (p. 48)• 删除机器人应用程序版本 (p. 49)

创建机器人应用程序创建机器人应用程序以在模拟作业中使用。准备好部署到机器人硬件时,您可以将其添加到队列,然后部署到队列。

创建机器人应用程序

请按照以下选项卡之一中的步骤进行操作。

Note

Amazon S3 对象必须与 AWS RoboMaker 位于相同的区域中。

Using the console

1. 登录 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧窗格中选择 Development (开发),然后选择 Robot applications (机器人应用程序)。3. 选择 Create robot application (创建机器人应用程序)。4. 在 Create robot application (创建机器人应用程序) 页面上,为机器人应用程序键入 Name (名称)。选

择可帮助您识别机器人的名称。5. 选择机器人应用程序所使用的 ROS 分配。有关机器人操作系统 (ROS) 的更多信息,请参阅

www.ros.org。6. 提供指向捆绑机器人应用程序文件的 Amazon S3 路径。如果此机器人应用程序仅由模拟使用,请指

定为 X86_64 架构生成的捆绑。如果您在队列部署中使用此机器人应用程序,请指定代表了队列中机器人架构的一个或多个捆绑。

(可选)选择 Create new S3 folder (创建新 S3 文件夹) 以转到 Amazon Simple Storage ServiceAWS 管理控制台来创建和管理存储桶。

7. (可选)对于 Tags (标签),为模拟应用程序指定一个或多个标签。标签是一些充当元数据的词和短语,用于标识和组织 AWS 资源。每个标签都包含一个键和一个值。您可在 Simulation applicationdetails (模拟应用程序详细信息) 页面上管理模拟应用程序的标签。

有关标记的更多信息,请参阅标记您的 AWS RoboMaker 资源 (p. 162)。8. 选择 Create。

46

Page 55: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南创建机器人应用程序版本

Using the AWS CLI

Example

下面是一个示例 AWS CLI 命令,它执行的操作与在另一个选项卡中基于控制台的创建机器人应用程序等效。

$ aws robomaker create-robot-application --application my-robot-application --robot-software-suite name=ROS,version=Melodic --sources architecture=X86_64,s3Bucket=my-bucket,s3Key=my-folder/cloud-watch-robot.tar

创建机器人应用程序版本创建机器人应用程序版本时,您将创建 $LATEST 版本的快照。AWS RoboMaker 会记住版本文件的Amazon S3 路径和 ETag。如果您在该版本的 Amazon S3 路径中更改文件,AWS RoboMaker 将无法使用该版本。AWS RoboMaker 不会保留版本副本。

在创建模拟作业时,您可以使用机器人应用程序的任何版本。对于部署,您必须使用带编号的版本。有关应用程序版本控制的更多信息,请参阅应用程序版本控制 (p. 22)。

创建机器人应用程序版本

请按照这些选项卡之一中的步骤进行操作:

Using the console

1. 登录 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航窗格中选择 Development (开发),然后选择 Robot applications (机器人应用程序)。3. 选择机器人应用程序 name (名称)。4. 在 Robot applications details (机器人应用程序详细信息) 页面中,选择 Create new version (创建新版

本),然后选择 Create (创建)。

Using the AWS CLI

Example

下面是一个示例 AWS CLI 命令,它执行与基于控制台的步骤等效的操作。

$ aws robomaker create-robot-application-version --name my-robot-application-arn

查看机器人应用程序查看机器人应用程序的详细信息,包括 Amazon S3 位置、版本和支持的架构。

查看机器人应用程序的详细信息

请按照这些选项卡之一中的步骤进行操作:

Using the console

47

Page 56: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南更新机器人应用程序

1. 登录 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航窗格中选择 Development (开发),然后选择 Robot applications (机器人应用程序)。3. 选择机器人应用程序的 Name (名称)。

Using the AWS CLI

Example

下面是一个示例 AWS CLI 命令,它执行与基于控制台的步骤等效的操作。

$ aws robomaker describe-robot-application --application my-robot-application-arn

更新机器人应用程序更新机器人应用程序。

更新机器人应用程序

请按照这些选项卡之一中的步骤进行操作:

Using the console

1. 登录 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航窗格中选择 Development (开发),然后选择 Robot applications (机器人应用程序)。3. 选中要更新的机器人应用程序旁边的复选框。4. 选择 Actions (操作),然后选择 Update (更新)。5. 您可以添加或删除源,但必须至少有一个源机器人应用程序文件。6. 选择 Update (更新) 以更新机器人应用程序。

Using the AWS CLI

Example

下面是一个示例 AWS CLI 命令,它执行与基于控制台的步骤等效的操作。

$ aws robomaker update-robot-application ---application my-robot-application-arn --robot-software-suite name=ROS,version=Melodic --sources architecture=X86_64,s3Bucket=my-bucket,s3Key=my-folder/cloud-watch-robot.tar

删除机器人应用程序当您不再需要某个 AWS RoboMaker 机器人应用程序及其所有版本时,请删除它。

删除机器人应用程序

请按照这些选项卡之一中的步骤进行操作:

48

Page 57: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南删除机器人应用程序版本

Using the console

1. 登录位于 https://console.aws.amazon.com/robomaker/ 的 AWS RoboMaker 控制台。2. 在左侧导航窗格中选择 Development (开发),然后选择 Robot applications (机器人应用程序)。3. 选择机器人应用程序的 Name (名称) 以查看详细信息,包括其创建时间和上次更新时间。4. 在机器人应用程序详细信息页面上,选择 Delete (删除),然后再选择 Delete (删除) 以确认。

Using the AWS CLI

Example

下面是一个示例 AWS CLI 命令,它执行与基于控制台的步骤等效的操作。

$ aws robomaker delete-robot-application --application my-robot-application-arn

删除机器人应用程序版本删除您不再需要的机器人应用程序版本。

删除机器人应用程序版本

请按照这些选项卡之一中的步骤进行操作:

Using the console

1. 登录位于 https://console.aws.amazon.com/robomaker/ 的 AWS RoboMaker 控制台。2. 在左侧导航窗格中选择 Development (开发),然后选择 Robot applications (机器人应用程序)。3. 选择机器人应用程序的 Name (名称) 以查看其版本。4. 在机器人详细信息页面上,选择 Version (版本) 以查看版本详细信息。5. 在机器人应用程序版本详细信息页面上,选择 Delete (删除),然后选择 Delete (删除) 以确认。

Using the AWS CLI

Example

下面是一个示例 AWS CLI 命令,它执行与基于控制台的步骤等效的操作。

$ aws robomaker delete-robot-application--version --application my-robot-application-arn --version 1.5

49

Page 58: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南创建模拟应用程序

使用模拟应用程序AWS RoboMaker 模拟应用程序包含有关其依赖项的信息。它包括 X86_64 架构的模拟应用程序包的Amazon Simple Storage Service (Amazon S3) 位置。它还包括机器人操作系统 (ROS) 发行版的名称和版本以及使用的渲染引擎。

在模拟作业中使用 AWS RoboMaker 机器人应用程序加入模拟,以便与您的机器人进行交互。与诸如Gazebo 的工具进行交互并开发模拟和测试数据。

主题• 创建模拟应用程序 (p. 50)• 创建模拟应用程序版本 (p. 51)• 查看模拟应用程序 (p. 51)• 更新模拟应用程序 (p. 52)• 删除模拟应用程序 (p. 53)• 删除模拟应用程序版本 (p. 53)

创建模拟应用程序创建模拟应用程序以在模拟作业中使用。

创建模拟应用程序

请按照以下选项卡之一中的步骤进行操作。

Note

Amazon S3 对象必须与 AWS RoboMaker 位于相同的区域中。

Using the console

1. 登录 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航窗格中选择 Development (开发),然后选择 simulation applications (模拟应用程序)。3. 键入应用程序的 name (名称)。选择可帮助您识别模拟的名称。例如:Outdoor v2。4. 选择机器人应用程序所使用的 ROS 分配。有关 ROS 的更多信息,请参阅 www.ros.org。5. 选择由您的模拟应用程序使用的 Simulation software suite (模拟软件套件)。有关 ROS 的更多信

息,请参阅 www.ros.org。6. 选择由您的模拟应用程序使用的 Simulation rendering engine (模拟渲染引擎)。7. 提供您为 X86_64 架构生成的捆绑模拟应用程序文件的 Amazon S3 路径。

(可选)选择 Create new S3 folder (创建新的 S3 文件夹) 以转到 Amazon Simple Storage Service控制台。在此,您可以创建和管理存储桶。

8. (可选)在 Tags (标签) 下,为模拟应用程序指定一个或多个标签。标签是一些充当元数据的词和短语,用于标识 AWS 资源。每个标签都包含一个键和一个值。您可在 Simulation applicationdetails (模拟应用程序详细信息) 页面上管理模拟的标签。

有关标记的更多信息,请参阅标记您的 AWS RoboMaker 资源 (p. 162)。9. 选择 Create。

50

Page 59: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南创建模拟应用程序版本

Using the AWS CLI

Example

下面是一个示例 AWS CLI 命令,它执行的操作与在另一个选项卡中基于控制台的创建模拟应用程序等效。

$ aws robomaker create-simulation-application \--name HelloWorldSimulationApplication \--rendering-engine name=OGRE,version=1.x \--simulation-software-suite name=Gazebo,version=7 \--robot-software-suite name=ROS,version=Melodic \--sources architecture=X86_64,s3Bucket=my-bucket-name,s3Key=my-key-name/hello-world-simulation.tar

创建模拟应用程序版本创建模拟应用程序版本时,您将创建 $LATEST 版本的快照。AWS RoboMaker 会记住版本文件的 AmazonS3 路径和 ETag。如果您在该版本的 Amazon S3 路径中更改文件,AWS RoboMaker 将无法使用该版本。AWS RoboMaker 不会保留版本副本。

在创建模拟作业时,您可以使用机器人模拟应用程序的任何版本。有关应用程序版本控制的更多信息,请参阅应用程序版本控制 (p. 22)。

创建模拟应用程序版本

请按照以下选项卡之一中的步骤进行操作。

Using the console

1. 登录 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航窗格中选择 Development (开发),然后选择 Simulation applications (模拟应用程序)。3. 选择模拟应用程序的 name (名称)。4. 在 Simulation applications details (模拟应用程序详细信息) 页面中,选择 Create new version (创建新

版本),然后选择 Create (创建)。

Using the AWS CLI

Example

下面是一个示例 AWS CLI 命令,它执行的操作与在另一个选项卡中基于控制台的创建机器人应用程序等效。

$ aws robomaker create-simulation-application-version --name my-simulation-application-arn

查看模拟应用程序查看模拟应用程序的详细信息。

51

Page 60: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南更新模拟应用程序

查看模拟应用程序的详细信息

请按照以下选项卡之一中的步骤进行操作。

Using the console

1. 登录 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航窗格中选择 Development (开发),然后选择 Simulation applications (模拟应用程序)。3. 选择模拟应用程序的 Name (名称) 以查看详细信息,包括其创建时间和上次更新时间。

Using the AWS CLI

使用以下命令描述模拟应用程序:

• API/开发工具包:DescribeSimulationApplication

• AWS CLI:describe-simulation-application

Example

下面是一个示例 AWS CLI 命令,它执行的操作与在另一个选项卡中基于控制台的描述模拟应用程序等效。

$ aws robomaker describe-simulation-application \--job my-simulation-job-arn

更新模拟应用程序更新模拟应用程序。

更新模拟应用程序

请按照以下选项卡之一中的步骤进行操作。

Using the console

1. 登录 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航窗格中选择 Development (开发),然后选择 Simulation applications (模拟应用程序)。3. 选中要更新的模拟应用程序旁边的复选框。4. 选择 Actions (操作),然后选择 Update (更新)。5. 您可以添加或删除源,但必须至少有一个源模拟应用程序文件。6. 选择 Update (更新) 以更新模拟应用程序。

Using the AWS CLI

您可以使用以下命令来更新模拟应用程序:

• API/开发工具包:UpdateSimulationApplication

• AWS CLI:update-simulation-application

52

Page 61: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南删除模拟应用程序

Example

下面是一个示例 AWS CLI 命令,它执行的操作与在另一个选项卡中基于控制台的更新模拟应用程序等效。

$ aws robomaker update-simulation-application \--application my-robot-application-arn \--rendering-engine name=OGRE,version=1.x \--simulation-software-suite name=Gazebo,version=7 \--sources architecture=X86_64,s3Bucket=my-bucket-name,s3Key=my-key-name/hello-world-simulation.tar

删除模拟应用程序当您不再需要某个 AWS RoboMaker 模拟应用程序及其所有版本时,删除它。

删除模拟应用程序

请按照以下选项卡之一中的步骤进行操作。

Using the console

1. 登录 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航窗格中选择 Development (开发),然后选择 Simulation applications (模拟应用程序)。3. 选择模拟应用程序的 Name (名称) 。这将显示详细信息,例如创建和上次更新的时间。4. 在模拟应用程序详细信息页面上,选择 Delete (删除),然后再选择 Delete (删除) 以确认删除。

Using the AWS CLI

您可以使用以下命令来删除模拟应用程序:

• API/开发工具包:DeleteSimulationApplication

• AWS CLI:delete-simulation-application

Example

下面是一个示例 AWS CLI 命令,它执行的操作与在另一个选项卡中基于控制台的删除模拟应用程序等效。

$ aws robomaker delete-simulation-application --application my-robot-application-arn

删除模拟应用程序版本您可以删除不再需要的模拟应用程序版本。

删除模拟应用程序版本

请按照以下选项卡之一中的步骤进行操作。

Using the console

53

Page 62: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南删除模拟应用程序版本

1. 登录 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航窗格中选择 Development (开发),然后选择 Simulation applications (模拟应用程序)。3. 选择模拟应用程序的 Name (名称) 以查看其版本。4. 在模拟详细信息页面上,选择 Version (版本) 以查看详细信息。5. 在详细信息页面上,选择 Delete (删除),然后选择 Delete (删除) 以确认。

Using the AWS CLI

您可以使用以下命令来删除模拟应用程序版本。

• API/开发工具包:DeleteSimulationApplicationVersion

• AWS CLI:delete-simulation-application-version

Example

下面是一个示例 AWS CLI 命令,它执行的操作与在另一个选项卡中基于控制台的删除模拟应用程序等效。

$ aws robomaker delete-simulation-application-version \--application my-robot-application-arn --version 1.5

54

Page 63: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南Simulation WorldForge 概念

使用 Simulation WorldForge 创建世界Simulation WorldForge 可让您更轻松快捷地创建模拟世界。世界是从您定义的模拟世界模板生成的。模拟世界模板指定世界布局、房间维度、墙壁和地板及其他房间功能可以具有材质属性。房间可以自动按房间类型呈现,您也可以选择潜在的 生成的世界可在模拟作业中使用,并导出以在开发人员计算机上使用。

Simulation WorldForge 可帮助您管理需要大量具有域随机化功能的模拟世界的模拟工作负载。常见Simulation WorldForge 场景包括:

• 回归测试 — 在数百个世界中测试您的机器人应用程序以验证行为是否正确。• Synthetic Imagery data generation (Synthetic Imagery 数据生成) — 您可以从生成的世界中捕获图像以

用于其他机器人应用程序。例如,您可以捕获具有不同的家具布局和材质组合的房间图像。• 强化学习 创建一个具有内部结构的唯一世界,让机器人应用程序探索。—您可以控制世界的构成。• 开发算法 机器人导航工程师可以验证导航算法在具有不同放置的已知布局中是否成功。—机器人本地化工

程师可以确保布局算法检测不同地形计划中的不同结构元素。

您不需要知道世界代算法或如何创建和管理基础设施。Simulation WorldForge 和 AWS RoboMaker 是完全托管的服务。

Simulation WorldForge 概念Simulation WorldForge 使用参数集合 模拟世界模板)以确定如何生成新世界。一个模拟世界模板可用于生成数百个世界。每个 世界 包含一栋建筑。建筑物设有单层。地板有 楼层平面图 描述客房大小和形状。它还提示客房如何连接。楼层还有 内部模板 指定地板平面图中的墙壁和地板如何结构元素。内部模板还有参数描述如何填充每个房间,如各种桌子和沙发,如衣服和厨房用具。

您可以从样本模板创建模拟世界模板,克隆现有模板,或使用控制台从头开始 https://console.aws.amazon.com/robomaker/. 例如,如果您想生成包含单卧室的世界,您可以从单卧室公寓样品模板开始。它是一间卧室、一间浴室、带厨房和起居室的开放式平面图。它使用适合每种房型的典型材料和家具和配件。保存后,您可以启动 世界发电机工作 创造世界 您可以在世界一流的工作中生成多达50个世界。

您还可以使用SDK或 AWS Command Line Interface. 例如,要从 AWS CLI,首先创建 世界模板JSON文档模板主体。它指定建筑物、楼层平面图、内饰和其他详细信息的参数。保存后,您可以通过调用来创建模拟世界模板 create-world-template 并指定JSON文件:

aws robomaker create-world-template --name "my-template" --templateBody file://my_template_body.json

在配置并保存模拟世界模板之后,您可以创建世界一代的工作并生成世界。可以从单个模拟世界模板生成数百个世界。您可以在一个世界一代的工作中生成多达100个世界。世界可以在模拟中使用 AWS RoboMaker.您还可以导出世界以在自己的ROS环境中修改和使用。

了解模拟世界模板本节介绍模拟世界模板的组成部分。组件包括内部材料和家具的楼层平面图和首选项。 SimulationWorldForge 为许多组件提供默认设置,包括材料、家具选择和房间连接。您可以使用自己的偏好覆盖默认值。 Simulation WorldForge 在生成世界时,最好尽力遵循您的偏好。

55

Page 64: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南平面图

平面图楼层平面图规定了一个单层住宅建筑的室内平面图。它包括世界尺寸、客房数量和类型,以及影响客房连接的参数。

每个世界都保证在坐标中居中1米圆柱体 (0,0,0),默认Robot起始位置。 Simulation WorldForge 确定客房。

世界尺寸您可以为建筑配置纵横比和天花板高度。有效方向为1:4到4:1。有效的天花板高度为2.4至4.0米。所有测量值均为米和平方米。控制台支持美国和度量系统之间的转换。

Rooms您可以指定客房数、客房类型、客房名称、所需区域、所需宽纵比和内部特征。支持以下客房类型:

• 卧室• 浴室• Living• 餐饮• 厨房• 走廊• 衣橱

家具、墙材材料和地板材料选自适合房型的类型。例如,浴室可能会被分配一个瓷砖墙、一个内油地板、一个浴缸和一个淋浴间。

ConnectionsSimulation WorldForge 默认情况下,自动连接所有客房。您可以通过开口或门道连接客房。当客房通过开放式客房连接时,客房将采用开放式平面图。没有墙壁。通过门道连接的客房有一个狭窄的门口。门口开口被随机放置在邻近的墙壁上。

您可以覆盖与所需连接的默认连接。例如,如果您有厨房、餐厅和卧室,您可以申请厨房与卧室之间的门连接。 Simulation WorldForge 将尽最大努力进行连接,但不保证。

Interiors您可以选择多种不同的内部材料和家具类型。 Simulation WorldForge 按房型随机分配地板、墙壁和家具。例如,厨房可能会分配一个烤箱和餐桌椅。

您可以为地板和墙面选择材料类型,作为自定义集。创建自定义集合时,可以通过以下方式应用自定义分配客房类型 或 客房名称. 您可以有多个自定义集。如果存在冲突,客房的自定义分配始终优先于客房类型。

例如,假设为所有卧室分配了自定义的“现代地板”,并且分配给客房的“主卧室”的定制设置“时尚地板”。当WhenWhen Simulation WorldForge 分配地板材料,“主卧室”将从“时尚地板”套件中分配地板材料。其他卧室的地板材料选自“现代地板”套装。

此规则还适用于定制家具套装。

地板材料类型支持的地板类型包括:

56

Page 65: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南Interiors

• 地毯• 混凝土• 地板板• 内漏• 系列• 瓷砖

地板材料是从选择的所有地板材料类型随机选择的。例如,如果您指定 Carpet, Concrete, linoleum和 parquetry客房楼层可能是混凝土。

壁材料类型支持的壁材料类型包括:

• 砖块• 混凝土• 石头• 瓷砖• 木板板• 墙涂漆• 壁纸

墙材材料是从所选的所有墙壁材料类型随机选择的。例如,如果您指定 Brick, Tiles 和 Wallpaper,您的房间可能有使用瓷砖和墙纸的墙壁。 Simulation WorldForge 可能不会从所有选定的墙壁材料类型分配墙壁材料。

家具类型Simulation WorldForge 支持以下家具类型:

• 浴室• 酒吧柜• 病床• 书包• 咖啡桌• 控制台表• 角展柜• 桌椅• 办公桌• 餐椅• 餐桌• 洗碗机• 德莱赛• 端和侧桌• 地板灯• 冰箱• 起居室座椅• 厨房群岛和购物车

57

Page 66: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南常见任务

• 媒体存储• 夜床架• 奥斯托米尔• 烤箱• 服务推车• 淋浴间• 侧板和自助餐• 沙发• 存储• 储存架• 厕所• 梳妆台• 洗衣机和烘干机

家具是从选择的所有家具类型随机选择的。例如,如果您指定 Sideboards and buffets, Sofas和 Console tables,您的客房可能有一个沙发和两个控制台桌,但没有侧板或自助餐。 SimulationWorldForge 可能不会分配所有选定家具类型的材料类型。

常见任务本节包含创建模拟世界模板的常见任务。许多任务指定所需的连接或所需的形状。Simulation WorldForge 会尽最大努力根据模拟世界模板参数生成世界。生成的世界可能并不总是包含所有所需的属性。

主题• 指定底部的房间列表 (p. 58)• 请求长通道 (p. 59)• 在房间之间请求出入口 (p. 60)• 请求宽地平面占用空间 (p. 60)• 请求自定义概括高度 (p. 61)• 在不同的房间中为地面指定相同的材质类型 (p. 61)• 在相同类型的房间之间指定不同的材质类型 (p. 62)• 在房间中指定更多或更少的毛发 (p. 63)• 将特定毛发类型添加到所有管道和单个共享的生命/决策室 (p. 64)• 指定没有毛发的房间 (p. 65)

指定底部的房间列表房间类型通过向相邻的房间贡献来影响地面规划。房间类型还用于确定其地面和墙壁的材质类型,以及默认情况下随机放置的家具类型。您可以按房间类型或房间名称覆盖默认地板和墙壁材质类型和家具类型。

您可以从以下房间类型中进行选择:Hownze、Howen、Livy Room、DisterRoom、Kitchen、Halway、Clust。

以下示例指定三个房间房屋。默认情况下,将确定房间的大小和形状。

Using the console

1. 在 Simulation world template edit (模拟世界模板编辑) 屏幕中的 Floor plan (布局计划) 下,选择 Rooms (房间)。

58

Page 67: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南请求长通道

2. 在 Rooms (房间) 窗格中,选择 Add room (添加房间)。3. 添加房间的详细信息。您可以指定房间 Name (名称)、Room type (房间类型)、Desired area

(所需区域) 和 Desired aspect ratio (所需宽高比)。4. 选择 Save (保存) 以保存新房间。重复此步骤,直到您获得了所需的房间。如果添加的太多,您

可以从 Rooms (房间) 窗格中将其删除。

Using the AWS CLI

Example

您可以在 templateBody 中使用以下 JSON 作为调用 create-world-template 的一部分。

"Rooms": [ { "Type": "Bedroom", "Name": "My Master Bedroom", }, { "Type": "Bathroom", "Name": "My Ensuite", }, { "Type": "Kitchen", "Name": "My Kitchen", }]

请求长通道您可以使用 DesiredShape 属性请求房间的首选形状。Type 不会影响形状。在以下示例中,Hallway 宽高比较低。当它与足够大的 Area 组合时,表示需要较长的窄道。Simulation WorldForge 将尝试生成类似于所需形状的房间。

Using the console

1. 在 Simulation world template edit (模拟世界模板编辑) 屏幕中的 Floor plan (布局计划) 下,选择 Rooms (房间)。

2. 在 Rooms (房间) 窗格中,选择 Add room (添加房间)。3. 指定房间 Name (名称),然后为 Room type (房间类型) 选择 Hallway (Hallway)。4. 指定 Desired area (所需区域) 为 20,Desired aspect ratio (所需宽高比) 为 4:1。5. 选择 Save (保存) 以保存此间隔。

Using the AWS CLI

Example

您可以在 templateBody 中使用以下 JSON 作为调用 create-world-template 的一部分。

"Rooms": [ { "Type": "Hallway", "Name": "My Hallway", "DesiredShape": { "Area": 20.0, "AspectRatio": {

59

Page 68: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南在房间之间请求出入口

"x": 4, "y": 1 } } }]

有效房间区域范围为 10 米到 300 米。有效的房间宽高比范围为 1:4 到 4:1。

在房间之间请求出入口如果您有两个房间,并且这些房间共享至少一堵墙,则可以在两个房间之间请求DesiredConnections。Simulation WorldForge 将尝试将房间放置在相邻的房间,并且根据ConnectionType,将 Doorway 放置在相邻的墙上的随机位置,或者通过完全删除相邻的墙创建Opening。

以下示例为客厅和厨房请求一个开放连接。它还会为房间和浴室请求单独的出入口连接:

Using the console

1. 在 Simulation world template edit (模拟世界模板编辑) 屏幕中的 Floor plan (布局计划) 下,选择 Connections (连接)。

2. 在 Connections 窗格中,选择 Add connection。3. 在 Desired connections 窗格中,为 Connection type 选择 Opening,然后为 Location 1 和

Location 2 选择空间。例如,“My Live Room”和“My Kitchen”。4. 选择 Save (保存) 以保存所需的连接。5. 重复操作以添加 Door (门) 作为两个其他位置之间的所需连接。例如,“My Houblem”和“My

Houblem”。

Using the AWS CLI

Example

您可以在 templateBody 中使用以下 JSON 作为调用 create-world-template 的一部分。

"DesiredConnections": [ { "Location": [ "My Living Room", "My Kitchen" ], "ConnectionType": "Opening" }, { "Location": [ "My Bedroom", "My Bathroom" ], "ConnectionType": "Doorway" }]

每个房间的有效连接数为 4,并且每对房间最多有一个打开的连接。

请求宽地平面占用空间如果您需要更长或更宽的地板布局,会影响所有房间,则可以为 DesiredAspectRatio 请求Footprint。Simulation WorldForge 使用此首选项影响房间的总体形状和位置,以便地板计划更好地符合请求的占用空间宽高比。所需宽高比是可选的,默认为正方形。

以下示例将覆盖默认平方比 (1.11) 与更宽的布局,后者中的所有可用房间更有可能被拉伸并放置来创建非平方占用空间:

60

Page 69: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南请求自定义概括高度

Using the console

1. 在 Simulation world template edit (模拟世界模板编辑) 屏幕中的 Floor plan (布局计划) 下,选择 World dimensions (世界维度)。

2. 在 World dimensions (世界维度) 窗格中的 Desired apect ratio (所需比率) 下,指定 Width(宽度) 为 1,Length (长度) 为 4。

3. 选择 Save (保存) 以保存新房间。

Using the AWS CLI

Example

您可以在 templateBody 中使用以下 JSON 作为调用 create-world-template 的一部分。

"Footprint": { "DesiredAspectRatio": { "x": 1, "y": 4 }}

的有效范围为 1:4 到 4:1。DesiredAspectRatio

请求自定义概括高度平面上限高度确定所有房间的墙壁的高度。默认上限为 2.4 米。在此示例中,我们将默认值覆盖为 3.2 米:

Using the console

1. 在 Simulation world template edit (模拟世界模板编辑) 屏幕中的 Floor plan (布局计划) 下,选择 World dimensions (世界维度)。

2. 在 World dimensions (世界维度) 窗格中,指定 Ceiling height (世界高度) 为 3.2。3. 选择 Save (保存) 以保存新房间。

Using the AWS CLI

Example

您可以在 templateBody 中使用以下 JSON 作为调用 create-world-template 的一部分。

"Ceiling": { "Height": 3.2}

在不同的房间中为地面指定相同的材质类型使用房间类型或房间名称,并为内部地板部分列出多个房间。在以下示例中,所有房间、客厅和酒店将分配随机地板材质。

Using the console

1. 在 Simulation world template edit (模拟世界模板编辑) 屏幕中的 Interiors (交互) 下,选择Flooring (流)。

61

Page 70: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南在相同类型的房间之间指定不同的材质类型

2. 在 Flooring 窗格中,选择 Add flooring。3. 在 Custom flooring (自定义地板) 窗格中,指定地板 Set name (设置名称)。例如,“Flooring

Material Set 1”。4. 在 Filter type (筛选条件类型) 下,选择 By room type (按房间类型)。5. 在 Room types (房间类型) 下,依次选择 Bedrooms (会议室)、Living rooms (会议室) 和

Dining rooms (来宾室)。6. 在 Custom flooring 下,选择 Add material,然后选择 Floorboard。7. 选择 Save 以保存地面集。

Using the AWS CLI

Example

您可以在 templateBody 中使用以下 JSON 作为调用 create-world-template 的一部分。

"Flooring": { "MaterialSets": [ { "Name": "Flooring Material Set 1", "TargetSet": { "RoomTypes": [ "Bedroom", "Living", "Dining" ] }, "SampleSet": { "MaterialTypes": [ "Floorboards" ] } } ]}

在相同类型的房间之间指定不同的材质类型在以下示例中,除“会议室 3”外,所有房间、客厅和酒店都会分配有随机地板材质。系统会为它分配一种随机的地毯材质。

Using the console

1. 在 Simulation world template edit (模拟世界模板编辑) 屏幕中的 Interiors (交互) 下,选择Flooring (流)。

2. 在 Flooring 窗格中,选择 Add flooring。3. 在 Custom flooring (自定义地板) 窗格中,指定地板 Set name (设置名称)。例如,“Flooring

Material Set 1”。4. 在 Filter type (筛选条件类型) 下,选择 By room type (按房间类型)。5. 在 Room types (房间类型) 下,依次选择 Bedrooms (会议室)、Living rooms (会议室) 和

Dining rooms (来宾室)。6. 在 Custom flooring 下,选择 Add material,然后选择 Floorboard。7. 选择 Save 以保存地面集。8. 在 Flooring 窗格中,选择 Add flooring。9. 在 Custom flooring (自定义地板) 窗格中,指定地板 Set name (设置名称)。例如,“Flooring

Material Set for Honder 3 (为传送接口 3 设置流材质集)”。10. 在 Filter type (筛选条件类型) 下,选择 By room name (按房间名称)。11. 在 Room name (房间名称) 下,选择房间名称。例如,“Bedroom 3”。

62

Page 71: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南在房间中指定更多或更少的毛发

12. 在 Custom flooring 下,选择 Add material,然后选择 Carpet。13. 选择 Save 以保存地面集。

Using the AWS CLI

Example

您可以在 templateBody 中使用以下 JSON 作为调用 create-world-template 的一部分。

"Flooring": { "MaterialSets": [ { "Name": "Flooring Material Set 1", "TargetSet": { "RoomTypes": [ "Bedroom", "Living", "Dining" ] }, "SampleSet": { "MaterialTypes": [ "Floorboards" ] } }, { "Name": "Flooring Material Set for Bedroom 3", "TargetSet": { "RoomNames": [ "Bedroom 3" ] }, "SampleSet": { "MaterialTypes": [ "Carpet" ] } } ]}

在房间中指定更多或更少的毛发您可以指定如何按房间名称或房间类型来密集地分隔家具。默认情况下,房间随机使用中等间距。在下面的示例中,所有房间都是使用密集间距随机制作的。客厅和会议室的发音非常少。默认情况下,将占用所有其他房间。

Using the console

1. 在 Simulation world template edit (模拟世界模板编辑) 屏幕中的 Interiors (交互) 下,选择Furniture (毛发)。

2. 在 Furniture (毛发) 窗格中,选择 Add custom funess (添加自定义家具)。3. 在 Custom fourge (自定义家具) 窗格中,指定自定义家具 Set name (设置名称)。例

如,“Dense Furniture Agreement”。4. 在 Filter type (筛选条件类型) 下,选择 By room type (按房间类型)。5. 在 Room types (房间类型) 下,选择 Bedrooms (会议室)。6. 切换 Override furge (覆盖家具) 以使用默认家具。7. 在 Furniture density (毛发密度) 下,选择 Dense (密度)。8. 选择 Save (保存) 以保存家具集。9. 在 Furniture (毛发) 窗格中,选择 Add custom funess (添加自定义家具)。10. 在 Custom fourge (自定义家具) 窗格中,指定自定义家具 Set name (设置名称)。例如,“稀疏

毛发排列”。11. 在 Filter type (筛选条件类型) 下,选择 By room name (按房间名称)。

63

Page 72: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南将特定毛发类型添加到所有管道和单个共享的生命/决策室

12. 在 Room names (房间名称) 下,选择要具有稀疏家具密度的房间。例如,“My Live Room (我的会议室)”和“My My My Mytry Room (我的会议室)”。

13. 切换 Override furge (覆盖家具) 以使用默认家具。14. 在 Furniture density (毛发密度) 下,选择 Sparse。15. 选择 Save (保存) 以保存家具集。

Using the AWS CLI

Example

您可以在 templateBody 中使用以下 JSON 作为调用 create-world-template 的一部分。

"Furniture": { "FurnitureArrangements": [ { "Name": "Dense Furniture Arrangement", "TargetSet": { "RoomTypes": [ "Bedroom" ] }, "DesiredSpatialDensity": "Dense" }, { "Name": "Sparse Furniture Arrangement", "TargetSet": { "RoomNames": [ "My Living Room", "My Dining Room" ] }, "DesiredSpatialDensity": "Sparse" } ]}

将特定毛发类型添加到所有管道和单个共享的生命/决策室您可以按房间名称或房间类型指定房间的家具类型。在下面的示例中,所有房间的随机床子、桌面、服装和地板灯均中等分配。房间“My life/diting room (我的客厅/客厅)”是用随机会议、午餐设备、地板灯、周末和咖啡板来提供密集感的。默认情况下,将占用所有其他房间。

Using the console

1. 在 Simulation world template edit (模拟世界模板编辑) 屏幕中的 Interiors (内部) 下,选择Furniture (毛发)。

2. 在 Furniture (毛发) 窗格中,选择 Add custom funess (添加自定义家具)。3. 在 Custom fourge (自定义家具) 窗格中,指定自定义家具 Set name (设置名称)。例

如,“Bedroom Furniture”。4. 在 Filter type (筛选条件类型) 下,选择 By room type (按房间类型)。5. 在 Room types (房间类型) 下,选择 Bedrooms (会议室)。6. 确保已选中 Override funess。如果未选中,Simulation WorldForge 将使用默认家具。7. 在 Furniture types 下,选择 Add fourge,然后选择 Beds、Desks、Dresers 和 Flooramps。8. 选择 Save 以保存家具集。9. 在 Furniture (毛发) 窗格中,选择 Add custom funess (添加自定义家具)。10. 在 Custom fourge (自定义家具) 窗格中,指定自定义家具 Set name (设置名称)。例

如,“Living and Furniture”。

64

Page 73: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南指定没有毛发的房间

11. 在 Filter type (筛选条件类型) 下,选择 By room name (按房间名称)。12. 在 Room names (房间名称) 下,选择房间。例如,“My life and buement room”。13. 确保已选中 Override funess。如果未选中,Simulation WorldForge 将使用默认家具。14. 在 Furniture types 下,依次选择 DiningTables、DiningChairs、FloorLamps、Sofas 和

。CoffeeTables15. 在 Furniture density (毛发密度) 下,选择 Dense (密度)。16. 选择 Save 以保存家具集。

Using the AWS CLI

Example

您可以在 templateBody 中使用以下 JSON 作为调用 create-world-template 的一部分。

"Furniture": { "FurnitureArrangements": [ { "Name": "Bedroom Furniture", "TargetSet": { "RoomTypes": [ "Bedroom" ] }, "SampleSet": { "ModelTypes": [ "Beds", "Desks", "Dressers", "FloorLamps" ] } } { "Name": "Living and Dining Furniture", "TargetSet": { "RoomNames": [ "My living and dining room" ] }, "SampleSet": { "ModelTypes": [ "DiningTables", "DiningChairs", "FloorLamps", "Sofas", "CoffeeTables" ], "DesiredSpatialDensity": "Dense" } } ]}

指定没有毛发的房间指定用于馈送安排的模型集的空列表。默认情况下,将占用所有其他房间:

Using the console

1. 在 Simulation world template edit (模拟世界模板编辑) 屏幕中的 Interiors (内部) 下,选择Furniture (毛发)。

2. 在 Furniture (毛发) 窗格中,选择 Add custom funess (添加自定义家具)。

65

Page 74: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南适用于模拟世界模板主体的JSON架构

3. 在 Custom fourge (自定义家具) 窗格中,指定自定义家具 Set name (设置名称)。例如,“Nofuness”。

4. 在 Filter type (筛选条件类型) 下,选择 By room name (按房间名称)。5. 在 Room names (房间名称) 下,选择您想要使用无家具的房间。例如,“My saved Room”。6. 确保已选中 Override funess。如果未选中,Simulation WorldForge 将使用默认家具。7. 在 Furniture types 下,确保未选择任何类型。8. 选择 Save (保存) 以保存家具集。

Using the AWS CLI

Example

您可以在 templateBody 中使用以下 JSON 作为调用 create-world-template 的一部分。

"Furniture": { "FurnitureArrangements": [ { "Name": "No Furniture", "TargetSet": { "RoomNames": [ "My Spare Room" ] }, "SampleSet": { "ModelTypes": [] } } ]}

适用于模拟世界模板主体的JSON架构TheThethe templateBody (模拟世界模板主体)是 https://docs.aws.amazon.com/robomaker/latest/dg/API_CreateWorldTemplate.html. 此参数是 JSON 格式的字符串。JSON指定模拟世界模板并包含参数Simulation WorldForge 将用于生成世界。

下面是 JSON 的架构。

{ "title": "WorldTemplate", "description": "The top-level template for parameterizing a randomly generated world. By default, a single\nresidential building with one floor and one room is generated.", "type": "object", "properties": { "Version": { "title": "Version", "default": "1", "type": "string" }, "Buildings": { "title": "Buildings", "default": [ { "Floors": [ { "Floorplan": { "Footprint": { "DesiredAspectRatio": { "x": 1.0,

66

Page 75: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南适用于模拟世界模板主体的JSON架构

"y": 1.0 } }, "Ceiling": { "Height": 3.0 }, "Rooms": [ { "Type": "Living", "Name": "My Living Room", "DesiredShape": { "Area": 20.0, "AspectRatio": { "x": 1.0, "y": 1.0 } } }, { "Type": "Bedroom", "Name": "My Bedroom", "DesiredShape": { "Area": 20.0, "AspectRatio": { "x": 1.0, "y": 1.0 } } } ], "DesiredConnections": [] }, "Interior": { "Flooring": { "MaterialSets": [] }, "Walls": { "MaterialSets": [] }, "Furniture": { "FurnitureArrangements": [] } } } ] } ], "type": "array", "items": { "$ref": "#/definitions/BuildingTemplate" }, "minItems": 1, "maxItems": 1 } }, "additionalProperties": false, "definitions": { "AspectRatio": { "title": "AspectRatio", "type": "object", "properties": { "x": { "title": "X", "default": 1, "minimum": 1, "maximum": 4,

67

Page 76: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南适用于模拟世界模板主体的JSON架构

"type": "number" }, "y": { "title": "Y", "default": 1, "minimum": 1, "maximum": 4, "type": "number" } }, "additionalProperties": false }, "FloorplanFootprint": { "title": "FloorplanFootprint", "description": "The desired footprint of this floorplan.", "type": "object", "properties": { "DesiredAspectRatio": { "title": "Desiredaspectratio", "default": { "x": 1.0, "y": 1.0 }, "allOf": [ { "$ref": "#/definitions/AspectRatio" } ] } }, "additionalProperties": false }, "FloorplanCeiling": { "title": "FloorplanCeiling", "description": "The height of the ceiling for this floorplan in metres.", "type": "object", "properties": { "Height": { "title": "Height", "default": 3.0, "type": "number", "minimum": 2.4, "maximum": 4.0 } }, "additionalProperties": false }, "Rectangle": { "title": "Rectangle", "description": "A rectangle defined by area in square metres and aspect ratio.", "type": "object", "properties": { "Area": { "title": "Area", "type": "number" }, "AspectRatio": { "$ref": "#/definitions/AspectRatio" } }, "required": [ "Area", "AspectRatio" ], "additionalProperties": false },

68

Page 77: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南适用于模拟世界模板主体的JSON架构

"FloorplanRoom": { "title": "FloorplanRoom", "description": "A description for single room for this floorplan.", "type": "object", "properties": { "Type": { "title": "Type", "enum": [ "Bedroom", "Bathroom", "Living", "Dining", "Kitchen", "Hallway", "Closet" ], "type": "string" }, "Name": { "title": "Name", "type": "string" }, "DesiredShape": { "title": "Desiredshape", "default": { "Area": 20.0, "AspectRatio": { "x": 1.0, "y": 1.0 } }, "allOf": [ { "$ref": "#/definitions/Rectangle" } ] } }, "required": [ "Type", "Name" ], "additionalProperties": false }, "FloorplanConnection": { "title": "FloorplanConnection", "description": "Descibes the desired layout of the rooms and their adjacent rooms. A connection can be either a doorway or \nan open space without any walls. Two rooms cannot both share an interior doorway and an opening. \nThe same two rooms can have multiple doorways, up to a limit.", "type": "object", "properties": { "Location": { "title": "Location", "type": "array", "items": { "type": "string" }, "minItems": 2, "maxItems": 2 }, "ConnectionType": { "title": "Connectiontype", "enum": [ "Doorway", "Opening"

69

Page 78: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南适用于模拟世界模板主体的JSON架构

], "type": "string" } }, "required": [ "Location", "ConnectionType" ], "additionalProperties": false }, "FloorplanTemplate": { "title": "FloorplanTemplate", "description": "The top-level floorplan template that parameterizes the randomly generated \narchitectural layout. By default, a residential floorplan with bedroom and \nliving room are generated with a random doorway or opening connection. \n\nThe footprint contributes to the overall shape of the floor layout along\nwith rooms. The footprint shape is desired as it is a preference and not\nguaranteed.\n\nThe ceiling determines the height of the walls. There are minimum and\nmaximum ceiling heights. The ceiling height is guaranteed.\n\nRooms are required. Each room has a desired shape. Together, the room\nshapes and footprint determine floor layout. The room types contribute to\nthe layout and are used when randomly selecting furniture and materials for\nthe walls and floors.\n\nDesiredConnections are optional. Two rooms are connected if they share a\nwall and doorway or adjacent without any wall aka \"opening\". All rooms are\nguaranteed to be connected randomly if they are not specified in the\nconnections list. Connections that are specified are _not_ guaranteed but\nwill be attempted as best-effort.", "type": "object", "properties": { "Footprint": { "title": "Footprint", "default": { "DesiredAspectRatio": { "x": 1.0, "y": 1.0 } }, "allOf": [ { "$ref": "#/definitions/FloorplanFootprint" } ] }, "Ceiling": { "title": "Ceiling", "default": { "Height": 3.0 }, "allOf": [ { "$ref": "#/definitions/FloorplanCeiling" } ] }, "Rooms": { "title": "Rooms", "default": [ { "Type": "Living", "Name": "My Living Room", "DesiredShape": { "Area": 20.0, "AspectRatio": { "x": 1.0, "y": 1.0 } } },

70

Page 79: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南适用于模拟世界模板主体的JSON架构

{ "Type": "Bedroom", "Name": "My Bedroom", "DesiredShape": { "Area": 20.0, "AspectRatio": { "x": 1.0, "y": 1.0 } } } ], "type": "array", "items": { "$ref": "#/definitions/FloorplanRoom" }, "minItems": 1, "maxItems": 6 }, "DesiredConnections": { "title": "Desiredconnections", "default": [], "type": "array", "items": { "$ref": "#/definitions/FloorplanConnection" }, "minItems": 0, "maxItems": 12 } }, "additionalProperties": false }, "RoomNameList": { "title": "RoomNameList", "description": "The set of all rooms matching any of the listed room names.", "type": "object", "properties": { "RoomNames": { "title": "Roomnames", "type": "array", "items": { "type": "string" } } }, "required": [ "RoomNames" ], "additionalProperties": false }, "RoomTypeList": { "title": "RoomTypeList", "description": "The set of all rooms matching any of the listed room types.", "type": "object", "properties": { "RoomTypes": { "title": "Roomtypes", "type": "array", "items": { "enum": [ "Bedroom", "Bathroom", "Living", "Dining", "Kitchen", "Hallway",

71

Page 80: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南适用于模拟世界模板主体的JSON架构

"Closet" ], "type": "string" } } }, "required": [ "RoomTypes" ], "additionalProperties": false }, "MaterialSetByMaterialType": { "title": "MaterialSetByMaterialType", "description": "The set of materials that match any of the material types listed. An empty\nset is invalid since all targets require materials.", "type": "object", "properties": { "MaterialTypes": { "title": "Materialtypes", "type": "array", "items": { "type": "string" }, "minItems": 1 } }, "required": [ "MaterialTypes" ], "additionalProperties": false }, "InteriorMaterialSet": { "title": "InteriorMaterialSet", "description": "A set of sample materials to randomly assign to a set of interior target elements.\n\nThe target set determines *what rooms* receive the materials in the sample\nset. The targets in a room are the walls and flooring. Rooms may be targeted \nby room type or room name. \n\nThe sample set determines *what materials* to randomly select for the\ntarget rooms' walls and floors. \n\nThe sample set is optional and when not specified (null) materials are\nrandomly selected according to the room type for each room in the target\nset.\n\nA sample set with an empty material set is invalid since all wall \nand flooring targets require materials.", "type": "object", "properties": { "Name": { "title": "Name", "type": "string" }, "TargetSet": { "title": "Targetset", "anyOf": [ { "$ref": "#/definitions/RoomNameList" }, { "$ref": "#/definitions/RoomTypeList" } ] }, "SampleSet": { "$ref": "#/definitions/MaterialSetByMaterialType" } }, "required": [ "Name", "TargetSet" ],

72

Page 81: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南适用于模拟世界模板主体的JSON架构

"additionalProperties": false }, "InteriorFlooring": { "title": "InteriorFlooring", "description": "Describes the interior template parameters for all floors for this floorplan.\nAll floors not explicitly targeted will have a random floor material assigned by room type.", "type": "object", "properties": { "MaterialSets": { "title": "Materialsets", "default": [], "type": "array", "items": { "$ref": "#/definitions/InteriorMaterialSet" }, "minItems": 0, "maxItems": 6 } }, "additionalProperties": false }, "InteriorWalls": { "title": "InteriorWalls", "description": "Describes the interior template parameters for all walls for this floorplan.\nAll walls not explicitly targeted will have a random wall material assigned by room type.", "type": "object", "properties": { "MaterialSets": { "title": "Materialsets", "default": [], "type": "array", "items": { "$ref": "#/definitions/InteriorMaterialSet" }, "minItems": 0, "maxItems": 6 } }, "additionalProperties": false }, "ModelTypeList": { "title": "ModelTypeList", "description": "The set of all models matching any of the listed model types.\nAn empty set means zero models to sample/select.", "type": "object", "properties": { "ModelTypes": { "title": "Modeltypes", "type": "array", "items": { "type": "string" }, "minItems": 0 } }, "required": [ "ModelTypes" ], "additionalProperties": false }, "FurnitureArrangementSet": { "title": "FurnitureArrangementSet", "description": "Describes the interior template for placing furniture in one or more rooms.\n\n- TargetSet is the set of rooms to furnish, filter by room name or room\n

73

Page 82: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南适用于模拟世界模板主体的JSON架构

type.\n- SampleSet is a set of all furnishing models to randomly choose and\n place. \n- DesiredSpatialDensity is the desired level of free space after placing\n furniture.", "type": "object", "properties": { "Name": { "title": "Name", "type": "string" }, "TargetSet": { "title": "Targetset", "anyOf": [ { "$ref": "#/definitions/RoomNameList" }, { "$ref": "#/definitions/RoomTypeList" } ] }, "SampleSet": { "$ref": "#/definitions/ModelTypeList" }, "DesiredSpatialDensity": { "title": "Desiredspatialdensity", "default": "Moderate", "enum": [ "Sparse", "Moderate", "Dense" ], "type": "string" } }, "required": [ "Name", "TargetSet" ], "additionalProperties": false }, "InteriorFurnishings": { "title": "InteriorFurnishings", "description": "Describes the types of furniture models for randomly placing into each room\nin the world. Rooms are targeted by room type or room name. Rooms that are\nnot targeted are furnished at random by their room type with moderate density.\ndensity. For an empty room, specify an empty sample set.", "type": "object", "properties": { "FurnitureArrangements": { "title": "Furniturearrangements", "default": [], "type": "array", "items": { "$ref": "#/definitions/FurnitureArrangementSet" }, "minItems": 0, "maxItems": 6 } }, "additionalProperties": false }, "InteriorTemplate": { "title": "InteriorTemplate", "description": "Top-level template for parameterizing the interior finishes and furnishings for\nthis floorplan.", "type": "object", "properties": {

74

Page 83: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南适用于模拟世界模板主体的JSON架构

"Flooring": { "title": "Flooring", "default": { "MaterialSets": [] }, "allOf": [ { "$ref": "#/definitions/InteriorFlooring" } ] }, "Walls": { "title": "Walls", "default": { "MaterialSets": [] }, "allOf": [ { "$ref": "#/definitions/InteriorWalls" } ] }, "Furniture": { "title": "Furniture", "default": { "FurnitureArrangements": [] }, "allOf": [ { "$ref": "#/definitions/InteriorFurnishings" } ] } }, "additionalProperties": false }, "FloorTemplate": { "title": "FloorTemplate", "description": "Describes a single foor within a building. Defaults to a single residential room\nof a randomy type and size, and the interior is randomly furnished.", "type": "object", "properties": { "Floorplan": { "title": "Floorplan", "default": { "Footprint": { "DesiredAspectRatio": { "x": 1.0, "y": 1.0 } }, "Ceiling": { "Height": 3.0 }, "Rooms": [ { "Type": "Living", "Name": "My Living Room", "DesiredShape": { "Area": 20.0, "AspectRatio": { "x": 1.0, "y": 1.0 } } },

75

Page 84: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南适用于模拟世界模板主体的JSON架构

{ "Type": "Bedroom", "Name": "My Bedroom", "DesiredShape": { "Area": 20.0, "AspectRatio": { "x": 1.0, "y": 1.0 } } } ], "DesiredConnections": [] }, "allOf": [ { "$ref": "#/definitions/FloorplanTemplate" } ] }, "Interior": { "title": "Interior", "default": { "Flooring": { "MaterialSets": [] }, "Walls": { "MaterialSets": [] }, "Furniture": { "FurnitureArrangements": [] } }, "allOf": [ { "$ref": "#/definitions/InteriorTemplate" } ] } }, "additionalProperties": false }, "BuildingTemplate": { "title": "BuildingTemplate", "description": "Describes a building to be randomly generated. Defaults to one residential floor.", "type": "object", "properties": { "Floors": { "title": "Floors", "default": [ { "Floorplan": { "Footprint": { "DesiredAspectRatio": { "x": 1.0, "y": 1.0 } }, "Ceiling": { "Height": 3.0 }, "Rooms": [ { "Type": "Living", "Name": "My Living Room",

76

Page 85: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南示例世界模板 (JSON)

"DesiredShape": { "Area": 20.0, "AspectRatio": { "x": 1.0, "y": 1.0 } } }, { "Type": "Bedroom", "Name": "My Bedroom", "DesiredShape": { "Area": 20.0, "AspectRatio": { "x": 1.0, "y": 1.0 } } } ], "DesiredConnections": [] }, "Interior": { "Flooring": { "MaterialSets": [] }, "Walls": { "MaterialSets": [] }, "Furniture": { "FurnitureArrangements": [] } } } ], "type": "array", "items": { "$ref": "#/definitions/FloorTemplate" }, "minItems": 1, "maxItems": 1 } }, "additionalProperties": false } }}

示例世界模板 (JSON)(模拟世界模板正文)是 templateBody 的输入参数。https://docs.aws.amazon.com/robomaker/latest/dg/API_CreateWorldTemplate.html此参数是 JSON 格式的字符串。JSON 指定模拟世界模板,并包含Simulation WorldForge 用于生成世界的参数。

此部分包含示例模拟世界模板正文。

主题• 一个光室 (p. 78)• 仅一个房间 (p. 80)• 两个房间 (p. 81)

77

Page 86: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南一个光室

一个光室以下示例指定一所房屋。它指定内部材质和家具。

{ "name": "OneBedroomHouse", "templateBody": { "Version": "1", "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

78

Page 87: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南一个光室

} } } ], "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": {

79

Page 88: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南仅一个房间

"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" } ] } } } ] } ] }}

仅一个房间以下示例指定一所房屋。它指定内部家具。

80

Page 89: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南两个房间

{ "name": "OneRoom", "templateBody": { "Version": "1", "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": {

81

Page 90: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南管理模拟世界模板

"Version": "1", "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": {} } ] } ] }}

管理模拟世界模板此部分提供有关如何创建和管理模拟世界模板的信息。您可以使用模拟世界模板来指定 SimulationWorldForge 如何生成世界。您可以指定房间数、房间连接方式、家具以及用于内部元素的材质类型。

要了解有关模拟世界模板的更多信息,请从了解模拟世界模板 (p. 55)开始。您还可以查看描述模拟世界模板的 JSON templateBody。有关更多信息,请参阅适用于模拟世界模板主体的JSON架构 (p. 66)。

主题• 创建模拟世界模板 (p. 83)• 查看模拟世界模板 (p. 95)• 修改模拟世界模板 (p. 95)

82

Page 91: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南创建模拟世界模板

• 删除模拟世界模板 (p. 96)

创建模拟世界模板创建模拟世界模板以指定 Simulation WorldForge 如何生成世界。当模拟世界模板完成时,创建一个世界生成作业来生成具有不同房间和内部配置的世界。

您可以从示例模板、已保存模板或从头开始创建模拟世界模板。创建模板后,您可以修改地板规划、内部以及其他详细信息。有关修改模拟世界模板的更多信息,请参阅修改模拟世界模板 (p. 95)。

创建模拟世界模板

请按照以下选项卡之一中的步骤进行操作:

Using the console

创建模拟世界模板

1. 登录到 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在 AWS RoboMaker 控制台上,展开左侧的 Simulation WorldForge (模拟),然后选择 World

templates (世界模板)。3. 在 World templates (世界模板) 页面上,选择 Create template (创建模板)。4. 在 Create a world template (创建世界模板) 页面上,选择模板选项之一。您可以选择预配置的

Sample template (示例模板) 之一,克隆并修改 Saved template (已保存模板) 或 Start fromscratch (从头开始)(使用默认世界)。

5. 在 Template detail (模板详细信息) 页面的左上角,选择 Rename (重命名),然后指定模板的名称。

6. (可选)自定义地面计划和内部详细信息。有关更多信息,请参阅了解模拟世界模板 (p. 55)。7. 在 Template detail (模板详细信息) 页面上,选择 Save and exit (保存并退出)。

Using the AWS CLI

Example

您可以使用 AWS CLI 更新模拟世界模板。首先,创建一个 JSON 文档,该文档指定 SimulationWorldForge 将生成的世界。接下来,使用 create-world-template 创建模拟世界模板。

例如,以下 JSON 文档指定了一个房屋。

{ "title": "WorldTemplate", "description": "The top-level template for parameterizing a randomly generated world. By default, a single\nresidential building with one floor and one room is generated.", "type": "object", "properties": { "Version": { "title": "Version", "default": "1", "type": "string" }, "Buildings": { "title": "Buildings", "default": [ { "Floors": [ {

83

Page 92: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南创建模拟世界模板

"Floorplan": { "Footprint": { "DesiredAspectRatio": { "x": 1.0, "y": 1.0 } }, "Ceiling": { "Height": 3.0 }, "Rooms": [ { "Type": "Living", "Name": "My Living Room", "DesiredShape": { "Area": 20.0, "AspectRatio": { "x": 1.0, "y": 1.0 } } } ], "DesiredConnections": [] }, "Interior": { "Flooring": { "MaterialSets": [] }, "Walls": { "MaterialSets": [] }, "Furniture": { "FurnitureArrangements": [] } } } ] } ], "type": "array", "items": { "$ref": "#/definitions/BuildingTemplate" }, "minItems": 1, "maxItems": 1 } }, "additionalProperties": false, "definitions": { "AspectRatio": { "title": "AspectRatio", "type": "object", "properties": { "x": { "title": "X", "default": 1, "minimum": 1, "maximum": 4, "type": "number" }, "y": { "title": "Y", "default": 1, "minimum": 1, "maximum": 4,

84

Page 93: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南创建模拟世界模板

"type": "number" } }, "additionalProperties": false }, "FloorplanFootprint": { "title": "FloorplanFootprint", "description": "The desired footprint of this floorplan.", "type": "object", "properties": { "DesiredAspectRatio": { "title": "Desiredaspectratio", "default": { "x": 1.0, "y": 1.0 }, "allOf": [ { "$ref": "#/definitions/AspectRatio" } ] } }, "additionalProperties": false }, "FloorplanCeiling": { "title": "FloorplanCeiling", "description": "The height of the ceiling for this floorplan in metres.", "type": "object", "properties": { "Height": { "title": "Height", "default": 3.0, "type": "number", "minimum": 2.4, "maximum": 4.0 } }, "additionalProperties": false }, "Rectangle": { "title": "Rectangle", "description": "A rectangle defined by area in square metres and aspect ratio.", "type": "object", "properties": { "Area": { "title": "Area", "type": "number" }, "AspectRatio": { "$ref": "#/definitions/AspectRatio" } }, "required": [ "Area", "AspectRatio" ], "additionalProperties": false }, "FloorplanRoom": { "title": "FloorplanRoom", "description": "A description for single room for this floorplan.", "type": "object", "properties": { "Type": { "title": "Type",

85

Page 94: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南创建模拟世界模板

"enum": [ "Bedroom", "Bathroom", "Living", "Dining", "Kitchen", "Hallway", "Closet" ], "type": "string" }, "Name": { "title": "Name", "maxLength": 255, "minLength": 1, "pattern": "^[a-zA-Z0-9_\\- ]*$", "type": "string" }, "DesiredShape": { "title": "Desiredshape", "default": { "Area": 20.0, "AspectRatio": { "x": 1.0, "y": 1.0 } }, "allOf": [ { "$ref": "#/definitions/Rectangle" } ] } }, "required": [ "Type", "Name" ], "additionalProperties": false }, "FloorplanConnection": { "title": "FloorplanConnection", "description": "Descibes the desired layout of the rooms and their adjacent rooms. A connection can be either a doorway or \nan open space without any walls. Two rooms cannot both share an interior doorway and an opening. \nThe same two rooms can have multiple doorways, up to a limit.", "type": "object", "properties": { "Location": { "title": "Location", "type": "array", "items": { "type": "string" }, "minItems": 2, "maxItems": 2 }, "ConnectionType": { "title": "Connectiontype", "enum": [ "Doorway", "Opening" ], "type": "string" } },

86

Page 95: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南创建模拟世界模板

"required": [ "Location", "ConnectionType" ], "additionalProperties": false }, "FloorplanTemplate": { "title": "FloorplanTemplate", "description": "The top-level floorplan template that parameterizes the randomly generated \narchitectural layout. By default, a residential floorplan with bedroom and \nliving room are generated with a random doorway or opening connection. \n\nThe footprint contributes to the overall shape of the floor layout along\nwith rooms. The footprint shape is desired as it is a preference and not\nguaranteed.\n\nThe ceiling determines the height of the walls. There are minimum and\nmaximum ceiling heights. The ceiling height is guaranteed.\n\nRooms are required. Each room has a desired shape. Together, the room\nshapes and footprint determine floor layout. The room types contribute to\nthe layout and are used when randomly selecting furniture and materials for\nthe walls and floors.\n\nDesiredConnections are optional. Two rooms are connected if they share a\nwall and doorway or adjacent without any wall aka \"opening\". All rooms are\nguaranteed to be connected randomly if they are not specified in the\nconnections list. Connections that are specified are _not_ guaranteed but\nwill be attempted as best-effort.", "type": "object", "properties": { "Footprint": { "title": "Footprint", "default": { "DesiredAspectRatio": { "x": 1.0, "y": 1.0 } }, "allOf": [ { "$ref": "#/definitions/FloorplanFootprint" } ] }, "Ceiling": { "title": "Ceiling", "default": { "Height": 3.0 }, "allOf": [ { "$ref": "#/definitions/FloorplanCeiling" } ] }, "Rooms": { "title": "Rooms", "default": [ { "Type": "Living", "Name": "My Living Room", "DesiredShape": { "Area": 20.0, "AspectRatio": { "x": 1.0, "y": 1.0 } } } ], "type": "array", "items": {

87

Page 96: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南创建模拟世界模板

"$ref": "#/definitions/FloorplanRoom" }, "minItems": 1, "maxItems": 6 }, "DesiredConnections": { "title": "Desiredconnections", "default": [], "type": "array", "items": { "$ref": "#/definitions/FloorplanConnection" }, "minItems": 0, "maxItems": 12 } }, "additionalProperties": false }, "RoomNameList": { "title": "RoomNameList", "description": "The set of all rooms matching any of the listed room names.", "type": "object", "properties": { "RoomNames": { "title": "Roomnames", "type": "array", "items": { "type": "string" }, "minItems": 1, "maxItems": 6 } }, "required": [ "RoomNames" ], "additionalProperties": false }, "RoomTypeList": { "title": "RoomTypeList", "description": "The set of all rooms matching any of the listed room types.", "type": "object", "properties": { "RoomTypes": { "title": "Roomtypes", "type": "array", "items": { "enum": [ "Bedroom", "Bathroom", "Living", "Dining", "Kitchen", "Hallway", "Closet" ], "type": "string" }, "minItems": 1, "maxItems": 7 } }, "required": [ "RoomTypes" ], "additionalProperties": false

88

Page 97: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南创建模拟世界模板

}, "MaterialSetByMaterialType": { "title": "MaterialSetByMaterialType", "description": "The set of materials that match any of the material types listed. An empty\nset is invalid since all targets require materials.", "type": "object", "properties": { "MaterialTypes": { "title": "Materialtypes", "type": "array", "items": { "type": "string" }, "minItems": 1 } }, "required": [ "MaterialTypes" ], "additionalProperties": false }, "InteriorMaterialSet": { "title": "InteriorMaterialSet", "description": "A set of sample materials to randomly assign to a set of interior target elements.\n\nThe target set determines *what rooms* receive the materials in the sample\nset. The targets in a room are the walls and flooring. Rooms may be targeted\nby room type or room name.\n\nThe sample set determines *what materials* to randomly select for the\ntarget rooms' walls and floors.\n\nThe sample set is optional and when not specified (null) materials are\nrandomly selected according to the room type for each room in the target\nset.\n\nA sample set with an empty material set is invalid since all wall\nand flooring targets require materials.", "type": "object", "properties": { "Name": { "title": "Name", "maxLength": 255, "minLength": 1, "pattern": "^[a-zA-Z0-9_\\- ]*$", "type": "string" }, "TargetSet": { "title": "Targetset", "anyOf": [ { "$ref": "#/definitions/RoomNameList" }, { "$ref": "#/definitions/RoomTypeList" } ] }, "SampleSet": { "$ref": "#/definitions/MaterialSetByMaterialType" } }, "required": [ "Name", "TargetSet" ], "additionalProperties": false }, "InteriorFlooring": { "title": "InteriorFlooring", "description": "Describes the interior template parameters for all floors for this floorplan.\nAll floors not explicitly targeted will have a random floor material assigned by room type.",

89

Page 98: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南创建模拟世界模板

"type": "object", "properties": { "MaterialSets": { "title": "Materialsets", "default": [], "type": "array", "items": { "$ref": "#/definitions/InteriorMaterialSet" }, "minItems": 0, "maxItems": 6 } }, "additionalProperties": false }, "InteriorWalls": { "title": "InteriorWalls", "description": "Describes the interior template parameters for all walls for this floorplan.\nAll walls not explicitly targeted will have a random wall material assigned by room type.", "type": "object", "properties": { "MaterialSets": { "title": "Materialsets", "default": [], "type": "array", "items": { "$ref": "#/definitions/InteriorMaterialSet" }, "minItems": 0, "maxItems": 6 } }, "additionalProperties": false }, "ModelTypeList": { "title": "ModelTypeList", "description": "The set of all models matching any of the listed model types.\nAn empty set means zero models to sample/select.", "type": "object", "properties": { "ModelTypes": { "title": "Modeltypes", "type": "array", "items": { "enum": [ "Baths", "BarCabinets", "Beds", "Bookcases", "CoffeeTables", "ConsoleTables", "CornerCabinets", "DeskChairs", "Desks", "DiningChairs", "DiningTables", "DishWashers", "Dressers", "EndAndSideTables", "FloorLamps", "Fridges", "LivingRoomChairs", "KitchenIslandsAndCarts", "MediaStorage", "Nightstands",

90

Page 99: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南创建模拟世界模板

"Ottomans", "Ovens", "ServingCarts", "Showers", "SideboardsAndBuffets", "Sofas", "Storage", "StorageBenches", "Toilets", "VanityCounters", "WashingMachinesAndDryers" ], "type": "string" }, "minItems": 0 } }, "required": [ "ModelTypes" ], "additionalProperties": false }, "FurnitureArrangementSet": { "title": "FurnitureArrangementSet", "description": "Describes the interior template for placing furniture in one or more rooms.\n\n- TargetSet is the set of rooms to furnish, filter by room name or room\n type.\n- SampleSet is a set of all furnishing models to randomly choose and\n place.\n- DesiredSpatialDensity is the desired level of free space after placing\n furniture.", "type": "object", "properties": { "Name": { "title": "Name", "maxLength": 255, "minLength": 1, "pattern": "^[a-zA-Z0-9_\\- ]*$", "type": "string" }, "TargetSet": { "title": "Targetset", "anyOf": [ { "$ref": "#/definitions/RoomNameList" }, { "$ref": "#/definitions/RoomTypeList" } ] }, "SampleSet": { "$ref": "#/definitions/ModelTypeList" }, "DesiredSpatialDensity": { "title": "Desiredspatialdensity", "default": "Moderate", "enum": [ "Sparse", "Moderate", "Dense" ], "type": "string" } }, "required": [ "Name", "TargetSet"

91

Page 100: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南创建模拟世界模板

], "additionalProperties": false }, "InteriorFurnishings": { "title": "InteriorFurnishings", "description": "Describes the types of furniture models for randomly placing into each room\nin the world. Rooms are targeted by room type or room name. Rooms that are\nnot targeted are furnished at random by their room type with moderate density.\ndensity. For an empty room, specify an empty sample set.", "type": "object", "properties": { "FurnitureArrangements": { "title": "Furniturearrangements", "default": [], "type": "array", "items": { "$ref": "#/definitions/FurnitureArrangementSet" }, "minItems": 0, "maxItems": 6 } }, "additionalProperties": false }, "InteriorTemplate": { "title": "InteriorTemplate", "description": "Top-level template for parameterizing the interior finishes and furnishings for\nthis floorplan.", "type": "object", "properties": { "Flooring": { "title": "Flooring", "default": { "MaterialSets": [] }, "allOf": [ { "$ref": "#/definitions/InteriorFlooring" } ] }, "Walls": { "title": "Walls", "default": { "MaterialSets": [] }, "allOf": [ { "$ref": "#/definitions/InteriorWalls" } ] }, "Furniture": { "title": "Furniture", "default": { "FurnitureArrangements": [] }, "allOf": [ { "$ref": "#/definitions/InteriorFurnishings" } ] } }, "additionalProperties": false },

92

Page 101: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南创建模拟世界模板

"FloorTemplate": { "title": "FloorTemplate", "description": "Describes a single foor within a building. Defaults to a single residential room\nof a randomy type and size, and the interior is randomly furnished.", "type": "object", "properties": { "Floorplan": { "title": "Floorplan", "default": { "Footprint": { "DesiredAspectRatio": { "x": 1.0, "y": 1.0 } }, "Ceiling": { "Height": 3.0 }, "Rooms": [ { "Type": "Living", "Name": "My Living Room", "DesiredShape": { "Area": 20.0, "AspectRatio": { "x": 1.0, "y": 1.0 } } } ], "DesiredConnections": [] }, "allOf": [ { "$ref": "#/definitions/FloorplanTemplate" } ] }, "Interior": { "title": "Interior", "default": { "Flooring": { "MaterialSets": [] }, "Walls": { "MaterialSets": [] }, "Furniture": { "FurnitureArrangements": [] } }, "allOf": [ { "$ref": "#/definitions/InteriorTemplate" } ] } }, "additionalProperties": false }, "BuildingTemplate": { "title": "BuildingTemplate", "description": "Describes a building to be randomly generated. Defaults to one residential floor.",

93

Page 102: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南创建模拟世界模板

"type": "object", "properties": { "Floors": { "title": "Floors", "default": [ { "Floorplan": { "Footprint": { "DesiredAspectRatio": { "x": 1.0, "y": 1.0 } }, "Ceiling": { "Height": 3.0 }, "Rooms": [ { "Type": "Living", "Name": "My Living Room", "DesiredShape": { "Area": 20.0, "AspectRatio": { "x": 1.0, "y": 1.0 } } } ], "DesiredConnections": [] }, "Interior": { "Flooring": { "MaterialSets": [] }, "Walls": { "MaterialSets": [] }, "Furniture": { "FurnitureArrangements": [] } } } ], "type": "array", "items": { "$ref": "#/definitions/FloorTemplate" }, "minItems": 1, "maxItems": 1 } }, "additionalProperties": false } }}

如果将 JSON 保存到名为 one-bedroom-house.json 的文件中,则可以将其与 AWS CLI 配合使用来创建模拟世界模板:

$ aws robomaker create-world-template --template my-simulation-world-template-arn --template-body file://one-bedroom-house.json

94

Page 103: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南查看模拟世界模板

查看模拟世界模板查看有关模拟世界模板的详细信息。

查看模拟世界模板的详细信息

请按照以下选项卡之一中的步骤进行操作:

Using the console

1. 登录到 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航窗格中,选择 Simulation WorldForge (模拟),然后选择 World templates (世界模

板)。3. 选择模拟世界模板的 Id 以查看其详细信息,包括其平面计划和内部内容。您还可以从详细信息视图生

成世界。

Using the AWS CLI

Example

以下 AWS CLI 示例使用 list-world-templates 列出现有模板,然后使用 describe-world-template 和 get-world-template-body 查看模拟世界模板的详细信息。

$ aws robomaker list-world-templates$ aws robomaker describe-world-template --template my-simulation-world-template-arn$ aws robomaker get-world-template-body --template my-simulation-world-template-arn

修改模拟世界模板选择平面计划以自定义平面计划中房间的数量和类型以及房间之间的连接。选择内部以自定义地面、墙壁和家具。

修改模拟世界模板

请按照以下选项卡之一中的步骤进行操作:

Using the console

修改模拟世界模板

1. 登录到 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在 AWS RoboMaker 控制台上,展开左侧导航窗格中的 Simulation WorldForge (模拟),然后选

择 World templates (世界模板)。3. 在 World templates (世界模板) 页面上,选择要修改的模拟世界模板。4. 选择要修改的每个元素旁边的 Edit (编辑) 或 Override (覆盖)。有关模拟世界模板组件的更多

信息,请参阅了解模拟世界模板 (p. 55)。

Using the AWS CLI

95

Page 104: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南删除模拟世界模板

Example

以下 AWS CLI 示例使用 list-world-templates 列出现有模板,然后它使用 describe-world-template 查看模拟世界模板的详细信息,并使用 get-world-template-body 检索模板正文 JSON并将其写入文件。

$ aws robomaker list-world-templates$ aws robomaker describe-world-template --template my-simulation-world-template-arn$ aws robomaker get-world-template-body --template my-simulation-world-template-arn --output json > myTemplateBody.json$ aws robomaker update-world-template-body --template my-simulation-world-template-arn --template-body file://myTemplateBody.json

删除模拟世界模板当您不再需要模拟世界模板时,可以将其删除。

Using the console

1. 登录到 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航窗格中,选择 Simulation WorldForge (模拟),然后选择 World templates (世界模

板)。3. 选择模拟世界模板的 Id,选择 Template actions (模板操作),选择 Delete (删除),然后在对话

框中选择 Delete (删除) 以确认删除。

Using the AWS CLI

Example

以下 AWS CLI 示例使用 list-world-templates 列出现有模板,然后使用 delete-world-template 删除模拟世界模板。

$ aws robomaker list-world-templates$ aws robomaker delete-world-template --template my-simulation-world-template-arn

管理世界生成作业使用世界生成作业通过模拟世界模板生成世界。在创建世界代作业时,您可以指定不同地板规划和内部配置的数量。每个世界生成作业可生成最多 50 个世界。

主题• 创建世界生成作业 (p. 96)• 查看世界生成作业 (p. 97)• 取消世界生成作业 (p. 98)

创建世界生成作业创建世界生成作业以生成具有不同房间和内部配置的世界。每个世界生成作业可生成最多 50 个世界。

96

Page 105: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南查看世界生成作业

创建世界代作业

请按照以下选项卡之一中的步骤进行操作:

Using the console

创建模拟世界模板

1. 登录到 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在 AWS RoboMaker 控制台上,展开左侧的 Simulation WorldForge (模拟),然后选择 World

templates (世界模板)。3. 在 World templates (世界模板) 页面上,选择要用于生成世界的模拟世界模板,然后选择

Generate worlds (生成世界)。4. 在 Generate worlds 页面上,指定 Number of floor plans。平面布局图数量与每个平面布局的内部

变化数量的乘积不能超过 50。5. 指定 Interior variations per floor plan (每个地板计划的内部变化数)。平面布局图数量与每个平面

布局的内部变化数量的乘积不能超过 50。6. 可选: 添加将分配给您生成的所有世界的 World tags (世界标签)。7. 可选: 添加将分配给生成作业的 Generation job tags (生成作业标签)。这些标签不会应用到您生

成的世界。8. 选择 Generate (生成)。

您可以在 World generation detail (世界生成详细信息) 页面中跟踪世界生成作业的进度。生成您的世界所需的时间取决于模拟世界模板的复杂性以及您生成的世界数。

Using the AWS CLI

Example

您可以使用 AWS CLI 从模拟世界模板生成世界。使用 create-world-generation-job 创建世界代作业。

以下 AWS CLI 示例说明如何生成具有 2 个包含 2 个不同内部地板计划的 4 个世界。

$ aws robomaker list-world-templates$ aws robomaker create-world-generation-job --template my-simulation-world-template-arn --worldCount floorplanCount=2,interiorCountPerFloorplan=2$ aws robomaker list-world-generation-jobs$ aws robomaker describe-world-generation-job --job my-world-generation-job-arn

查看世界生成作业您可以查看世界代进度、摘要信息以及有关世界代作业的其他详细信息。

查看世界代作业的详细信息

请按照以下选项卡之一中的步骤进行操作:

Using the console

1. 登录到 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。

97

Page 106: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南取消世界生成作业

2. 在左侧导航窗格中,选择 Simulation WorldForge (模拟),然后选择 World templates (世界模板)。

3. 选择世界生成作业的 Id 以查看其详细信息。您可以使用搜索栏查找生成作业。

Using the AWS CLI

Example

以下 AWS CLI 示例使用 list-world-generation-jobs 列出现有的世界生成作业,然后使用describe-world-generation-job 查看特定世界生成作业的详细信息。

$ aws robomaker list-world-generation-jobs$ aws robomaker describe-world-generation-job --job my-world-generation-job-arn

取消世界生成作业您可以取消正在进行的世界代作业。

取消世界代作业

请按照以下选项卡之一中的步骤进行操作:

Using the console

1. 登录到 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航窗格中,选择 Simulation WorldForge,然后选择 Generation jobs (生成作业)。3. 在 Generation jobs (生成作业) 页面上,选择要取消的世界代作业。4. 请选择 Cancel。在 Cancel generation job (取消生成作业) 页面上,选择 Cancel job (取消作

业) 以取消作业。

Using the AWS CLI

Example

以下 AWS CLI 示例使用 list-world-generation-jobs 列出现有的世界生成作业,然后使用cancel-world-generation-job 取消特定的世界生成作业。

$ aws robomaker list-world-generation-jobs$ aws robomaker cancel-world-generation-job --job my-world-generation-job-arn

管理世界导出任务您可以导出 Simulation WorldForge 生成的世界以在您自己的环境中使用。世界将在 .zip 文件中导出到您的Amazon S3 存储桶。该 .zip 文件包含 Gazebo 资产和世界的 ROS 工作区。

主题• 创建世界导出任务 (p. 99)• 查看世界导出任务 (p. 99)

98

Page 107: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南创建世界导出任务

创建世界导出任务您可以选择要导出到 Amazon S3 存储桶的世界。为导出选择的所有世界都将位于单个 .zip 文件中。

创建世界导出作业

请按照以下选项卡之一中的步骤进行操作:

Using the console

您可以为每个导出任务导出一个世界。

创建模拟世界模板

1. 登录到 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在 AWS RoboMaker 控制台上,展开左侧导航窗格中的 Simulation WorldForge (模拟),然后选

择 Worlds (世界)。3. 在 Worlds (世界) 页面上,选择 Create export job (创建导出任务)。4. 在 Create export job (创建导出任务) 页面上,选择要导出的 World (世界)。5. 选择对 存储桶具有 、PutObject 和 GetObject 权限的 AbortMultipartUploadIAM role

(IAM 角色)Amazon S3。选择 Create (创建) 可创建具有适当权限的角色。6. 选择 S3 destination for worlds output (世界输出的 S3 目标)。您还可以通过选择页面底部附近的

Amazon S3Create new S3 bucket (创建新的 S3 存储桶) 来创建新的 存储桶。7. 可选: 在 Create export job (创建导出作业) 页面上,添加将分配给导出的世界的标签。8. 选择 Create (创建) 以创建世界导出任务。

您可以在世界导出任务详细信息页面中跟踪导出任务的进度。创建任务后,将自动访问该位置。

Using the AWS CLI

Example

您可以使用 AWS CLI 导出世界。使用 create-world-export-job 创建世界导出任务。您可以为每个导出任务导出一个世界。

以下 AWS CLI 示例演示如何导出世界。首先,您可以使用 list-worlds 列出世界,然后调用指定世界 ARN 的 create-world-export-job。您可以通过调用 list-world-export-jobs 和describe-world-export-job 来检查状态。

$ aws robomaker list-worlds$ aws robomaker create-world-export-job --worlds my-simulation-world-arn --iam-role my-iam-role-arn --outputLocation s3Bucket=my-bucket,s3prefix=prefix$ aws robomaker list-world-export-jobs$ aws robomaker describe-world-export-job --job my-world-export-job-arn

查看世界导出任务查看世界导出作业的状态和其他详细信息。

查看世界导出任务的详细信息

请按照以下选项卡之一中的步骤进行操作:

99

Page 108: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南管理创造的世界

Using the console

1. 登录到 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航窗格中,选择 Simulation WorldForge,然后选择 Export jobs (导出任务)。3. 选择世界导出任务的 ID 以查看其详细信息。您还可以搜索和取消世界导出任务。

Using the AWS CLI

Example

以下 AWS CLI 示例使用 list-world-export-jobs 列出现有的世界导出任务,然后使用describe-world-export-job 查看特定世界导出任务的详细信息。

$ aws robomaker list-world-export-jobs$ aws robomaker describe-world-export-job --job my-world-export-job-arn

管理创造的世界本部分提供有关如何管理生成的环境的信息。

正在导出生成世界您可以使用世界出口工作来出口由 Simulation WorldForge. 有关创建世界出口作业以出口世界的更多信息,请参阅 创建世界导出任务 (p. 99).

查看生成的世界您可以查看世界状态、用于生成世界的模拟世界模板的ID以及其他详细信息。您可以在控制台中查看世界图像。

了解世界生产工作的详细信息

请按照以下选项卡之一中的步骤进行操作:

Using the console

要查看话务台中的世界图片,您应具有呼叫权限 DescribeWorldForgeImageRedirect 在 AWSRoboMaker API。有关更多信息,请参阅 在中查看世界所需的权限 AWS RoboMaker 在控制台中 (p. 140)。)

1. 登录到 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航面板中,选择 模拟世界征程,然后选择 世界.3. 选择 识别号 查看其详细信息的世界。您可以使用预览缩略图查找世界。您还可以按标记、ID或模板

进行搜索。4. 在 全球详情 您可以查看详细信息,包括更大的预览图像。您还可以导出或删除世界。

Using the AWS CLI

100

Page 109: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南删除生成世界

Example

以下内容 AWS CLI 示例使用 list-worlds 列出现有世界,然后使用 describe-world 查看特定世界的详细信息。

$ aws robomaker list-worlds$ aws robomaker describe-world --world my-world-arn

删除生成世界当您不再需要某个世界时,您可以将其删除。

Using the console

1. 登录到 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航面板中,选择 模拟世界征程,然后选择 世界.3. 选择您想删除的世界。您可以使用预览缩略图查找世界。您还可以按标记、ID或模板进行搜索。4. 选择 删除,然后选择 删除 在 删除世界 第页。

Using the AWS CLI

Example

以下内容 AWS CLI 示例使用 list-worlds 列出现有世界,然后使用 batch-delete-worlds 删除两个世界。

$ aws robomaker list-worlds$ aws robomaker batch-delete-worlds --worlds my-world-arn1,my-world-arn2

101

Page 110: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南VPC 设置

运行模拟作业AWS RoboMaker 模拟作业是机器人应用程序与云中运行的模拟应用程序的配对。当模拟作业正在运行时,您可以使用 Gazebo、rviz、rqt 和终端等模拟工具与其进行交互,以可视化传感器数据或控制机器人的组件。

主题• 配置 AWS RoboMaker 模拟作业以访问 Amazon VPC 中的资源 (p. 102)• 连接到模拟作业 (p. 103)• 访问模拟作业数据 (p. 105)• 根访问和系统功能 (p. 106)• AWS RoboMaker 创建的环境变量 (p. 107)• 在模拟作业中管理标记 (p. 108)• 使用 ROS 包进行播放 (p. 109)• 管理模拟作业 (p. 114)• 管理模拟作业批处理 (p. 120)• 模拟工具 (p. 123)

配置 AWS RoboMaker 模拟作业以访问 AmazonVPC 中的资源

在 Amazon Virtual Private Cloud (Amazon VPC) 中创建资源时,无法通过公共 Internet 读取这些资源。示例资源可以是 Amazon Redshift 数据仓库或 Amazon ElastiCache 集群。它们也可以是您在 Amazon ElasticCompute Cloud 实例上的服务。默认情况下,AWS RoboMaker 模拟作业无法访问 Amazon VPC 中的资源。

默认情况下,AWS RoboMaker 在 Amazon VPC 中运行模拟作业。但是,要允许您的作业访问 AmazonVPC 中的资源,您必须提供包含 Amazon VPC 子网 ID 和安全组 ID 的 VPC 特定数据。AWS RoboMaker 使用此数据设置弹性网络接口 (ENI)。ENI 可帮助您的作业安全地连接到私有 Amazon VPC 中的其他资源。

AWS RoboMaker 不连接到专用租赁 VPC 中的资源。有关更多信息,请参阅专用 VPC。

为 Amazon VPC 访问配置 AWS RoboMaker 模拟作业通过在创建作业时使用 VpcConfig 参数向 AWS RoboMaker 模拟作业添加 Amazon VPC 数据(请参阅CreateSimulationJob (p. 221))。以下是 AWS CLI 示例。

• create-simulation-job CLI 命令指定 --vpc-config 参数。在创建模拟作业时使用它来提供 VPC数据。在此示例中,分配了公有 IP。

$ aws robomaker create-simulation-job \--output-location s3Bucket=my-bucket,s3Prefix=my-output-folder \--max-job-duration-in-seconds 3600 \--iam-role my-role-arn \--failure-behavior Continue \--robot-applications application='my-robot-application-arn,launchConfig={packageName="hello_world_robot",launchFile="rotate.launch"}' \--simulation-applications application='my-simulation-application-arn,launchConfig={packageName="hello_world_simulation",launchFile="empty_world.launch"}' \

102

Page 111: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南模拟作业的 Internet 访问

--vpc-config assignPublicIp=true,subnets=comma-separated-vpc-subnet-ids,securityGroups=comma-separated-security-group-ids

当模拟作业配置为在 VPC 中运行时,它会产生 ENI 性能损失。当您尝试连接到网络资源时,地址解析可能会延迟。

模拟作业的 Internet 访问AWS RoboMaker 使用您提供的 VPC 数据来设置 ENI。ENI 允许您的作业访问 VPC 资源。将向每个 ENI 分配一个来自您指定的子网中的范围的私有 IP 地址。默认情况下,不会为 ENI 分配任何公有 IP 地址。

如果您的作业需要 Internet 访问(可能是为了查找没有 VPC 终端节点的 AWS 服务),您可以在 VPC 内设置 NAT。您可以使用 Amazon VPC NAT 网关。您可以请求 Robomaker 分配一个公有 IP。有关更多信息,请参阅 Amazon VPC 用户指南 中的 NAT 网关。您不能使用连接到 VPC 的 Internet 网关。这要求 ENI 拥有公有 IP 地址。

要在使用公共子网时配置 Internet 访问,请设置 assignPublicIp=true 以将公共 IP 分配给 ENI。

连接到模拟作业如果要与模拟作业中的应用程序进行交互,请使用端口转发进行连接。配置端口转发时,流量将从模拟作业端口转发到应用程序端口。通过端口转发,可以轻松地使用 ROS Bridge 等此类工具以及其他工具进行连接。当您想要调试或运行自定义工具以与应用程序交互时,这非常有用。

主题• 在您启用端口转发之前 (p. 103)• 启用端口转发 (p. 103)• 端口转发示例 (p. 104)

在您启用端口转发之前谁需要访问您的实例? 您信任的单个主机或特定网络(例如,本地计算机的公有 IPv4 地址)。AmazonEC2 控制台中的安全组编辑器可自动为您检测本地计算机的公有 IPv4 地址。您还可以通过 Internet 浏览器在 Internet 中搜索“什么是我的 IP 地址”,或使用以下服务:检查 IP。如果您正通过 ISP 或从防火墙后面连接但没有静态 IP 地址,您必须找出客户端使用的 IP 地址范围。

Warning

您负责配置与模拟作业的安全远程连接。我们建议您为正在打开的端口实施强身份验证方法和传输中加密。

有关安全组的更多信息,请参阅您的 VPC 的安全组。

启用端口转发启用端口转发:

1. 确定机器人应用程序和模拟应用程序需要哪些端口。应用程序上的端口称为应用程序端口。

例如,您可能希望在模拟应用程序中的端口 8085 上使用 ROS Bridge,并在机器人应用程序中为 HTTP使用端口 8080。

2. 确定模拟作业实例上要用作远程连接点的端口。模拟作业上的端口称为作业端口。

例如,您可以将端口 8085 用于 ROS Bridge,将 80 用于 HTTP。任务端口和应用程序端口可以不同。

103

Page 112: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南端口转发示例

3. 确定要在公共 IP 上启用哪些端口映射。公有 IP 地址是指可通过 Internet 访问的 IPv4 地址。您可以使用公有地址在您的应用程序和 Internet 之间进行通信。

您可以使用解决方案(如 Linux 堡垒或 AWS VPN)连接到模拟作业,而无需启用公有地址。4. 创建模拟作业 (p. 114)并提供应用程序端口映射。例如,您可以为 ROS Bridge 提供模拟应用程序映

射,例如,作业端口 8085 映射到应用程序端口 8085。您还可以为 HTTP 提供机器人应用程序映射,例如,作业端口 8080 映射到应用程序端口 80。

5. 配置一个或多个 VPC 安全组以启用模拟作业端口上的流量。创建规则来配置入站流量或出站流量。

例如,如果在端口 80 上使用 HTTP,则可以创建规则以允许端口 80 上的入站和出站流量。您可以限制对单个 IP 地址、地址范围的访问或使用其他条件。

有关使用安全组的更多信息,请参阅使用安全组。

端口转发示例您可以使用不同的工具远程连接到您的模拟作业。本节介绍如何使用 ROS Bridge 和 HTTP 进行连接。

主题• 使用 ROS Bridge 进行端口转发 (p. 104)• 使用 HTTP 服务器进行端口转发 (p. 104)

使用 ROS Bridge 进行端口转发您可以使用 ROS Bridge 从非 ROS 程序访问 ROS 功能。ROS Bridge 提供了 JSON API。支持 JSONAPI 的工具和应用程序可以与 ROS Bridge 交互和访问 ROS 功能。有关 ROS Bridge 的更多信息,请参阅rosbridge_suite。

使用 ROS Bridge 连接到您的应用程序

1. 在 package.xml 文件中添加对 ROS Bridge 包的依赖项:

<package> ... <exec_depend>rosbridge_suite</exec_depend></package>

2. 更新您的启动文件以启用 ROS Bridge。默认情况下,它使用端口 8080。

<launch> <arg name="rosbridge_port" value="$(optenv ROSBRIDGE_PORT 8080)"/> <include file="$(find rosbridge_server)/launch/rosbridge_websocket.launch" > <arg name="port" value="$(arg rosbridge_port)"/> </include></launch>

3. 创建模拟作业时,为机器人应用程序或模拟应用程序启用远程连接并打开端口 8080。当您的模拟作业正在运行时,您可以连接。

使用 HTTP 服务器进行端口转发将以下代码复制到新的 Python 文件中作为节点目录中的 ROS Python 节点。该代码创建一个名为webserver 的托管 Web 服务器的节点。

有关 ROS 节点的更多信息,请参阅了解 ROS ROS 节点。

104

Page 113: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南访问模拟作业数据

1. 添加 rospy 的一个依赖项,这是 package.xml 文件中用于 ROS 的 Python 客户端库:

<package> ... <exec_depend>rospy</exec_depend></package>

2. 更新您的启动文件以启用 ROS Bridge。默认情况下,它使用端口 8080。

<launch> <arg name="server_port" value="$(optenv SERVER_PORT 8080)"/> <node pkg="python_launcher" type="run_webserver.sh" name="webserver" output="screen" required="true" args="$(arg server_port)" /></launch>

3. 将以下代码复制到名为 run_webserver.sh 的新 shell 脚本。

#!/usr/bin/env pythonset -expython3 -m webserver.node $1

4. 将以下代码复制到新的 Python 文件。该代码会创建一个名为 webserver 的节点,用于启动简单的Web 服务器。

#!/usr/bin/env python import rospyimport http.serverimport socketserverimport sys

def start_server(port): # Start a webserver httpd = socketserver.TCPServer(("", int(port)), http.server.SimpleHTTPRequestHandler) rospy.loginfo('Webserver at port {}'.format(port)) httpd.serve_forever()

def main():

rospy.init_node("webserver") if len(sys.argv) > 1: server_port = sys.argv[1]

start_server(server_port) rospy.spin()

if __name__ == '__main__': main()

5. 创建模拟作业时,为机器人应用程序或模拟应用程序启用端口转发并打开端口 8080。当您的模拟作业正在运行时,您可以使用 HTTP 进行连接。

访问模拟作业数据AWS RoboMaker 可以从正在运行的模拟作业中捕获以下信息:

• 已写入标准输出和标准错误流的信息。在 Amazon CloudWatch Logs 中收集此信息。• CloudWatch 指标 RealTimeFactor。它是模拟的时间量与挂钟时间的比率。如果模拟 30 分钟需要 1 小

时,则系数为 .5。更复杂的模拟具有较低的实时系数。

105

Page 114: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南根访问和系统功能

• Gazebo 日志数据,包括模型、链接和关节的状态。如果在创建模拟作业时已指定 Amazon SimpleStorage Service 存储桶,则 Gazebo 日志数据将写入 gazebo-logs 文件夹中。

• ROS 包文件,包含带时间戳的 ROS 消息。如果在创建模拟作业时已指定 Amazon Simple StorageService 存储桶,则 ROS 包数据写入 ros-bag 文件夹中。

当模拟作业正在运行时,标准输出和标准错误信息会写入 Amazon CloudWatch 中。模拟作业完成后,Gazebo 日志和 ROS 包文件将很快可用。

访问日志、指标和可选的输出 Amazon S3 存储桶

1. 在 AWS RoboMaker 控制台中,选择左侧的 Simulation jobs (模拟作业),然后选择模拟作业。2. 在 Simulation details (模拟详细信息) 页面上,选择 Configuration (配置) 选项卡。3. 要查看 ROS 包、ROS 日志和 Gazebo 日志,请选择 Simulation job output destination (模拟作业输出目

标) 下的 Amazon S3 位置以查看 Amazon S3 存储桶,找到以 sim 开头的文件夹,然后选择该文件夹。如果有多个文件夹,请按日期和时间进行选择。

文件夹包括 gazebo-logs、ros-bags 和 ros-logs。4. 要查看 CloudWatch Logs 中的标准错误、标准输出和其他信息,请选择 Logs (日志),然后选择要查看

的模拟应用程序或机器人应用程序日志。5. 要查看 CloudWatch 指标,请选择 Metrics (指标),然后选择一个指标。例如,选择 RealTimeFactor。

从 AWS RoboMaker 控制台中的 Simulation job details (模拟作业详细信息) 页面访问 CloudWatch Logs、指标和模拟输出 Amazon S3 存储桶。

根访问和系统功能AWS RoboMaker 提供对模拟作业中运行的应用程序的有限根 (sudo) 访问权限。以下列表包含被阻止的大量(而非全部)系统调用。

• acct• add_key• bpf• clock_adjtime• clock_settime• clone• create_module• delete_module• finit_module• get_kernel_syms• get_mempolicy• init_module• ioperm• iopl• kcmp• kexec_file_load• kexec_load• keyctl• lookup_dcookie

106

Page 115: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南AWS RoboMaker 创建的环境变量

• mbind• mount• move_pages• name_to_handle_at• nfsservctl• open_by_handle_at• perf_event_open• personality• pivot_root• process_vm_readv• process_vm_writev• ptrace• query_module• quotactl• 重启• request_key• set_mempolicy• setns• settimeofday• stime• swapon• swapoff• sysfs• _sysctl• umount• umount2• unshare• uselib• userfaultfd• ustat• vm86• vm86old

AWS RoboMaker 创建的环境变量AWS RoboMaker 定义这些模拟作业环境变量。

• AWS_ROBOMAKER_SIMULATION_JOB_ID

• AWS_ROBOMAKER_SIMULATION_JOB_ARN

• AWS_ROBOMAKER_SIMULATION_RUN_ID

您可以从应用程序或命令行获得这些变量。例如,要在 Python 中获取当前模拟任务 Amazon 资源名称(ARN),请使用 os.environ.get("AWS_ROBOMAKER_SIMULATION_JOB_ARN")。

如果您为模拟作业指定了 Amazon Simple Storage Service 输出存储桶,您可以使用环境变量查找输出路径。AWS RoboMaker 将输出写入到 s3://bucket-name/AWS_ROBOMAKER_SIMULATION_JOB_ID/AWS_ROBOMAKER_SIMULATION_RUN_ID。可以使用它通过代码或命令行管理 Amazon S3 中的对象。

107

Page 116: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南在模拟作业中管理标记

在模拟作业中管理标记为了帮助您管理您的模拟作业,您可以选择分配您自己的元数据。例如,您可以根据模拟的地形类型、测试结果或机器人硬件配置对模拟作业进行分类。这有助于您组织和跟踪模拟作业结果。

本节包括有关使用 ROS 命令行工具和代码的信息。有关使用 AWS RoboMaker API 管理标记的更多信息,请参阅 TagResource。有关标记的更多信息,请参阅标记您的 AWS RoboMaker 资源 (p. 162)。

您必须具有为模拟作业标记、取消标记和列出标记的权限。有关更多信息,请参阅从 ROS 应用程序或 ROS命令行使用标记所需的权限 (p. 142)。

Note

本主题适用于 ROS Kinetic 和 ROS Melodic。有关 ROS 2 Dashing 的更多信息,请参阅ROS 2Dashing(测试版) (p. 4)。

通过 ROS 命令行工具使用标记您可以使用 ROS 命令行工具 rosservice 添加、列出和删除模拟作业的标记。以下示例添加标记“状态”和“名称”,列出这些标记,然后删除这两个标记。

以下示例将标记“状态”和“传递”添加到当前模拟作业:Note

您必须拥有调用 TagResource、UntagResource 和 ListTagsForResource 的权限。有关权限的更多信息,请参阅AWS RoboMaker 的身份验证和访问控制 (p. 138)。

robomaker@9cc6d11dfa46:~$rosservice call /robomaker/job/add_tags "[{key: status, value: pass}, {key: name, value: my_test}]"success: Truemessage: ''

以下示例列出了模拟作业的所有标记:

robomaker@9cc6d11dfa46:~$rosservice call /robomaker/job/list_tagssuccess: Truemessage: ''tags: - key: "status" value: "pass" - key: "name" value: "my_test"

以下示例从当前模拟作业删除标记“状态”和“传递”:

robomaker@9cc6d11dfa46:~$rosservice call /robomaker/job/remove_tags "[status, name]"success: Truemessage: ''

通过模拟应用程序中的代码使用标记以下示例提供了一个 Python 函数,可用于管理模拟应用程序中的标记:

#!/usr/bin/env python

108

Page 117: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南使用 ROS 包进行播放

# before using, add a dependency on the AWS RoboMaker package# in package.xml to access the service (.srv) types:# # <depend>aws_robomaker_simulation_ros_pkgs</deped>## See the repo at https://github.com/aws-robotics/aws-robomaker-simulation-ros-pkgs.#import rospyfrom robomaker_simulation_msgs.msg import Tagfrom robomaker_simulation_msgs.srv import AddTags

# add a list of Tag(key,value) to the simulation jobdef add_tags(tags): # ensure the service is ready rospy.wait_for_service('/robomaker/job/add_tags', timeout=30) requestAddTags = rospy.ServiceProxy('/robomaker/job/add_tags', AddTags) response = requestAddTags(tags) if response.success: rospy.loginfo("Successfully added tags: %s", tags) else: rospy.logerr("Add tags request failed for tags (%s): %s", tags, response.message)

有关 的更多信息

使用 ROS 包进行播放ROS 包是包含来自 ROS 主题的带时间戳且序列化的消息数据的文件。AWS RoboMaker 可以将 ROS 包中的消息播放到在模拟作业中运行的 ROS 应用程序。AWS RoboMaker 使用 rosbag 来播放消息。消息根据其原始时间戳进行播放,并包含原始负载。来自 ROS 包的消息取代来自现实世界和虚拟模拟的输入和其他观察结果。

使用 rosbag record 记录 ROS 包。可以从为模拟而设计的 ROS 应用程序中创建 ROS 包。也可以由在现实世界中运行的机器人创建它们。ROS 包可用于测试新的机器人应用程序,对现有应用程序进行故障排除以及开发新功能。

数据源中指定的 ROS 包将复制到模拟环境中的 /opt/robomaker/datasources/ 目录。

主题• 示例启动文件配置 (p. 109)• 播放结束时避免模拟作业失败 (p. 112)• 对自定义状态和属性值使用标记 (p. 112)• 提前取消模拟作业 (p. 112)

示例启动文件配置使用 ROS 包播放的模拟作业需要至少一个 ROS 包数据源。模拟应用程序还必须具有配置为播放 ROS 包数据源的启动文件节点。此部分包含示例启动配置。

在下面的示例中,使用的是一个播放 ROS 包文件的节点。参数中已指定包文件。ROS 包文件路径的前缀为数据源的挂载路径。例如,在下面的示例中:

args="/opt/robomaker/datasources/mybaggroup/myS3prefix/log_0.bag"/>

其中:

109

Page 118: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南示例启动文件配置

• myS3prefix/log_0.bag 是包文件的完整 Amazon S3 密钥路径• mybaggroup 是包组的名称• /opt/robomaker/datasources/ 是装载日志文件的路径

播放单个 ROS 包文件在以下示例中,ROS 包文件 log_0.bag 中的消息将按同步时间的顺序进行播放。包文件是 ROS 包组mybaggroup 的一部分。ROS 包文件本身位于 myS3prefix 中,而不是 mybaggroup 中。

<launch> <!-- ROS bag files are copied to /opt/robomaker/datasources/ ROS bag files are copied from myS3prefix/ --> <node pkg="rosbag" type="play" name="rosbag_play" output="screen" required="true" args="/opt/robomaker/datasources/mybaggroup/myS3prefix/log_0.bag"/></launch>

播放多个 ROS 包文件在以下示例中,将播放 ROS 包文件 log_0.bag 和 log_1.bag 中的消息。ROS 包位于同一个 ROS 包组mybaggroup 中。来自两个包文件的消息按同步时间排序。

<launch> <node pkg="rosbag" type="play" name="rosbag_play" output="screen" required="true" args="/opt/robomaker/datasources/mybaggroup/myS3prefix/log_0.bag /opt/robomaker/datasources/mybaggroup/myS3prefix/log_1.bag"/></launch>

模拟消息之间的时间。例如,如果有两个 ROS 包,它们之间有 30 分钟的间隙,则模拟将记时 30(模拟)分钟。

使用 --skip-empty=SEC 跳过 SEC 秒没有消息的区域。在以下示例中,将跳过超过 60 秒的任何间隙。

<launch> <node pkg="rosbag" type="play" name="rosbag_play" output="screen" required="true" args="--skip-empty=60 /opt/robomaker/datasources/mybaggroup/myS3prefix/log_0.bag /opt/robomaker/datasources/mybaggroup/myS3prefix/log_1.bag"/></launch>

播放不同包组中的 ROS 包文件在以下示例中,ROS 包文件 log_0.bag 和 log_1.bag 中的消息将按同步时间排序进行播放。这些文件来自不同的 ROS 包组 mybaggroup_1 和 mybaggroup_2。

<launch> <node pkg="rosbag" type="play" name="rosbag_play" output="screen" required="true" args="/opt/robomaker/datasources/mybaggroup_1/myS3prefix/log_0.bag /opt/robomaker/datasources/mybaggroup_2/myS3prefix/log_0.bag"/> </launch>

使用不同的起始偏移和持续时间您可以通过指定以秒为单位的时间偏移来控制何时开始播放。在以下示例中,ROS 包文件 log_0.bag 中的消息在 10 秒后开始播放。播放过程将在达到 ROS 包的结尾时结束。

110

Page 119: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南示例启动文件配置

<launch> <node pkg="rosbag" type="play" name="rosbag_play" output="screen" required="true" args="--start 10 /opt/robomaker/datasources/mybaggroup_1/myS3prefix/log_0.bag"/></launch>

您还可以通过指定 start 时间和 duration 时间来播放某个范围的消息子集。在以下示例中,ROS 包文件log_0.bag 中的消息在 10 秒后开始播放。该过程在 100 秒后结束。

<launch> <node pkg="rosbag" type="play" name="rosbag_play" output="screen" required="true" args="--start 10 --duration 100 /opt/robomaker/datasources/mybaggroup_1/myS3prefix/log_0.bag"/></launch>

要从 ROS 包的开头播放消息的子集,请仅指定 duration。

<launch> <node pkg="rosbag" type="play" name="rosbag_play" output="screen" required="true" args="--duration 100 /opt/robomaker/datasources/mybaggroup_1/myS3prefix/log_0.bag"/></launch>

以交互方式暂停和播放消息ROS 包消息会自动开始播放。您可以手动启动和停止播放消息。使用 --pause 开始将 ROS 包消息播放设为暂停。然后,您可以使用工具(如 rviz 和 rqt)与播放进行交互。调试您的机器人应用程序时,适合采用这种方法。

有关更多信息,请参阅 rosservice 命令行工具。

在以下启动文件中,播放开始为暂停状态。

<launch> <node pkg="rosbag" type="play" name="rosbag_play" output="screen" required="true" args="--pause /opt/robomaker/datasources/mybaggroup_1/myS3prefix/log_0.bag"/></launch>

从终端使用以下命令恢复消息播放和暂停消息播放。

robomaker@9cc6d11dfa46:~$rosservice call /rosbag_play/pause_playback '{data: True}'success: Truemessage: "Playback is now paused"robomaker@9cc6d11dfa46:~$rosservice call /rosbag_play/pause_playback '{data: False}'success: Truemessage: "Playback is now resumed"

使用环境变量配置播放您可以将环境变量用作 launch.xml 文件中的参数。创建模拟作业时,可以定义环境变量。使用这些命令可以更方便地指定 ROS 包的位置、类似 start 的播放参数以及其他详细信息。

在以下启动文件中,创建了两个参数 bags 和 args。它们的值从您在创建模拟作业时定义的环境变量 BAGS和 ARGS 中捕获。

<launch> <arg name="bags" default="$(optenv BAGS)" doc="space separated list of bag files"/>

111

Page 120: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南播放结束时避免模拟作业失败

<arg name="args" default="$(optenv ARGS)" doc="rosbag play args"/> <node pkg="rosbag" type="play" name="rosbag_play" output="screen" required="true" args="$(arg bags) $(arg args)"/></launch>

当您创建模拟作业时,将创建 BAGS 和 ARGS 环境变量。例如,如果使用下面的值创建环境变量,则播放将使用两个 ROS 包文件。播放过程从 10 秒后开始,持续 100 秒时间。

BAGS="/opt/robomaker/datasources/bags/myS3prefix/log_0.bag /opt/robomaker/datasources/bags/myS3prefix/log_1.bag"ARGS="--start 10 --duration 100"

播放结束时避免模拟作业失败当播放节点退出但为 required 时,模拟应用程序将关闭。模拟作业状态设置为 Failed,失败原因为Simulation application exited abnormally (segfault, etc.)。使用 keep-alive 选项来避免发生这种情况。

在以下示例中,模拟作业运行指定的模拟作业持续时间。如果在模拟作业结束时播放未完成,则它会停止。在这两种情况下,模拟作业状态都将设置为 Completed。

<launch> <!-- Other ROS launch nodes... --> <node pkg="rosbag" type="play" name="rosbag_play" output="screen" required="true" args="--keep-alive /opt/robomaker/datasources/mybaggroup_1/myS3prefix/log_0.bag"/></launch>

您也可以提前取消模拟作业。有关更多信息,请参阅提前取消模拟作业 (p. 112)。

对自定义状态和属性值使用标记为了帮助您管理您的模拟作业,您可以选择分配您自己的元数据。有关更多信息,请参阅在模拟作业中管理标记 (p. 108)。

提前取消模拟作业您可以选择使用自定义应用程序逻辑提前取消模拟作业,也可以从终端手动取消。当您取消时,模拟作业状态将设置为 Cancelled。查看模拟作业时,这会很有用。如果某个模拟作业为 Cancelled,则此操作是特意执行的。如果模拟作业的作业状态为 Failed,则它是意外退出的。

可以从终端手动取消模拟作业,也可以在模拟应用程序中以编程方式取消。

Note

您必须具有调用 CancelSimulationJob 的权限才能取消模拟作业。有关权限的更多信息,请参阅AWS RoboMaker 的身份验证和访问控制 (p. 138)。

从终端手动取消以下示例显示了如何使用 rosservice 手动取消模拟作业。

Note

模拟作业终止时关闭连接。

robomaker@9cc6d11dfa46:~$rosservice call /robomaker/job/cancel

112

Page 121: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南提前取消模拟作业

success: Truemessage: ''

从 Python 取消要在模拟应用程序中使用 Python 取消,请执行以下操作:

1. 在您的 package.xml 中添加 AWS RoboMaker 包的一个依赖项以访问服务类型 (.srv):

<package> ... <depend>aws_robomaker_simulation_ros_pkgs</depend></package>

2. 将以下代码作为 ROS Python 节点复制到新的 Python 文件中。该代码使用服务代理添加标记并根据已用时间取消模拟作业。您的取消条件可能取决于传感器数据、机器人条件或其他信息。

有关 ROS 节点的更多信息,请参阅了解 ROS ROS 节点。

#!/usr/bin/env python

import rospyfrom rosgraph_msgs.msg import Clockfrom robomaker_simulation_msgs.msg import Tagfrom robomaker_simulation_msgs.srv import Cancel, AddTags

is_cancelled = False

# cancels the simulation jobdef cancel_job(): # proxy for simulation job cancel requestCancel = rospy.ServiceProxy('/robomaker/job/cancel', Cancel) response = requestCancel() if response.success: global is_cancelled is_cancelled = True rospy.loginfo("Successfully requested cancel job") else: rospy.logerr("Cancel request failed: %s", response.message)

# adds the key=value tag to the simulation jobdef add_tags(tags): requestAddTags = rospy.ServiceProxy('/robomaker/job/add_tags', AddTags) response = requestAddTags(tags) if response.success: rospy.loginfo("Successfully added tags: %s", tags) else: rospy.logerr("Add tags request failed for tags (%s): %s", tags, response.message)

# checks for simulation job cancel conditionsdef check_complete(msg): # when clock time is 30 seconds, add a tag indicating results # and cancel the simulation job global is_cancelled if msg.clock.secs > 30.0 and not is_cancelled: add_tags(key="result", value="pass") is_cancelled = cancel_job()

# timer callback that cancels the job def cancel_timeout(timer): global is_cancelled if not is_cancelled:

113

Page 122: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南管理模拟作业

rospy.loginfo("Timed out, canceling job") add_tags([Tag(key="status", value="timeout")]) cancel_job() if __name__ == "__main__": rospy.init_node('cancel_node') # wait for the required services to become available rospy.wait_for_service('/robomaker/job/cancel') rospy.wait_for_service('/robomaker/job/add_tags') # tag the simulation job with a descriptive name add_tags(key="name", value="my_test") # add a timer to tag status as timeout and cancel the job after 5 minutes rospy.Timer(rospy.Duration(secs=300), cancel_timeout, oneshot=True) # add a subscriber to tag status as pass and cancel the job clock = rospy.Subscriber('/clock', Clock, check_complete) # keep the node alive rospy.spin()

管理模拟作业在本节中,您将学习如何创建和管理模拟作业。

主题• 创建模拟作业 (p. 114)• 查看模拟作业 (p. 118)• 取消模拟作业 (p. 119)• 克隆模拟作业 (p. 119)• 重新启动模拟作业 (p. 120)

创建模拟作业如果要使用 Gazebo 或使用存储在 ROS 包中的先前记录的 ROS 消息在虚拟世界中运行机器人应用程序,请创建模拟作业。指定模拟应用程序时,请选择软件套件名称。如果您选择 Gazebo,您的机器人应用程序将与在模拟应用程序中建模的对象、地形和其他物理方面互动。如果您选择 RosbagPlay,您的机器人应用程序将使用您提供的 ROS 包中发布的 ROS 消息作为数据源。

有关配置您的 ROS 启动文件以播放 ROS 包消息的详细信息,请参阅使用 ROS 包进行播放 (p. 109)。

Note

90 天之后,默认任务将过期并删除。这些任务无法再访问。

主题• 使用 Gazebo 创建模拟作业 (p. 114)• 使用 ROS 包创建模拟作业 (p. 117)

使用 Gazebo 创建模拟作业当您希望在自己创建的模拟中运行机器人应用程序时,可以使用 Gazebo 创建模拟作业。运行之后,您可以与模拟交互。例如,您可以使用 rviz 查看机器人上的视觉传感器发送的图像。

使用 Gazebo 创建模拟作业

请按照以下选项卡之一中的步骤进行操作。

114

Page 123: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南创建模拟作业

Note

如果您使用现有 Amazon S3 存储桶或创建新存储桶,存储桶必须与 AWS RoboMaker 位于相同区域内。

Using the console

1. 登录到 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航窗格中选择 Simulations (模拟),然后选择 Simulation Jobs (模拟作业)。3. 选择 Create simulation job (创建模拟作业)。4. 在 Simulation configuration (模拟配置) 页面上,选择 simulation job duration (模拟配置持续时间)。

选择从 5 分钟到 14 天之间的任意值。

Important

要了解如何向您收取 AWS RoboMaker 费用的信息,请参阅 AWS RoboMaker 定价。5. 选择 Failure behavior (失败行为)。选择 fail (失败) 可在模拟作业失败时终止主机实例。选择

continue (继续) 可保留主机实例以便您连接和调查。

如果您在以下指定了可选的 S3 文件夹,它将包含模拟数据。它独立于所选的失败行为供使用。6. 对于 IAM Role (IAM 角色),选择一个角色或选择 Create new role (创建新角色) 来创建角色。AWS

RoboMaker 将使用此角色代表您访问资源。它还可由您的应用程序用来访问 AWS 资源,例如Amazon Rekognition 或 Amazon Lex。

7. :可选。 在 计算,选择模拟单元限制。将根据提供的模拟单位限制,成比例地向您的模拟应用程序分配 CPU 和内存。一个模拟单位是 1 个 vcpu 和 2GB 内存。默认值为 15。

8. :可选。 在 输出目标,输入 Amazon S3 将存储模拟作业输出的文件夹名称。(可选)选择 Createnew S3 folder (创建新 S3 文件夹) 以创建新 Amazon S3 文件夹。

9. :可选。 在 网络,如果您的Robot应用程序或模拟应用程序访问 Amazon VPC,选择 VPC、子网和安全组。选择所有可用的子网,确保您的所有资源限制都适用。有关更多信息,请参阅 VPC 和子网。

如果您从 VPC 外部访问模拟作业,请选择 Assign public IP (分配公有 IP)。10. :可选。 要远程连接到您的模拟应用程序或Robot应用程序,请选择 启用与模拟的连接,然后为

Robot应用程序和模拟应用程序指定端口映射。

Warning

您负责配置与模拟作业的安全远程连接。我们建议您为正在打开的端口实施强身份验证方法和传输中加密。有关远程连接的更多信息,请参阅连接到模拟作业 (p. 103)。

11. (可选)对于 Tags (标签),为模拟任务指定一个或多个标签。标签是一些充当元数据的词和短语,用于标识和组织 AWS 资源。每个标签均包含一个键 和一个值。您可在 Simulation Job details (模拟应用程序详细信息) 页面上管理模拟任务的标签。

有关标记的更多信息,请参阅 使用成本分配标签 在 AWS计费和成本管理用户指南.12. 选择 Next (下一步)。13. 在 Specify robot application (指定机器人应用程序) 页面上的 Robot application (机器人应用程

序) 下,选择 Create new application (创建新应用程序)。(可选)您可以选择 Choose existingapplication (选择现有应用程序) 以使用已经创建的机器人应用程序。

14. 键入机器人应用程序的 name (名称)。15. 在 Sources (源) 下,指定 X86_64 机器人应用程序源的 Amazon S3 位置。AWS RoboMaker 模拟

作业需要 X86_64 源来运行模拟。

(可选)如果您打算将机器人应用程序部署到队列中的机器人上,则可以提供 ARMHF 和 ARM64机器人应用程序源文件。您还可以更新机器人应用程序以包括其他源文件。有关更多信息,请参阅更新机器人应用程序 (p. 48)。)

115

Page 124: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南创建模拟作业

16. 在 Robot application configuration (机器人应用程序配置) 中,提供机器人应用程序的 roslaunchLaunch package name (启动软件包名称)。

17. 指定 roslaunch Launch file (启动文件)。启动文件包含启动哪些节点以及 roslaunch 的其他初始化参数等配置信息。

要了解有关 roslaunch 的更多信息,请参阅 roslaunch。18. :可选。 如果您的应用程序包含图形用户界面,请选择 使用流会话运行... AWS RoboMaker 将配

置连接,以便在模拟中运行时与应用程序交互。您可以通过选择 机器人应用 下方 模拟工具 在模拟职位详情页面。

19. :可选。 如果您的robot应用程序使用环境变量,请指定 名称 和 值 对。环境变量名称必须以字母A-Z 或下划线开头并包括 A-Z、0-9 和下划线。保留以“AWS”开头的名称。

选择 Add environment variable (添加环境变量) 来添加额外的变量。

您可以使用 roslaunch 替换参数读取启动文件中的环境变量。20. :可选。 将从模拟作业端口的流量转发配置为应用端口。必须配置模拟作业网络,以便为您的

Robot和模拟应用指定端口映射。21. 选择 Next (下一步)。22. 在 Specify simulation application (指定模拟应用程序) 页面上,选择 Create new application (创建

新应用程序)。(可选)您可以选择 Choose existing application (选择现有应用程序) 以使用已经创建的模拟应用程序。

23. 键入模拟应用程序的 name (名称)。24. 选择由您的模拟应用程序使用的 Simulation software suite (模拟软件套件)和 Simulation rendering

version (模拟渲染版本)。25. 在 Sources (源) 下,指定 X86_64 模拟应用程序源的 Amazon S3 位置。AWS RoboMaker 模拟作

业需要 X86_64 源来运行模拟。26. 在 Simulation application configuration (模拟应用程序配置) 中,提供您模拟应用程序的 roslaunch

Launch package name (启动软件包名称) 和 roslaunch Launch file (启动文件)。27. :可选。 如果您的应用程序包含图形用户界面,请选择 使用流会话运行。 AWS RoboMaker 将配

置连接,以便在模拟中运行时与应用程序交互。您可以通过选择 模拟应用 下方 模拟工具 在模拟职位详情页面。

28. :可选。 如果模拟应用程序使用环境变量,请指定 名称 和 值 对。选择 Add environment variable(添加环境变量) 来添加额外的变量。

29. :可选。 如果要导入一个世界生成的世界 Simulation WorldForge,选择 浏览世界 然后选择要导入的世界。

您必须配置模拟应用程序启动文件才能包括全局。有关使用导入世界的更多信息,请参阅 在模拟作业中使用导入的世界 (p. 35).

30. :可选。 将从模拟作业端口的流量转发配置为应用端口。必须配置模拟作业网络,以便为您的Robot和模拟应用指定端口映射。

31. 选择 Next (下一步)。32. :可选。 将从模拟作业端口的流量转发配置为应用端口。必须配置模拟作业网络,以便为您的

Robot和模拟应用指定端口映射。33. 选择 Create (创建) 以创建模拟作业。

Using the AWS CLI

Example

下面是一个示例 AWS CLI 命令,它执行的操作与在另一个选项卡中基于控制台的模拟作业创建等效。

116

Page 125: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南创建模拟作业

$ aws robomaker create-simulation-job --max-job-duration-in-seconds 3600 --iam-role arn:aws:iam::111111111111:role/MyRole --robot-applications application=arn:aws:robomaker:us-west-2:111111111111:robot-application/MyRobotApplication/1551203485821,launchConfig="{packageName=hello_world_robot,launchFile=rotate.launch}" --simulation-applications application=arn:aws:robomaker:us-west-2:111111111111:simulation-application/MySimulationApplication/1551203427605,launchConfig="{packageName=hello_world_simulation,launchFile=empty_world.launch}" --tags Region=North

使用 ROS 包创建模拟作业您必须配置 ROS 启动文件以播放用作数据源的 ROS 包文件。有关配置您的 ROS 启动文件以播放 ROS 包消息的详细信息,请参阅使用 ROS 包进行播放 (p. 109)。

使用 RosbagPlay 创建模拟作业

按以下步骤操作:

Note

如果您使用现有 Amazon S3 存储桶或创建新存储桶,存储桶必须与 AWS RoboMaker 位于相同区域内。

1. 登录到 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航窗格中选择 Simulations (模拟),然后选择 Simulation Jobs (模拟作业)。3. 选择 Create simulation job (创建模拟作业)。4. 在 Simulation configuration (模拟配置) 页面上,选择 simulation job duration (模拟配置持续时间)。选择

从 5 分钟到 14 天之间的任意值。

Important

要了解如何向您收取 AWS RoboMaker 费用的信息,请参阅 AWS RoboMaker 定价。5. 选择 Failure behavior (失败行为)。选择 fail (失败) 可在模拟作业失败时终止主机实例。选择 continue

(继续) 可保留主机实例以便您连接和调查。

如果您在以下指定了可选的 S3 文件夹,它将包含模拟数据。它独立于所选的失败行为供使用。6. 对于 IAM Role (IAM 角色),选择一个角色或选择 Create new role (创建新角色) 来创建角色。AWS

RoboMaker 将使用此角色代表您访问资源。它还可由您的应用程序用来访问 AWS 资源,例如 AmazonRekognition 或 Amazon Lex。

7. :可选。 在 计算,选择模拟单元限制。将根据提供的模拟单位限制,成比例地向您的模拟应用程序分配CPU 和内存。一个模拟单位是 1 个 vcpu 和 2GB 内存。默认值为 15。

8. :可选。 在 输出目标,输入 Amazon S3 将存储模拟作业输出的文件夹名称。(可选)选择 Createnew S3 folder (创建新 S3 文件夹) 以创建新 Amazon S3 文件夹。

9. :可选。 在 网络,如果您的Robot应用程序或模拟应用程序访问资源 Amazon VPC,选择 VPC、子网和安全组。如果您从 VPC 外部访问模拟作业,请选择 Assign public IP (分配公有 IP)。

10. (可选)对于 Tags (标签),为模拟任务指定一个或多个标签。标签是一些充当元数据的词和短语,用于标识和组织 AWS 资源。每个标签均包含一个键 和一个值。您可在 Simulation Job details (模拟应用程序详细信息) 页面上管理模拟任务的标签。

有关标记的更多信息,请参阅标记您的 AWS RoboMaker 资源 (p. 162)。11. 选择 Next (下一步)。12. 在 Specify robot application (指定机器人应用程序) 页面上的 Robot application (机器人应用程序) 下,选

择 Create new application (创建新应用程序)。(可选)您可以选择 Choose existing application (选择现有应用程序) 以使用已经创建的机器人应用程序。

13. 键入机器人应用程序的 name (名称)。

117

Page 126: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南查看模拟作业

14. 在 Sources (源) 下,指定 X86_64 机器人应用程序源的 Amazon S3 位置。AWS RoboMaker 模拟作业需要 X86_64 源来运行模拟。

(可选)如果您打算将机器人应用程序部署到队列中的机器人上,则可以提供 ARMHF 和 ARM64 机器人应用程序源文件。您还可以更新机器人应用程序以包括其他源文件。有关更多信息,请参阅 更新机器人应用程序 (p. 48)。)

15. 在 Robot application configuration (机器人应用程序配置) 中,提供机器人应用程序的 roslaunch Launchpackage name (启动软件包名称)。

16. 指定 roslaunch Launch file (启动文件)。启动文件包含启动哪些节点以及 roslaunch 的其他初始化参数等配置信息。

要了解有关 roslaunch 的更多信息,请参阅 roslaunch。17. :可选。 如果您的应用程序包含图形用户界面,请选择 使用流会话运行... AWS RoboMaker 将配置连

接,以便在模拟中运行时与应用程序交互。您可以通过选择 机器人应用 下方 模拟工具 在模拟职位详情页面。

18. :可选。 如果您的robot应用程序使用环境变量,请指定 名称 和 值 对。环境变量名称必须以字母 A-Z或下划线开头并包括 A-Z、0-9 和下划线。保留以“AWS”开头的名称。

选择 Add environment variable (添加环境变量) 来添加额外的变量。

您可以使用 roslaunch 替换参数读取启动文件中的环境变量。19. :可选。 将从模拟作业端口的流量转发配置为应用端口。必须配置模拟作业网络,以便为您的Robot和

模拟应用指定端口映射。20. 选择 Next (下一步)。21. 在 Specify simulation application (指定模拟应用程序) 页面上,选择 Create new application (创建新应

用程序)。(可选)您可以选择 Choose existing application (选择现有应用程序) 以使用已经创建的模拟应用程序。

22. 键入模拟应用程序的 name (名称)。23. 对于 软件套件名称,选择 Rosbagplay. Kinetic 将自动选择为 软件套件版本.24. 选择 Browse S3 (浏览 S3),然后指定模拟应用程序的路径。25. 在 Simulation application configuration (模拟应用程序配置) 中,提供您模拟应用程序的 roslaunch

Launch package name (启动软件包名称) 和 roslaunch Launch file (启动文件)。26. :可选。 如果您的应用程序包含图形用户界面,请选择 使用流会话运行... AWS RoboMaker 将配置连

接,以便在模拟中运行时与应用程序交互。您可以通过选择 模拟应用 下方 模拟工具 在模拟职位详情页面。

27. :可选。 如果模拟应用程序使用环境变量,请指定 名称 和 值 对。选择 Add environment variable (添加环境变量) 来添加额外的变量。

28. 在 Data source configuration (数据源配置) 中,提供 ROS bag group name (ROS 包组名称) ,然后选择Browse S3 (浏览 S3) 以选择 ROS bag files (ROS 包文件)。文件应包含ROS消息,其格式为 rosbagrecord。选择 添加组 添加其他数据文件组。

Note

您可以跨所有组选择总计大小小于 25 GB 的 100 个文件。随着数据文件的组合大小增加,性能可能会受到影响。

29. 选择 Next (下一步)。30. 选择 Create (创建) 以创建模拟作业。

查看模拟作业您可以查看有关模拟作业的信息,如果作业正在运行,请启动 Gazebo、rviz、rqt 或终端来与模拟交互。您还可以查看有关模拟作业的详细信息和管理标记。

118

Page 127: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南取消模拟作业

查看模拟作业的详细信息

请按照以下选项卡之一中的步骤进行操作。

Using the console

1. 登录到 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航窗格中选择 Simulations (模拟),然后选择 Simulation Jobs (模拟作业)。3. 选择要查看其详细信息的模拟作业的 ID,这些信息包括创建该作业的时间以及机器人应用程序和模拟

应用程序的启动命令。

Using the AWS CLI

Example

下面是一个示例 AWS CLI 命令,它执行的操作与在另一个选项卡中基于控制台的查看模拟作业等效。

$ aws robomaker list-simulation-jobs$ aws robomaker describe-simulation-job --job my-simulation-job-arn

取消模拟作业您可以取消正在运行且不再需要的模拟作业。

取消模拟作业

请按照以下选项卡之一中的步骤进行操作。

Using the console

1. 登录到 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航窗格中选择 Simulations (模拟),然后选择 Simulation Jobs (模拟作业)。3. 选择您要取消的模拟作业的 ID。4. 在 Simulation job detail (模拟作业详细信息) 页面的 Actions (操作) 下,选择 Cancel (取消)。5. 在 Cancel simulation job (取消模拟作业) 页面上,选择 Yes, cancel (是,取消)。

Using the AWS CLI

Example

下面是一个示例 AWS CLI 命令,它执行的操作与在另一个选项卡中基于控制台的取消模拟作业等效。

$ aws robomaker list-simulation-jobs$ aws robomaker cancel-simulation-job --job my-simulation-job-arn

克隆模拟作业您可以通过以下方式创建现有模拟作业的新模拟作业 克隆 从 模拟职位详情 第页。

119

Page 128: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南重新启动模拟作业

1. 登录到 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航窗格中选择 Simulations (模拟),然后选择 Simulation Jobs (模拟作业)。3. 选择您要重新启动的正在运行模拟作业的 ID。4. 在 Simulation job detail (模拟作业详细信息) 页面的 Actions (操作) 下,选择 Clone (克隆)。5. 在 Review and create simulation job (查看和创建模拟作业) 中,选择 Edit (编辑) 以进行更改,然后选择

Create (创建)。

重新启动模拟作业正在运行的模拟作业可以重新启动。重新启动时,模拟作业使用 Amazon S3 位置中的机器人应用程序和模拟应用程序源文件,以及创建默认作业时指定的所有其他配置设置。

重新启动模拟作业

请按照以下选项卡之一中的步骤进行操作。

Using the console

1. 登录到 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航窗格中选择 Simulations (模拟),然后选择 Simulation Jobs (模拟作业)。3. 选择您要重新启动的正在运行模拟作业的 ID。4. 在 Simulation job detail (模拟作业详细信息) 页面的 Actions (操作) 下,选择 Restart (重新启动)。5. 在 Restart simulation job (重新启动模拟作业) 页面上,选择 Yes, restart (是,重新启动)。

Using the AWS CLI

Example

下面是一个示例 AWS CLI 命令,它执行的操作与在另一个选项卡中基于控制台的重新启动模拟作业等效。模拟作业必须正在运行。

$ aws robomaker restart-simulation-job --job my-simulation-job-arn

管理模拟作业批处理此部分提供了有关如何启动和管理模拟作业批处理的信息。利用模拟作业批处理,您可以使用单个 API 调用启动和运行多个模拟。这样一来,便能轻松执行回归测试、参数优化、机器学习模型训练和合成数据生成。

Note

只能使用 AWS RoboMaker 开发工具包或 AWS CLI 启动模拟作业批处理。您可以使用 AWSRoboMaker 控制台查看、克隆和取消模拟批处理。

主题• 启动模拟作业批处理 (p. 121)• 查看模拟作业批处理 (p. 122)• 取消模拟作业批处理 (p. 122)

120

Page 129: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南启动模拟作业批处理

• 克隆模拟作业批处理 (p. 123)

启动模拟作业批处理从 AWS 开发工具包或 AWS CLI 启动模拟作业批处理。一个模拟作业批处理包含一个或多个模拟作业请求。每个模拟作业请求将标识每个模拟中要使用的应用程序、作业的最长持续时间以及其他信息。可以将标签应用于模拟作业批处理和每个模拟作业请求。

要启动模拟作业批处理,您必须执行以下操作:

1. 安装 AWS Command Line Interface。有关安装 AWS CLI 的更多信息,请参阅安装 AWS CLI。2. 将以下 JSON 复制到名为 startsimjobbatch.json 的文件中。 修改文件以匹配所需的配置,然后

保存文件。

{ "batchPolicy": { "timeoutInSeconds": 400, "maxConcurrency": 2 }, "createSimulationJobRequests": [ { "maxJobDurationInSeconds": 300, "iamRole": "arn:aws:iam::111111111111:role/MyRole", "failureBehavior": "Fail", "robotApplications": [ { "application": "arn:aws:robomaker:us-east-1:111111111111:robot-application/MyRobotApplicationArn", "launchConfig": { "packageName": "hello_world_robot", "launchFile": "rotate.launch" } } ], "simulationApplications": [ { "application": "arn:aws:robomaker:us-east-1:111111111111:simulation-applicationMySimulationApplicationArn", "launchConfig": { "packageName": "hello_world_simulation", "launchFile": "simulation.launch" } } ], "tags": { "myRequestTagKey" : "myRequestTagValue" } }, { "maxJobDurationInSeconds": 300, "iamRole": "arn:aws:iam::111111111111:role/MyRole", "failureBehavior": "Fail", “simulationApplications": [ { "application": "arn:aws:robomaker:us-east-1:111111111111:simulation-applicationMySimulationApplicationArn", "launchConfig": { "packageName": "hello_world_simulation", "launchFile": "simulation.launch" } } ]

121

Page 130: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南查看模拟作业批处理

} ], "tags": { "myBatchTagKey" : "myBatchTagValue" }}

3. 打开命令提示符,然后运行以下 AWS CLI 命令:

$ aws robomaker start-simulation-job-batch --cli-input-json file://startsimjobbatch.json

要查看模拟作业批处理,请参阅 查看模拟作业批处理 (p. 122)。

查看模拟作业批处理您可以查看有关模拟作业批处理的信息,包括有关该批处理中的模拟作业请求的详细信息。

查看模拟作业批处理的详细信息

请按照以下选项卡之一中的步骤进行操作:

Using the console

1. 登录到 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航窗格中,选择 Simulations (模拟),然后选择 Simulation job batches (模拟作业批处理)。3. 选择模拟作业批处理的 Id 以查看其详细信息。

Using the AWS CLI

Example

下面是一个示例 AWS CLI 命令,它执行的操作与在另一个选项卡中基于控制台的查看模拟作业等效。

$ aws robomaker list-simulation-job-batches$ aws robomaker describe-simulation-job-batch --job my-simulation-job-batch-arn

取消模拟作业批处理您可以取消正在运行且不再需要的模拟作业。

取消模拟作业

请按照以下选项卡之一中的步骤进行操作:

Using the console

1. 登录到 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航窗格中,选择 Simulations (模拟),然后选择 Simulation job batches (模拟作业批处理)。3. 选择要取消的模拟作业批处理的 Id。

122

Page 131: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南克隆模拟作业批处理

4. 在 Simulation job batch detail (模拟作业批处理详细信息) 页面中的 Batch actions (批处理操作) 下,选择 Cancel batch (取消批处理)。

5. 在 Cancel simulation job batch (取消模拟作业批处理) 页面中,选择 Cancel (取消)。

Using the AWS CLI

Example

下面是一个示例 AWS CLI 命令,它执行的操作与在另一个选项卡中基于控制台的取消模拟作业批处理等效。

$ aws robomaker list-simulation-job-batches$ aws robomaker cancel-simulation-job-batch --job my-simulation-job-batch-arn

克隆模拟作业批处理可以通过克隆现有批处理来启动新的模拟作业批处理。在进行克隆时,可以包含所有模拟作业请求或选择一部分请求。

要克隆模拟作业批处理,请执行以下操作:

1. 登录到 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航窗格中,选择 Simulations (模拟),然后选择 Simulation job batches (模拟作业批处理)。3. 选择要克隆的模拟作业批处理的 Id。4. 要克隆整个批处理,请在 Simulation job batch detail (模拟作业批处理详细信息) 页面中的 Batch actions

(批处理操作) 下,选择 Clone batch (克隆批处理)。

要克隆批处理中的特定模拟作业请求,请在 Simulation job requests (模拟作业请求) 下,选择要克隆的模拟作业请求,再选择 Request actions (请求操作),然后选择 Clone request (克隆请求)。

5. 在 Clone simulation job batch (克隆模拟作业批处理) 页面中,选择 Submit (提交)。

模拟工具AWS RoboMaker 提供了 Gazebo、rqt、rviz 和终端访问权限以便与正在运行的模拟作业进行交互。

模拟工具已配置为在模拟作业中运行的每个应用程序。每个工具都在一个应用程序的上下文中运行。采购相关的模拟应用程序包,以设置ROS工作区。例如,如果您正在运行robot应用程序和模拟应用程序,RQT、RVIZ和终端工具将使用您的Robot应用程序捆绑包和Gazebo客户端来采购,并且将使用您的模拟应用捆绑包来采购其他终端。

常见任务包括:

• 暂停正在运行的模拟 (p. 124)• 视图节点图 (p. 126)• 查看机器人传感器数据 (p. 126)• 检查 ROS 主题和消息 (p. 127)

用于创建模拟的 IAM 用户或角色将自动拥有访问模拟工具的权限。如果使用不同的用户或角色,则该用户或角色应具有 robomaker:CreateSimulationJob 权限。

您可以在“模拟详细信息”页面的“应用”部分访问模拟工具。

123

Page 132: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南GZClient

主题• GZClient (p. 124)• rqt (p. 125)• rviz (p. 126)• Terminal (p. 127)

GZClient借助 Gazebo,您可以使用机器人、地形和其他物体构建 3D 世界。它还具有用于对照明、重力和其他力进行建模的物理引擎。机器人开发人员使用 Gazebo 在不同的场景中评估和测试机器人,其速度通常比使用物理机器人和场景的速度快很多倍。利用 Gazebo,还可以更轻松地测试机器人的其他方面,如错误处理、电池寿命、导航和机器学习算法。

要执行以下任务,GZClient必须打开并连接到运行的模拟作业。您可以从 模拟职位详情 运行模拟作业页面。

主题• 暂停正在运行的模拟 (p. 124)• 在模拟中查看机器人和物体 (p. 124)• 在模拟中添加和移动物体 (p. 124)• 对机器人和物体应用力 (p. 125)

暂停正在运行的模拟您可以通过选择暂停图标,暂停在GZClient中运行的模拟。它位于左侧的世界渲染下。

当暂停正在运行的模拟时,它将在其他模拟工具(例如 rqt 和 rviz)中暂停。这对于在某个时刻调查模拟数据非常有用。例如,使用 rqt 检查机器人上装载的视频摄像机中的图像数据。

在模拟中查看机器人和物体打开GzClient时,它会显示模拟世界的视图。初始远景由模拟应用程序开发人员配置。

1. 在 GZClient,使用鼠标或键盘探索世界。放大、平移和围绕世界移动。2. 切换到正交(或远景)摄像机角度。在菜单中,选择 Camera (摄像机),然后选择 Orthographic (正

交)(或 Perspective (远景))。通过选择 Reset View Angle (重置视角) 来重置摄像机。3. 选择替代视图以不同方式查看物体。例如,选择 View (视图),然后选择 Wireframe (线框) 以查看渲染为

线框的世界。4. 可以轻松地将世界重置为其原始配置。选择 Edit (编辑),然后选择 Reset World (重置世界)。选择 Reset

Model Poses (重置模型姿势) 将更改恢复到模型姿势。

在模拟中添加和移动物体GZClient包括一系列可用于创建环境的模型。可以将物体放置在环境中,移动物体并设置物体的姿势以满足场景的需求。

1. 在 GZClient,在左侧,选择 插入 选项卡。2. 在 Insert (插入) 选项卡中,选择 Bookshelf,然后将光标移至房间。在移入房间时,您将看到书架模

型。单击鼠标左键以将其放置在房间中。3. 通过选择转换模式来移动书架。选择菜单中的Multi-ArrowPlus图标或使用键盘快捷方式 Control-T。

选择书架,然后将其移至新位置,然后单击鼠标按钮。

124

Page 133: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南rqt

4. 按 Escape 退出转换模式。选择书架,然后在 World (世界) 选项卡中,展开 Pose (姿势) 以查看不同的姿势设置。选择一个值,然后使用向上和向下选择器一次更改一个增量。Gazebo 在每次单击后都会更新世界。

对机器人和物体应用力在物理世界中,事情并不总是按计划进行。在操作过程中,机器人可能会受到意外的力和干扰。物体可能会翻滚、旋转,并与邻近的物体或机器人本身发生交互。使用 Gazebo,您可以通过在模拟过程中对模型应用力和/或扭矩来创建干扰。

本示例使用HelloWorldRobot样本 开始使用 AWS RoboMaker (p. 9) 样本。这些原则适用于非静态机器人和物体。标记为静态的实体仅具有碰撞几何体。

1. 在 GZClient,验证模拟是否正在运行。模拟必须处于运行状态以查看物体响应力和扭矩的方式。2. 在左侧的 World (世界) 选项卡中,展开 turtlebot3_waffle_pi。右键单击 wheel_left_link,然后选择 Apply

Force/Torque (应用力/扭矩)。3. 下方 力量,指定 X 价值 1000。使用鼠标或键盘移动底层视图,使机器人处于视图状态,然后选择 应用

力量. 机器人主要按逆时针方向旋转。

选择 Clear (清除),然后选择 Apply Force (应用力) 以移除力。4. 现在,在 Y 轴上应用足够的扭矩以使机器人倒置。下方 扭矩,指定 Y 价值 400。确保Robot处于视图状

态,然后选择 应用扭矩. 机器人将翻转过来。选择 Apply Torque (应用扭矩),它将垂直翻滚。

选择 Clear (清除),然后选择 Apply Torque (应用扭矩) 以移除扭矩。选择 Cancel (取消) 以关闭对话框。

5. 不要尝试向物体应用力。在左侧的 World (世界) 选项卡中,右键单击 ChairA_01_001,然后选择 ApplyForce (应用力)。使用鼠标或键盘以确保椅子处于视图中。

6. 在 Force (力) 下,指定 Z 值 50000,然后选择 Apply Force (应用力)。椅子将离开地面,然后恢复静止状态。

选择 Clear (清除),然后选择 Apply Force (应用力) 以移除力。选择 Cancel (取消) 以关闭对话框。

rqtrqt 托管了许多不同的插件,这些插件用于可视化 ROS 信息。可以在自定义控制面板上显示多个插件,从而提供机器人的独特视图。rqt 包含许多有用的插件,并提供了用于编写自定义插件的框架。

要执行以下任务,rqt 必须打开并连接到正在运行的模拟作业。您可以从正在运行的模拟作业的 Simulationjobs detail (模拟作业详细信息) 页面打开 rqt。

主题• 查看来自机器人的图像数据 (p. 125)• 视图节点图 (p. 126)• 查看当前通告的主题 (p. 126)

查看来自机器人的图像数据rqt 提供了一个插件来帮助可视化来自机器人的图像数据。当机器人在模拟世界中移动时,图像数据将会更新。

1. 在 rqt 中,选择 Plugins (插件)、Visualization (可视化) 和 Image View (图像视图)。2. 在 Image View (图像视图) 视图中,从下拉列表中选择 /camera/rgb/image_raw。要暂停模拟,请参阅暂

停正在运行的模拟 (p. 124)。

125

Page 134: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南rviz

视图节点图节点图是应用程序中所有 ROS 节点和主题的可视化表示。方向箭头指示哪些节点(椭圆)正在广告或订阅主题(正方形)。您可以筛选图表以仅显示所有主题、活动主题或节点。还提供了用于隐藏或显示组、主题和节点信息的选项。

图节点视图有助于验证哪些节点正在运行,并确认节点和主题是否按预期连接。

查看节点图

1. 在 rqt 中,依次选择 Plugins (插件)、Introspection (自检) 和 Node Graph (节点图)。2. 使用鼠标或键盘来放大图表。选择节点或主题以查看订阅(紫色箭头)和广告(绿色箭头)。3. 筛选器默认为 Nodes only (仅节点)。选择 Nodes/Topics (all) (节点/主题 (全部)) 以查看所有节点和主

题。启用/禁用各个复选框以显示其他信息,例如无法访问的节点或失效的接收器。

查看当前通告的主题利用 Topic Monitor (主题监控) 插件,可以轻松查看有关 ROS 主题的信息,包括发布者、订阅者和发布速率以及 ROS 消息。它还有助于验证消息数据、标识不发布消息的节点以及查找带宽问题。

监控主题

1. 在 rqt 中,依次选择 Plugins (插件)、Topics (主题) 和 Topic Monitor (主题监控)。2. 使用鼠标或键盘滚动当前通告的主题的列表。展开主题以查看消息详细信息。3. 选中已展开的主题左侧的复选框以订阅其消息。当新消息到达时,消息数据、消息带宽和发布频率将进

行更新。

rvizrviz 是适用于 ROS 应用程序的三维可视化工具。它提供机器人模型的视图、从机器人传感器中截取传感器信息以及回放截取的数据。它可以显示来自摄像机、激光器、3D 和 2D 设备的数据(包括图片和点云)。

要执行以下任务,rviz 必须打开并连接到正在运行的模拟作业。您可以从正在运行的模拟作业的 Simulationjobs detail (模拟作业详细信息) 页面打开 rviz。

主题• 查看机器人传感器数据 (p. 126)

查看机器人传感器数据机器人通常具有用于从世界收集数据的传感器。例如,机器人可以使用传感器来检测与物体或激光扫描仪的碰撞,以了解周围环境中的物体。

1. 在 rviz 中,选择 File (文件),然后选择 Open Config (打开配置)。在对话框中,导航至robomaker/workspace/bundle-store/GUID/opt/ros/$ROS_DISTRO/share/turtlebot3_description/rviz。选择 model.rviz 然后选择 打开. 无论您选择哪个 GUID 目录都没有关系。

如果系统提示有未保存的更改,请选择 Discard (放弃)。2. 在显示器中,激光扫描数据显示为红点。以机器人为中心的红点线可以识别墙壁和其他物体。只有当虚

拟世界中有物体时才能看到激光扫描。3. 打开 Gazebo。将 Gazebo 中机器人的位置和方向与激光扫描检测到的位置和方向进行比较。4. 在 Gazebo 中,在机器人旁边放置一个球体。在 rviz 中,激光扫描可检测到物体的一部分。

126

Page 135: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南Terminal

Terminal终端GUI工具可以使用命令行的ROS命令来探索模拟。您可以访问模拟中运行的每个应用程序的终端。将采购应用程序的捆绑包来设置ROS工作区。您可以在“模拟作业详细信息”页面的“机器人或模拟应用”部分访问应用程序终端工具。

要执行以下任务,终端必须打开并连接到正在运行的模拟作业。您可以从正在运行的模拟作业的 Simulationjobs detail (模拟作业详细信息) 页面打开终端。

Note

不支持在终端窗口中启动 GUI 应用程序。

主题• 检查 ROS 主题和消息 (p. 127)• 检查 ROS 节点和服务 (p. 127)• 实时查看日志文件 (p. 127)

检查 ROS 主题和消息使用 rostopic 显示有关 ROS 主题的信息。有关 rostopic 的更多信息,请参阅 http://wiki.ros.org/rostopic。

1. 在 终端,键入以下命令以查看可用主题列表:

rostopic list

2. 使用以下命令查看与列出的主题关联的消息:

rostopic echo /topic_name

检查 ROS 节点和服务使用 rosnode 显示有关 ROS 节点和服务的信息。有关 rosnode 的更多信息,请参阅 http://wiki.ros.org/rosnode。

1. 在 终端,键入以下命令以查看可用主题列表:

rosnode list

2. 使用以下命令查看与列出的主题关联的消息:

rostopic info /node_name

实时查看日志文件日志文件写入 tmp/robot-logs/stdout_and_stderror 和 tmp/simulation-logs/stdout_and_stderror。例如,要查看robot应用程序日志的最后一部分,请使用以下命令:

tail -f /tmp/robot-logs/stdout_and_stderror

127

Page 136: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南部署机器人应用程序

队列管理本节包含有关处理机器人、队列和部署的信息。

主题• 部署机器人应用程序 (p. 128)• 管理机器人 (p. 129)• 管理队列 (p. 132)• 管理部署 (p. 134)

部署机器人应用程序要将机器人应用程序部署到物理机器人,必须将物理机器人配置为接收部署并属于队组。要进行部署,请至少执行以下操作:

1. 创建一个机器人应用程序,其中包含机器人架构的源。支持的架构为 X86_64、ARM64 和 ARMHF。2. 在 AWS RoboMaker 中创建机器人并为其配置 AWS IoT Greengrass,使机器人能够接收部署。AWS

RoboMaker 使用 AWS IoT Greengrass 来部署机器人应用程序。每个机器人有一个 AWS IoT Greengrass组,该组的内部具有一个 AWS IoT Greengrass 核心。

如果您的机器人应用程序使用 AWS RoboMaker 云扩展 或其他 AWS 服务,则为机器人应用程序授予访问这些服务的权限。

3. 在队组中注册机器人。队组是机器人的逻辑分组,具有由机器人应用程序定义的共享功能。4. 创建部署以将机器人应用程序安装到队组。选择机器人应用程序版本、自定义启动配置(包括启动前和启

动后操作)并指定部署机器人应用程序的方式。5. 监控部署。您可以在 deployment details (部署详细信息) 中跟踪部署的进度和其他信息。通过使用 AWS

RoboMaker 云扩展 自定义机器人应用程序以提供其他信息。

您可以了解如何在开始使用 AWS RoboMaker (p. 9)中执行这些步骤。

Note

如果您在机器人上的 Docker 容器内运行 AWS IoT Greengrass,AWS RoboMaker 则不支持无线部署。

如何部署机器人应用程序将机器人应用程序部署到物理机器人时,AWS RoboMaker 执行以下操作:。

1. AWS RoboMaker 在您的账户中创建或更新自定义 Lambda。Lambda 包含部署所需使用的逻辑。这包括机器人应用程序包下载、ROS 启动、预检查和后期检查,以及其他逻辑。

2. AWS RoboMaker 使用在部署配置中指定的并行化进程开始部署到队列中。3. AWS RoboMaker 通知 AWS IoT Greengrass 在目标机器人上运行自定义 Lambda。在机器人上运行的守

护程序将接收命令并运行 Lambda。如果收到命令时 Lambda 正在运行,该 Lambda 以及机器人上的所有ROS 进程都将终止。

128

Page 137: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南管理机器人

4. Lambda 从 Amazon S3 下载并解压缩机器人应用程序包。如果指定了预启动脚本,则运行该脚本。然后,Lambda 使用指定的启动文件和程序包启动 ROS。如果指定了启动后脚本,该脚本将在启动 ROS 后运行。最后,将更新部署的状态。

管理机器人在本节中,您将了解如何创建和删除机器人。

主题• 创建机器人 (p. 129)• 删除机器人 (p. 131)

创建机器人您必须先配置机器人硬件,然后才能部署机器人应用程序。在创建机器人时,您需要为 AWS IoTGreengrass 选择硬件架构和 IAM 角色。创建机器人之后,下载 AWS IoT Greengrass 内核和安全资源,然后配置机器人硬件。

主题• 创建部署角色 (p. 129)• 创建机器人 (p. 130)

创建部署角色创建机器人之后,为机器人应用程序部署创建 IAM 角色。该角色还由 AWS RoboMaker 用来访问 AmazonS3 等资源(机器人应用程序在部署之前的放置位置),并由机器人应用程序用来访问所使用的资源,例如Amazon Lex 或 Amazon Rekognition。

如果您已创建这些角色,请跳至创建机器人 (p. 130)。

创建 AWS IoT Greengrass 角色

1. 登录 AWS 管理控制台 并通过以下网址打开 AWS Identity and Access Management 控制台:console.aws.amazon.com/iam。

2. 创建访问策略。在左侧,选择 Policies (策略),然后选择 Create policy (创建策略)。选择 JSON,然后粘贴以下代码:

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "robomaker:UpdateRobotDeployment" ], "Resource": "*" }, { "Effect": "Allow", "Action": [ "s3:List*", "s3:Get*" ], "Resource": ["arn:aws:s3:::my-robot-application-source-bucket/*"] }

129

Page 138: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南创建机器人

]}

选择 Review policy (查看策略),键入 Name (名称),然后选择 Create policy (创建策略)。3. 选择 Role,然后选择 Create role。4. 在 创建角色: 步骤1 页面,选择 格林草格 然后选择 下一步: Permissions (权限)5. 在 权限 页面,选择您在上面创建的策略,然后选择 下一步: 标签6. 在 添加标签 页面,向角色添加可选标签,然后选择 下一步: 审核7. 在 Review (查看) 页面上,键入 Role name (角色名称),然后选择 Create role (创建角色)。8. 接下来,更新策略以包括 AWS Lambda。选择新角色,然后选择 Trust relationships (信任关系) 选项

卡。9. 在 Trust relationship (信任关系) 选项卡中,选择 Edit trust relationship (编辑信任关系)。10. 使用以下策略文档更新信任关系:

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": [ "lambda.amazonaws.com", "greengrass.amazonaws.com" ] }, "Action": "sts:AssumeRole" } ]}

11. 选择 Update Trust Policy (更新信任策略)。

创建机器人要创建机器人,请执行以下操作:

1. 登录到 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航窗格中,选择 Fleet Management (队列管理),然后选择 Robots (机器人)。3. 选择 Create robot (创建机器人)。4. 在 Create robot (创建机器人) 页面上,键入机器人的 name (名称)。5. 选择机器人的 Architecture (架构)。6. 在 AWS IoT Greengrass group defaults (AWS IoT Greengrass 组默认值) 下,选择 Create new (新建)

为机器人创建新的 AWS IoT Greengrass 组。(可选)用户可以选择现有 AWS IoT Greengrass 组。每个机器人必须具有其自己的 AWS IoT Greengrass 组。

如果您使用现有 AWS IoT Greengrass 组,则它必须具有与之关联的 IAM 角色。要创建该角色,请参阅创建部署角色 (p. 129)。

7. (可选)修改 Greengrass prefix (Greengrass 前缀)。此字符串附加到代表您创建的 AWS IoTGreengrass 对象。

8. 选择 IAM role (IAM 角色) 以分配到为机器人创建的 AWS IoT Greengrass 组。它授予 AWS IoTGreengrass 权限,用于访问 Amazon S3 中的机器人应用程序并从 AWS RoboMaker 读取更新状态。

9. (可选)对于 Tags (标签),为机器人指定一个或多个标签。标签是一些充当元数据的词和短语,用于标识和组织 AWS 资源。每个标签均包含一个键 和一个值。您可在 Robot details (机器人详细信息) 页面上管理机器人的标签。

130

Page 139: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南删除机器人

部署机器人应用程序时,您的标签可以作为机器人上的环境变量填充。标签只能包含字母数字字符或下划线字符。环境变量名称将格式化为 AWS_ROBOMAKER_ROBOT_TAG_KEY_TAGKEY,其中 TAGKEY 是您的标签键。标签值将是环境变量值。

有关标记的更多信息,请参阅标记您的 AWS RoboMaker 资源 (p. 162)。10. 选择创建。11. 在 Download your Core device (下载您的核心设备) 页面上,选择 Download (下载) 以下载并存储机器

人的安全资源。12. 下载与您物理机器人的架构匹配的 AWS IoT Greengrass 核心软件。配置并运行 AWS IoT Greengrass

核心软件,请遵循步骤 模块1: Greengrass环境设置. 然后,按照在核心设备上启动 AWS Greengrass 中的步骤操作。

有关如何验证设备支持的更多信息 AWS IoT Greengrass,参见 https://docs.aws.amazon.com/greengrass/latest/developerguide/device-tester-for-greengrass-ug.htmlAWSIot设备测试仪,适用于AWSIotGreengrass。

使用以下命令解压缩安全资源:

$ sudo unzip RobotName-setup.zip -d /greengrass

删除机器人当您不再需要某个机器人时,可以删除它。您可以删除已取消注册或注册到队列中的机器人,即使队列上有活动的部署。

AWS RoboMaker 为机器人创建的 AWS IoT Greengrass 组和其他资产不删除。您可以创建新机器人并重用组。要删除 AWS IoT Greengrass 资源,请使用 https://console.aws.amazon.com/iot/。

删除机器人

请按照以下选项卡之一中的步骤进行操作。

Using the console

1. 登录到 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航窗格中,选择 Fleet Management (队列管理),然后选择 Robots (机器人)。3. 选择要删除的机器人,然后选择 Delete (删除)。

Note

要删除基础 AWS IoT Greengrass 组和资源,请使用 https://console.aws.amazon.com/iot/。

Using the AWS CLI

Example

下面是一个示例 AWS CLI 命令,它执行的操作与在另一个选项卡中基于控制台的删除机器人等效。

Note

要删除基础 AWS IoT Greengrass 组和资源,请使用 https://console.aws.amazon.com/iot/。

131

Page 140: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南管理队列

$ aws robomaker delete-robot --robot my-robot-application-arn

管理队列队列是一组机器人。当您准备好将机器人应用程序部署到机器人时,这些机器人必须是队列的一部分。

主题• 创建队列 (p. 132)• 注册和取消注册机器人 (p. 132)• 删除队列 (p. 133)

创建队列要创建队列,请按照以下选项卡之一中的步骤进行操作:

Using the console

1. 登录 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航窗格中,选择 Fleet Management (队列管理),然后选择 fleets (队列)。3. 选择 Create fleet (创建队列)。4. 在 Create fleet (创建机群) 页面上,键入机群的 name (名称)。5. (可选)对于 Tags (标签),为机群指定一个或多个标签。标签是一些充当元数据的词和短语,用于

标识和组织 AWS 资源。每个标签都包含一个键和一个值。您可在 Fleet details (机群详细信息) 页面上管理机群的标签。

有关标记的更多信息,请参阅标记您的 AWS RoboMaker 资源 (p. 162)。6. 单击 Create (创建) 以创建部署任务。

Using the AWS CLI

Example

下面是一个示例 AWS CLI 命令,它执行的操作与在另一个选项卡中基于控制台的队列创建等效。

$ aws robomaker create-fleet --name my-fleet

注册和取消注册机器人您可以在队列中注册(添加)和取消注册(移除)机器人。如果您希望从队列中移除机器人以进行维护,或者希望将机器人从一个队列移动到另一个队列,这会非常有用。

一个机器人只能注册到一个队列。

注册机器人要将机器人注册到队列,请按照以下选项卡之一中的步骤进行操作:

132

Page 141: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南删除队列

Using the console

1. 登录 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航窗格中,选择 Fleet Management (队列管理),然后选择 Fleets (队列)。3. 选择要修改的队列的 Name (名称)。4. 在 Fleet details (队列详细信息) 页面上,选择 Register (注册)。5. 在 Register Robots (注册机器人) 页面上,选择您想要注册的机器人,然后选择 Register robots (注

册机器人)。

Using the AWS CLI

Example

下面是一个示例 AWS CLI 命令,它执行的操作与在另一个选项卡中基于控制台的机器人注册等效。

$ aws robomaker register-robot --fleet my-fleet-arn --robot my-robot-arn

取消注册机器人要取消注册机器人,请按照以下选项卡之一中的步骤进行操作:

Using the console

1. 登录 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航窗格中,选择 Fleet Management (队列管理),然后选择 Fleets (队列)。3. 选择要修改的队列的 Name (名称)。4. 在 Fleet details (队列详细信息) 页面上,选择您想要取消注册的机器人,然后选择 Deregister (取消

注册)。

Using the AWS CLI

Example

下面是一个示例 AWS CLI 命令,它执行的操作与在另一个选项卡中基于控制台的机器人取消注册等效。

$ aws robomaker deregister-robot --fleet my-fleet-arn --robot my-robot-arn

删除队列当您不再需要某个队列时,可以删除它。执行此操作时,注册到该队列的机器人将取消注册。

删除队组

请按照以下选项卡之一中的这些步骤进行操作:

Using the console

133

Page 142: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南管理部署

1. 登录 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航窗格中,选择 Fleet Management (队列管理),然后选择 Fleets (队列)。3. 选择要删除的队列,然后选择 Delete (删除)。

Using the AWS CLI

Example

下面是一个示例 AWS CLI 命令,它执行的操作与在另一个选项卡中基于控制台的队列删除等效。

$ aws robomaker delete-fleet --fleet my-fleet-arn

管理部署在 AWS RoboMaker 中,使用部署作业交付机器人应用程序并将该应用程序安装到物理机器人队列中。机器人应用程序必须针对物理机器人支持的架构(例如,ARMHF)生成。

您可以设置机队和机器人部署超时。默认机队超时为30天。默认机器人部署超时为5小时。例如,如果您的机队中有100台机器人,而您按顺序向他们部署,而机器人超时为7天,则部署可能需要700天。 AWS RoboMaker将在第30天(默认机队超时)时暂停部署。

主题• 有条件部署 (p. 134)• 创建部署作业 (p. 135)• 查看部署作业 (p. 136)

有条件部署使用部署作业下载机器人应用程序,并将该应用程序安装到队列中的机器人上。在安装新版本的机器人应用程序后,机器人正在执行的任何任务都将会停止。您可以使用下载条件文件,验证机器人是否已准备好下载并安装新的机器人应用程序。

下载条件文件是一个脚本,在下载新部署之前在机器人上运行。如果脚本退出并返回 0,则表示验证成功,并且可以继续在机器人上部署。如果脚本退出并返回 1,则不会下载部署,并且安装将会失败。

Note

要使用下载条件文件,您必须已在机器人上安装 AWS IoT Greengrass Core 版本 1.9.4 或更新版本。

使用以下脚本作为您的下载条件文件的模板:

#!/bin/bash# sample command as condition result# for example, you could check to see if the robot is in a# charging station or other suitable spot for a deploymentconditionalScriptPass=`<Condition_Verification_Commands>`if [[ ! -z "$conditionalScriptPass" ]]; then #condition pass echo succeeded exit 0else

134

Page 143: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南创建部署作业

#condition failed echo failed exit 1fi

下载条件文件已下载到 /home/gcc_user/roboMakerDeploymentPackage/MyS3KeyName。如果 /home/gcc_user/ 目录不存在,它下载到 /tmp/roboMakerDeploymentPackage。如果机器人上存在现有下载条件文件,则在下次部署时将被覆盖。在机器人重新引导或重新启动期间,也会忽略该文件。

创建部署作业创建部署作业,用于在队列中的机器人上安装机器人应用程序的唯一版本。您可以定义自定义环境变量并在机器人上启动应用程序之前和之后运行脚本,用于执行额外的配置。

您可以设置机队和机器人部署超时。默认机队超时为30天。默认机器人部署超时为5小时。例如,如果您的机队中有100台机器人,而您按顺序向他们部署,而机器人超时为7天,则部署可能需要700天。 AWS RoboMaker将在第30天(默认机队超时)时暂停部署。

有关 AWS RoboMaker 如何部署机器人应用程序的更多详细信息,请参阅如何部署机器人应用程序 (p. 128)。

Note

90 天之后,部署任务将过期并删除。这些任务无法再访问。

创建部署作业Using the console

要创建部署作业,请执行以下操作:

1. 登录到 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航窗格中,选择 Fleet Management (队列管理),然后选择 Deployments (部署)。3. 单击 Create deployment (创建部署)。4. 在 Create deployment (创建部署) 页面的 Configuration (配置) 下,选择 Fleet (队列)。5. 选择 Robot application (机器人应用程序)。6. 选择要部署的 Robot application version (机器人应用程序版本)。考虑到一致性原因,机器人应用程

序必须具有编号的 applicationVersion。如果没有列出版本,或者要创建新版本,请参阅创建机器人应用程序版本 (p. 47)。

7. 在 Deployment launch config (部署启动配置) 下,指定 Package name (软件包名称)。8. 指定 Launch file (启动文件)。9. (可选)指定应用程序的 Prelaunch file (启动前文件)。这是一个 ROS 启动文件之前运行的脚本。

它可用于检查机器人环境或其他任务。脚本的非零退出将导致机器人部署失败。

该脚本应复制到 $CATKIN_GLOBAL_SHARE_DESTINATION。

例如,将以下配置添加到 CMakeLists.txt 命令:

install(FILES deploymentScripts/post_launch_script.sh DESTINATION ${CATKIN_GLOBAL_SHARE_DESTINATION})

10. (可选)指定应用程序的 Postlaunch file (启动后文件)。这是在启动 ROS 进程之后运行的脚本。它可用于检查机器人环境或其他任务。脚本的非零退出将导致机器人部署失败。

135

Page 144: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南查看部署作业

该脚本应复制到 $CATKIN_GLOBAL_SHARE_DESTINATION。11. (可选)在 Environment variables (环境变量) 中,键入环境 Name (名称) 和 Value (值)。环境变量

名称必须以字母 A-Z 或下划线开头并包括 A-Z、0-9 和下划线。保留以“AWS”开头的名称。

选择 Add environment variable (添加环境变量) 来创建额外的环境变量。12. 在 Deployment config (部署配置) 下,指定 Concurrent deployment percentage (并发部署百分

比)。AWS RoboMaker 按百分比将机器人应用程序并发部署到队列。如果您在队列中有 200 个机器人并选择了 10%,将同时在 20 个机器人上尝试部署。

13. 指定 Failure threshold percentage (失败阈值百分比)。如果队列中出现故障的部署达到此百分比,则部署将停止。

Warning

指定大于并发部署百分比的失败阈值百分比,以确保在达到阈值时部署停止。如果该值较小,则阈值可能会超过并发部署百分比。

14. 指定 Robot deployment timeout (机器人部署超时)。如果在指定的时间量之前未完成,将停止部署到单个机器人。

15. (可选)在 S3 中提供下载条件文件。该文件是一个脚本,可供您用来验证机器人是否准备好下载和安装部署。例如,您可以检查机器人是否在充电站中,并且未在执行任务(例如飞行中或移动中的物体)。

16. (可选)您可以将 S3 文件锁定到最新的 etag。实体标签是 Amazon S3 对象的哈希,它反映了对文件内容的更改,而不是对元数据的更改。选中此项后,AWS RoboMaker 将确保在部署期间使用版本。

17. (可选)对于 Tags (标签),为部署指定一个或多个标签。标签是一些充当元数据的词和短语,用于标识和组织 AWS 资源。每个标签均包含一个键 和一个值。您可在 Deployment details (部署详细信息) 页面上管理部署的标签。

部署机器人应用程序时,您的标签可以作为机器人上的环境变量填充。标签只能包含字母数字字符或下划线字符。环境变量名称将格式化为 AWS_ROBOMAKER_ROBOT_TAG_KEY_TAGKEY,其中TAGKEY 是您的标签键。标签值将是环境变量值。

有关标记的更多信息,请参阅标记您的 AWS RoboMaker 资源 (p. 162)。18. 单击 Create (创建) 以创建部署任务。

Using the AWS CLI

Example

以下是创建部署作业的示例 AWS CLI 命令。

$ aws robomaker create-deployment-job --fleet=my-fleet-arn --deployment-application-configs application=my-robotarn,applicationVersion="$LATEST",launchConfig={packageName="cloudwatch_robot",launchFile="cloudwatch_deploy.launch"} --deployment-config concurrentDeploymentPercentage="100",failureThresholdPercentage="100"

查看部署作业部署作业创建之后,您可以查看其详细信息并跟踪部署状态。

查看部署作业的详细信息

请按照以下选项卡之一中的步骤进行操作。

136

Page 145: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南查看部署作业

Using the console

1. 登录到 AWS RoboMaker 控制台 (https://console.aws.amazon.com/robomaker/)。2. 在左侧导航窗格中,选择 Fleet management (队列管理),然后选择 Deployments (部署)。3. 单击部署作业的 ID 可查看作业的详细信息,包括创建该作业的时间和机器人应用程序版本、部署状

态以及队列中各个机器人的状态。

Using the AWS CLI

Example

下面是一个示例 AWS CLI 命令,它执行的操作与在另一个选项卡中基于控制台的查看部署作业等效。

$ aws robomaker list-deployment-jobs$ aws robomaker describe-deployment-job --job my-deployment-job-arn

137

Page 146: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南数据保护

安全性本节提供有关保护 AWS RoboMaker 的各个方面的指南。

主题• AWS RoboMaker 中的数据保护 (p. 138)• AWS RoboMaker 的身份验证和访问控制 (p. 138)• AWS RoboMaker 中的日志记录和监控 (p. 157)• 安全合规性 (p. 160)• AWS RoboMaker 中的弹性 (p. 161)• AWS RoboMaker 中的基础设施安全性 (p. 161)

AWS RoboMaker 中的数据保护AWS 责任共担模式适用于 AWS RoboMaker 中的数据保护。如该模式中所述,AWS 负责保护运行所有AWS 云的全球基础设施。您负责维护对托管在此基础设施上的内容的控制。此内容包括您所使用的 AWS 服务的安全配置和管理任务。有关数据隐私的更多信息,请参阅数据隐私常见问题。 有关欧洲数据保护的信息,请参阅 AWS 安全性博客 上的 AWS 责任共担模式和 GDPR 博客文章。

出于数据保护目的,我们建议您保护 AWS 账户凭证并使用 AWS Identity and Access Management (IAM) 设置单独的用户账户。这仅向每个用户授予履行其工作职责所需的权限。我们还建议您通过以下方式保护您的数据:

• 对每个账户使用 Multi-Factor Authentication (MFA)。• 使用 SSL/TLS 与 AWS 资源进行通信。建议使用 TLS 1.2 或更高版本。• 使用 AWS CloudTrail 设置 API 和用户活动日志记录。• 使用 AWS 加密解决方案以及 AWS 服务中的所有默认安全控制。• 使用高级托管安全服务(例如 Amazon Macie),它有助于发现和保护存储在 Amazon S3 中的个人数据。• 如果在通过命令行界面或 API 访问 AWS 时需要经过 FIPS 140-2 验证的加密模块,请使用 FIPS 终端节

点。有关可用的 FIPS 终端节点的更多信息,请参阅美国联邦信息处理标准 (FIPS) 第 140-2 版。

我们强烈建议您切勿将敏感的可识别信息(例如您客户的账号)放入自由格式字段(例如 Name (名称) 字段)。这包括使用控制台、API、AWS CLI 或 AWS 开发工具包处理 AWS RoboMaker 或其他 AWS 服务时。您输入到 AWS RoboMaker 或其他服务中的任何数据都可能被选取以包含在诊断日志中。当您向外部服务器提供 URL 时,请勿在 URL 中包含凭证信息来验证您对该服务器的请求。

AWS RoboMaker 的身份验证和访问控制AWS Identity and Access Management (IAM) 是一种 AWS 服务,可以帮助管理员安全地控制对 AWSRoboMaker 资源的访问。管理员使用 IAM 来控制谁可以通过身份验证(登录)和获得授权(有权限)以使用 AWS RoboMaker 资源。IAM 是您的 AWS 账户的一项功能,无需额外付费。

Important

要快速地开始使用,请查看此页面上的介绍性信息,然后参阅 开始使用 IAM (p. 151)。您可以选择通过查看什么是身份验证? (p. 144)、什么是访问控制? (p. 145)和什么是策略? (p. 147)了解有关身份验证和访问控制的更多信息。

138

Page 147: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南授权和访问控制简介

主题

• 授权和访问控制简介 (p. 139)• 所需权限 (p. 139)• 了解 AWS RoboMaker 如何与 IAM 协同工作 (p. 143)• 身份验证和访问控制故障排除 (p. 143)

授权和访问控制简介身份验证 – 要登录到 AWS,您必须使用 IAM 用户凭证、采用 IAM 角色的临时凭证或根用户凭证(不推荐)。要了解有关这些实体的更多信息,请参阅什么是身份验证? (p. 144)。

访问控制 – AWS 管理员使用策略来控制对 AWS 资源(例如 AWS RoboMaker robot application)的访问。要了解更多信息,请参阅什么是访问控制? (p. 145)和什么是策略? (p. 147)。

Important

无论谁创建了某个账户中的资源,所有这些资源都归该账户所有。您必须被授予创建资源的访问权限。但是,仅仅创建资源并不意味着您自动获得对该资源的完全访问权限。管理员必须为您要执行的每个操作明确授予权限。该管理员也可以随时撤销您的权限。

为帮助您了解 IAM 的基础知识,请查看以下术语:

• Resources (资源) – AWS 服务(如 AWS RoboMaker 和 IAM)由称为资源的对象组成。您可以从该服务创建、管理和删除这些资源。IAM 资源包括用户、组、角色和策略。• Users (用户) – IAM 用户表示使用其凭证与 AWS 交互的人员或应用程序。用户由用于登录 AWS 管理控

制台的名称和密码组成,最多可包含用于 AWS CLI 或 AWS API 的两个访问密钥。• Groups (组) – IAM 组是 IAM 用户的集合。您可以使用组为其成员用户指定权限。这使您可以更轻松地

管理多个用户的权限。• Roles (角色) – IAM 角色没有关联的任何长期凭证(密码或访问密钥)。任何需要角色并具有权限的人都

可以代入角色。IAM 用户可担任角色来暂时获得针对特定任务的不同权限。联合身份用户可以通过使用映射到该角色的外部身份提供商来代入角色。有些 AWS 服务可以代入服务角色 来代表您访问 AWS 资源。

• Policies (策略) – 策略是 JSON 策略文档,用于定义它们所附加到的对象的权限。AWS 支持您附加到身份(用户、组或角色)的基于身份的策略。一些 AWS 服务允许您将基于资源的策略 附加到资源,以控制委托人(人员或应用程序)可以对该资源执行的操作。AWS RoboMaker does not support基于资源的策略。

• Identities (身份) – 身份是您可以为其定义权限的 IAM 资源。其中包括用户、组和角色。• Entities (实体) – 实体是您用于进行身份验证的 IAM 资源。其中包括用户和角色。• Principals (委托人) – 在 AWS 中,委托人是使用实体登录 AWS 并向之发出请求的人或应用程序。作为委

托人,您可以使用 AWS 管理控制台、AWS CLI 或 AWS API 来执行操作(如删除 robot application)。这将为该操作创建一个请求。您的请求指定操作、资源、委托人、委托人账户以及有关您的请求的任何其他信息。所有这些信息为 AWS 提供了请求的上下文。AWS 会检查应用于请求上下文的所有策略。AWS 仅在策略允许请求的每个部分时才对该请求进行授权。

要查看身份验证和访问控制流程的图表,请参阅 理解方法 IAM 工作 在 IAM 用户指南. 有关如何 AWS 确定是否允许请求,请参阅 策略评估逻辑 在 IAM 用户指南.

所需权限要使用 AWS RoboMaker 或者管理自己或他人的授权和访问控制,您必须具有正确的权限。

139

Page 148: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南所需权限

使用 AWS RoboMaker 控制台所需的权限要访问 AWS RoboMaker 控制台,您必须具有一组最小权限,以允许您列出和查看有关 AWS 账户中 AWSRoboMaker 资源的详细信息。如果创建比必需的最低权限更为严格的基于身份的权限策略,对于附加了该策略的实体,控制台将无法按预期正常运行。

要完全访问 AWS RoboMaker 控制台,使用 AWSRoboMaker_完全访问 政策。

对于只读访问 AWS RoboMaker 控制台,使用 AWSRoboMakerReadOnlyAccess 政策。

如果 IAM 用户想要创建模拟作业,您需要向该用户授予 iam:PassRole 权限。有关传递角色的更多信息,请参阅授予向 AWS 服务传递角色的用户权限。

例如,您可以将以下策略附加到一个用户。它提供创建模拟作业的权限:

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "iam:PassRole", "Resource": "arn:aws:iam::123456789012:role/S3AndCloudWatchAccess" } ]}

对于仅调用 AWS CLI 或 AWS API 的用户,您不需要允许最低控制台权限。相反,您只需要与您尝试执行的API 操作相匹配的权限。

在中查看世界所需的权限 AWS RoboMaker 在控制台中您可以授予查看 AWS RoboMaker 世界 AWS RoboMaker 控制台,方法是将以下策略附加到用户:

{ "Version": "2012-10-17", "Statement": [ { "Action": [ "robomaker: DescribeWorldForgeImageRedirect " ], "Resource": "*", "Effect": "Allow" } ]}

使用 AWS RoboMaker 模拟工具所需的权限用于创建模拟的 IAM 用户或角色将自动拥有访问模拟工具的权限。如果使用不同的用户或角色,则该用户或角色应具有 robomaker:CreateSimulationJob 权限。

身份验证管理所需的权限要管理自己的凭证(例如密码、访问密钥和多重验证 (MFA) 设备),管理员必须授予您所需的权限。要查看包含这些权限的策略,请参阅允许用户自行管理他们的凭证 (p. 153)。

作为 AWS 管理员,您需要 IAM 的完全访问权限,以便您可以在 IAM 中创建和管理用户、组、角色和策略。您应该使用 AdministratorAccess AWS 管理策略,包括对所有 AWS. 此策略不提供对 AWS Billing and Cost

140

Page 149: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南所需权限

Management控制台的访问权限,也不允许需要根用户凭证的任务。有关更多信息,请参阅 AWS 需要的任务AWS 账户根用户 凭证 在 AWS General Reference.

Warning

只有管理员用户才应具有 AWS 的完全访问权限。除了修改 AWS 中的每个资源之外,拥有此策略的任何人都有权完全管理身份验证和访问控制。要了解如何创建此用户,请参阅创建 IAM 管理员用户 (p. 151)。

访问控制所需的权限如果管理员为您提供了 IAM 用户凭证,则它们会将策略附加到您的 IAM 用户,以控制您可以访问的资源。要在 AWS 管理控制台中查看附加到您的用户的策略,您必须具有以下权限:

{ "Version": "2012-10-17", "Statement": [ { "Sid": "ViewOwnUserInfo", "Effect": "Allow", "Action": [ "iam:GetUserPolicy", "iam:ListGroupsForUser", "iam:ListAttachedUserPolicies", "iam:ListUserPolicies", "iam:GetUser" ], "Resource": [ "arn:aws:iam::*:user/${aws:username}" ] }, { "Sid": "ListUsersViewGroupsAndPolicies", "Effect": "Allow", "Action": [ "iam:GetGroupPolicy", "iam:GetPolicyVersion", "iam:GetPolicy", "iam:ListAttachedGroupPolicies", "iam:ListGroupPolicies", "iam:ListPolicyVersions", "iam:ListPolicies", "iam:ListUsers" ], "Resource": "*" } ]}

如果您需要其他权限,请要求管理员更新策略以允许您访问所需的操作。

对模拟作业所需的权限模拟作业在创建时,必须具有包含以下权限的 IAM 角色。将 my-input-bucket 替换为包含机器人和模拟应用程序捆绑的存储桶的名称。替换 my-output-bucket 以指向 AWS RoboMaker 将输出文件写入到的存储桶。将 account# 替换为您的账号。

{ "Version": "2012-10-17", "Statement": [ { "Action": "s3:ListBucket",

141

Page 150: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南所需权限

"Resource": [ "arn:aws:s3:::my-input-bucket" ], "Effect": "Allow" }, { "Action": [ "s3:Get*", "s3:List*" ], "Resource": [ "arn:aws:s3:::my-input-bucket/*" ], "Effect": "Allow" }, { "Action": "s3:Put*", "Resource": [ "arn:aws:s3:::my-output-bucket/*" ], "Effect": "Allow" }, { "Action": [ "logs:CreateLogGroup", "logs:CreateLogStream", "logs:PutLogEvents", "logs:DescribeLogStreams" ], "Resource": [ "arn:aws:logs:*:account#:log-group:/aws/robomaker/SimulationJobs*" ], "Effect": "Allow" } ]}

该策略必须附加到具有以下信任策略的角色:

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "robomaker.amazonaws.com" }, "Action": "sts:AssumeRole" } ]}

从 ROS 应用程序或 ROS 命令行使用标记所需的权限当模拟作业正在运行时,您可以从 ROS 命令行或 ROS 应用程序中标记、取消标记和列出此作业中的标记。您必须具有拥有以下权限的 IAM 角色。将 account# 替换为您的账号。

有关更多信息,请参阅在模拟作业中管理标记 (p. 108)

{ "Version": "2012-10-17", "Statement": [

142

Page 151: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南AWS RoboMaker 如何与 IAM 协同工作

{ "Action": [ "robomaker:TagResource", "robomaker:UntagResource", "robomaker:ListTagsForResource", ], "Resource": [ "arn:aws:robomaker:*:account#:simulation-job*" ], "Effect": "Allow" } ]}

该策略必须附加到具有以下信任策略的角色:

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "robomaker.amazonaws.com" }, "Action": "sts:AssumeRole" } ]}

了解 AWS RoboMaker 如何与 IAM 协同工作服务可以用几种方式与 IAM 协同工作:

• 操作 – AWS RoboMaker 支持在一个策略中使用多个操作。这允许管理员控制实体是否可以在 AWSRoboMaker 中完成操作。例如,要允许某个实体通过执行 GetPolicy AWS API 操作来查看策略,管理员必须附加允许 iam:GetPolicy 操作的策略。

• 资源级权限 – AWS RoboMaker does not support资源级权限。资源级别权限允许您使用 ARNs 在策略中指定单个资源。 因为 AWS RoboMaker 不支持此功能,则必须选择 所有资源 在 策略视觉编辑器. 在 JSON策略文档中,您必须在 * 元素中使用 Resource。

• 基于资源的策略 – AWS RoboMaker does not support基于资源的策略。基于资源的策略允许您将策略附加到该服务中的资源。基于资源的策略包含 Principal 元素,用于指定可以访问此资源的 IAM 身份。

• 根据标签进行授权 – AWS RoboMaker does support根据标签进行授权 此功能允许您在策略条件中使用资源标签。

• 临时凭证 – AWS RoboMaker supports临时凭证。此功能允许您使用联合身份验证登录、代入 IAM 角色或者代入跨账户角色。您可通过拨打以下电话获取临时安全凭证: AWS STS API操作,如 AssumeRole 或GetFederationToken.

• 服务相关角色 – AWS RoboMaker supports服务角色。此功能允许服务代表您代入服务相关角色。此角色允许服务访问其他服务中的资源以代表您完成操作。服务相关角色显示在您的 IAM 账户中,并由该服务拥有。IAM 管理员可以查看但不能编辑服务相关角色的权限。

• 服务角色 – AWS RoboMaker supports服务角色。此功能允许服务代表您担任服务角色。此角色允许服务访问其他服务中的资源以代表您完成操作。服务角色显示在您的 IAM 账户中,并由该账户拥有。这意味着IAM 管理员可以更改此角色的权限。但是,这可能会中断服务的功能。

身份验证和访问控制故障排除使用以下信息可帮助您诊断和修复在使用 IAM 时可能遇到的常见问题。

143

Page 152: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南什么是身份验证?

主题• 我无权在 AWS RoboMaker 中执行操作 (p. 144)• 我是管理员,并且想要允许其他人访问 AWS RoboMaker (p. 144)• 我想了解 IAM 而不想成为专家 (p. 144)

我无权在 AWS RoboMaker 中执行操作如果您在 AWS 管理控制台中收到错误,告知您无权执行操作,则您必须联系提供了用户名和密码的管理员。

当名为 my-user-name 的 IAM 用户尝试使用控制台执行 CreateRobotApplication 操作但没有权限时,会发生以下示例错误。

User: arn:aws:iam::123456789012:user/my-user-name is not authorized to perform: aws-robomaker:CreateRobotApplication on resource: my-example-robot-application

对于本示例,请要求您的管理员更新您的策略,以允许您使用 aws-robomaker:CreateRobotApplication 操作访问 my-example-robot-application 资源。

我是管理员,并且想要允许其他人访问 AWS RoboMaker要允许其他人访问 AWS RoboMaker,您必须为需要访问权限的人员或应用程序创建 IAM 实体(用户或角色)。他们(它们)将使用该实体的凭证访问 AWS。然后,您必须将策略附加到实体,以便在 AWSRoboMaker 中为这些实体授予正确的权限。

要立即开始,请参阅开始使用 IAM (p. 151)。

我想了解 IAM 而不想成为专家要了解更多有关 IAM 术语、概念和过程的更多信息,请参阅以下页面:

• 什么是身份验证? (p. 144)• 什么是访问控制? (p. 145)• 什么是策略? (p. 147)

什么是身份验证?身份验证是您如何使用您的凭证登录 AWS。

Note

要快速开始,您可以忽略此页面。首先,检查AWS RoboMaker 的身份验证和访问控制 (p. 138)上的介绍性信息,然后参阅 开始使用 IAM (p. 151)。

作为委托人,您必须使用实体(根用户、IAM 用户或 IAM 角色)进行身份验证(登录到 AWS),才能将请求发送到 AWS。IAM 用户可以拥有长期凭证,例如用户名和密码或一组访问密钥。当您代入 IAM 角色时,您将收到临时安全凭证。

要作为用户从 AWS 管理控制台中进行身份验证,您必须使用用户名和密码登录。要从 AWS CLI 或 AWSAPI 进行身份验证,您必须提供访问密钥和私有密钥或临时凭证。AWS 提供开发工具包和 CLI 工具,使用您的凭证以加密方式对您的请求进行签名。如果您不使用 AWS 工具,则必须自行对请求签名。无论使用何种身份验证方法,您可能还需要提供其他安全信息。例如,AWS 建议您使用多重身份验证 (MFA) 来提高账户的安全性。

作为委托人,您可以使用以下实体(用户或角色)登录 AWS:

144

Page 153: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南什么是访问控制?

• AWS 账户根用户 – 当您首次创建 AWS 账户时,最初使用的是一个对账户中所有 AWS 服务和资源有完全访问权限的单点登录身份。此身份称为 AWS 账户 根用户,可使用您创建账户时所用的电子邮件地址和密码登录来获得此身份。强烈建议您不使用 根用户 执行日常任务,即使是管理任务。请遵守仅将 根用户用于创建首个 IAM 用户的最佳实践。然后请妥善保存 根用户 凭证,仅用它们执行少数账户和服务管理任务。

• IAM 用户 – 一种 IAM 用户 是您的 AWS 具有特定权限的帐户。 AWS RoboMaker supports签名版本4,用于认证入站API请求的协议。有关验证请求的更多信息,请参阅 AWS General Reference 中的签名版本 4 签名流程。

• IAM 角色 – 具有临时凭证的 IAM 角色是可在账户中创建的一种具有特定权限的 IAM 身份。AWS 角色类似于 AWS 用户,因为它是一个 IAM 身份,该身份具有确定其在 IAM 中可执行和不可执行的操作的权限策略。但是,角色旨在让需要它的任何人代入,而不是唯一地与某个人员关联。此外,角色没有关联的标准长期凭证(如密码或访问密钥)。相反,当您代入角色时,它会为您提供角色会话的临时安全凭证。 IAM角色在以下情况下很有用:• 联合身份用户访问 – 您也可以不创建 IAM 用户,而是使用来自 AWS Directory Service、您的企业用户

目录或 Web 身份提供商的现有身份。这些用户被称为联合身份用户。在通过身份提供商请求访问权限时,AWS 将为联合身份用户分配角色。有关联合身份用户的更多信息,请参阅 IAM 用户指南 中的联合身份用户和角色。

• 临时用户权限 – IAM 用户可代入角色来暂时获得针对特定任务的不同权限。• 跨账户访问 – 您可以使用 IAM 角色以允许其他账户中的可信任委托人访问您账户中的资源。角色是授予

跨账户访问权限的主要方式。但是,通过某些 AWS 服务,您可将策略直接附加到资源(而不是使用角色作为代理)。AWS RoboMaker does not support这些基于资源的策略。有关选择是使用角色还是基于资源的策略以允许跨账户访问的更多信息,请参阅控制对不同账户中的委托人的访问 (p. 147)。

• AWS 服务访问 – 服务角色是服务代入以代表您执行操作的 IAM 角色。服务角色只在您的账户内提供访问权限,不能用于为访问其他账户中的服务授权。IAM 管理员可以在 IAM 中创建、修改和删除服务角色。有关更多信息,请参阅 IAM 用户指南 中的创建角色以向 AWS 服务委派权限。

• 在 Amazon EC2 上运行的应用程序 –对于在 EC2 实例上运行、并发出 AWS CLI 或 AWS API 请求的应用程序,您可以使用 IAM 角色管理它们的临时凭证。这优先于在 EC2 实例中存储访问密钥。要将 AWS角色分配给 EC2 实例并使其对该实例的所有应用程序可用,您可以创建一个附加到实例的实例配置文件。实例配置文件包含角色,并使 EC2 实例上运行的程序能够获得临时凭证。有关更多信息,请参阅IAM 用户指南 中的使用 IAM 角色向在 Amazon EC2 实例上运行的应用程序授予权限。

什么是访问控制?在您登录(经过身份验证)到 AWS 后,您可以使用策略控制对 AWS 资源和操作的访问。访问控制也称为授权。

Note

要快速开始,您可以忽略此页面。首先,检查AWS RoboMaker 的身份验证和访问控制 (p. 138)上的介绍性信息,然后参阅 开始使用 IAM (p. 151)。

在授权期间,AWS 使用请求上下文中的值来检查应用的策略。然后,它使用策略来确定是允许还是拒绝请求。大多数策略作为 JSON 文档存储在 AWS 中,并指定为委托人允许或拒绝的权限。有关 JSON 策略文档的结构和内容的更多信息,请参阅什么是策略? (p. 147)。

通过使用策略,管理员可以指定哪些用户有权访问 AWS 资源,以及他们可以对这些资源执行哪些操作。每个 IAM 实体(用户或角色)在一开始都没有权限。换而言之,在默认状态下,用户什么都不能做,甚至不能查看自己的访问密钥。要为用户授予执行某些操作的权限,管理员必须将权限策略附加到用户。或者,管理员可以将用户添加到具有所需权限的组中。之后当管理员授予某个组访问权限时,该组内的全部用户都会获得这些访问权限。

您可能使用有效的凭证来对自己的请求进行身份验证,但管理员还必须向您授予权限,您才能创建或访问AWS RoboMaker 资源。例如,您必须明确拥有权限才能创建 AWS RoboMaker robot application。

作为管理员,您可以编写策略来控制对以下各项的访问:

145

Page 154: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南什么是访问控制?

• AWS 委托人 (p. 146) – 控制允许发出请求的人员(委托人)执行哪些操作。• IAM 身份 (p. 146) – 控制可访问哪些 IAM 身份(组、用户和角色)以及如何进行访问。• IAM 策略 (p. 146) – 控制哪些用户可以创建、编辑和删除客户托管策略,以及哪些用户可以附加和分离

所有托管策略。• AWS 资源 (p. 146) – 控制哪些用户有权使用基于身份的策略或基于资源的策略访问资源。• AWS 账户 (p. 147) – 控制是否仅允许特定账户的成员发出请求。

控制 委托人进行的访问权限策略控制您作为委托人可以执行的操作。管理员必须将基于身份的权限策略附加到提供权限的身份(用户、组或角色)。权限策略允许或拒绝访问 AWS。管理员还可以设置 IAM 实体(用户或角色)的权限边界以定义该实体可以拥有的最大权限。权限边界是一项高级 IAM 功能。有关权限边界的更多信息,请参阅 权限边界 IAM 身份 在 IAM 用户指南.

更多信息和如何控制的示例 AWS 承运人访问权限,请参阅 控制承运人的访问权限 在 IAM 用户指南.

控制对身份的访问管理员可以通过创建限制可以对身份执行的操作或谁可以访问身份的策略,来控制您对 IAM 身份(用户、组或角色)可以执行的操作。然后,将该策略附加到提供您的权限的身份。

例如,管理员可能允许您重置三个特定用户的密码。为此,管理员将一个策略附加到您的 IAM 用户,以允许您仅为自己和具有三个指定用户的 ARN 的用户重置密码。这使您可以重置团队成员的密码,但不能重置其他 IAM 用户的密码。

了解更多信息和使用策略来控制的示例 AWS 访问身份,请参阅 控制身份访问 在 IAM 用户指南.

控制对策略的访问管理员可以控制哪些用户可以创建、编辑和删除客户托管策略,以及哪些用户可以附加和分离所有托管策略。查看策略时,您可以查看策略摘要,其中包括该策略中每个服务的访问权限级别摘要。 AWS 将每个服务操作分为四个操作中的一个 访问级别 根据每项行动做了什么: List, Read, Write,或 Permissionsmanagement。您可以使用这些访问级别来确定要纳入策略中的操作。有关更多信息,请参阅 了解政策摘要中的访问级别摘要 在 IAM 用户指南.

Warning

您应该限制自己账户中的 Permissions Management 访问级别权限。否则,您的账户成员为自己创建的策略所拥有的权限可能比他们应有的权限更多。或者,他们可以创建具有 AWS 完全访问权限的单独用户。

更多信息和如何控制的示例 AWS 访问政策,请参阅 控制对政策的访问 在 IAM 用户指南.

控制对 资源的访问管理员可以使用基于身份的策略或基于资源的策略控制对资源的访问。在基于身份的策略中,您将策略附加到一个身份并指定该身份可以访问哪些资源。在基于资源的策略中,您将策略附加到要控制的资源。在该策略中,您指定哪些委托人可以访问该资源。

有关更多信息,请参阅 控制对资源的访问 在 IAM 用户指南.

资源创建者不会自动拥有许可

无论谁创建了某个账户中的资源,所有这些资源都归该账户所有。AWS 账户根用户是账户拥有者,因此才有权对账户中的任何资源执行任何操作。

146

Page 155: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南什么是策略?

Important

强烈建议您不使用 根用户 执行日常任务,即使是管理任务。请遵守仅将根用户用于创建首个 IAM用户的最佳实践。然后请妥善保存 根用户 凭证,仅用它们执行少数账户和服务管理任务。要查看需要您以根用户身份登录的任务,请参阅需要根用户的 AWS 任务。

您账户中的实体(用户或角色)必须被授予访问权限才能创建资源。但是,仅仅因为这些实体创建了资源,并不意味着他们自动拥有对该资源的完全访问权限。您必须为每个操作明确授予权限。此外,只要您有权管理用户和角色权限,就可以随时撤销这些权限。

控制对不同账户中的委托人的访问管理员可以使用基于 AWS 资源的策略、IAM 跨账户角色或 AWS Organizations 服务,以允许其他账户中的委托人访问您账户中的资源。

对于一些 AWS 服务,您可以授予对资源的跨账户访问权限。为此,您可将策略直接附加到要共享的资源,而不是将角色用作代理。如果该服务支持此策略类型,则您要共享的资源还必须支持基于资源的策略。与基于用户的策略不同,基于资源的策略指定哪些人(以 AWS 账户 ID 号列表的形式)可以访问该资源。AWSRoboMaker does not support基于资源的策略。

与角色相比,使用基于资源的策略进行跨账户访问具有一些优势。利用通过基于资源的策略访问的资源,委托人(人员或应用程序)仍在可信账户中工作,并且无需放弃用于代替角色权限的用户权限。换句话说,委托人可以同时访问可信账户和 信任账户中的资源。这对于从一个账户向另一个账户中复制信息之类的任务非常有用。有关使用跨帐户角色的更多信息,请参阅 提供对 IAM 另一个用户 AWS 您拥有的账户 在 IAM 用户指南.

AWS Organizations 可以针对您拥有的多个 AWS 账户实现基于策略的管理。借助 组织,可以创建账户组、自动创建账户、应用和管理这些组的策略。组织 支持您针对多个账户集中管理策略,无需使用自定义脚本和手动操作流程。使用 AWS Organizations,您可以创建服务控制策略 (SCP),从而集中控制多个 AWS 账户对 AWS 服务的使用。有关更多信息,请参阅 什么是 AWS Organizations? 在 AWS Organizations 用户指南.

什么是策略?您将创建策略并将其附加到 IAM 身份或 AWS 资源,以便控制 AWS 中的访问。

Note

要快速开始,您可以忽略此页面。首先,检查AWS RoboMaker 的身份验证和访问控制 (p. 138)上的介绍性信息,然后参阅 开始使用 IAM (p. 151)。

策略是 AWS 中的对象;在与实体或资源相关联时,策略定义了它们的权限。在委托人(如用户)发出请求时,AWS 将评估这些策略。策略中的权限确定是允许还是拒绝请求。大多数策略在 AWS 中存储为 JSON 文档。

IAM 策略定义操作的权限,无论您使用哪种方法执行操作。例如,如果策略允许 GetUser 然后,具有该策略的用户可以从 AWS 管理控制台, AWS CLI,或 AWS API。在创建 IAM 用户时,您可以设置用户以允许控制台或编程访问。IAM 用户可以使用用户名和密码登录到控制台。或者,他们也可以使用访问密钥来使用 CLI 或API。

按频率顺序列出的以下策略类型可能会影响请求是否已获得授权。有关详细信息,请参阅 政策类型 在 IAM 用户指南.

• 基于身份的策略 – 您可以将托管策略和内联策略附加到 IAM 身份(用户、用户所属组和角色)。• 基于资源的策略 – 您可以将内联策略附加到一些 AWS 服务中的资源。基于资源的策略的最常见示例是

Amazon S3 存储桶策略和 IAM 角色信任策略。AWS RoboMaker does not support基于资源的策略。• 组织 SCPs – 您可以使用 AWS Organizations 服务控制策略(SCP)将权限边界应用于 AWS Organizations

组织或组织单位(OU)。这些权限会应用到成员账户中的所有实体。

147

Page 156: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南什么是策略?

• 访问控制列表(ACL) – 您可以使用 ACLs 以控制哪些主体可以访问资源。ACLs 类似于基于资源的策略,但它们是唯一不使用JSON策略文档结构的策略类型。 AWS RoboMaker does not supportACLs.

这些策略类型可分类为权限策略 或权限边界。

• 权限策略 – 您可以将权限策略附加到 AWS 中的资源以定义该对象的权限。在单个账户中,AWS 一起评估所有权限策略。权限策略是最常用的策略。您可以使用以下策略类型作为权限策略:• 基于身份的策略 – 将托管策略或内联策略附加到 IAM 用户、组或角色时,策略定义该实体的权限。• 基于资源的策略 – 将 JSON 策略文档附加到资源时,定义该资源的权限。服务必须支持基于资源的策

略。• 访问控制列表 (ACL) – 将 ACL 附加到资源时,定义具有访问该资源的权限的委托人的列表。资源必须支

持 ACLs.• 权限边界 – 您可以使用策略来定义实体(用户或角色)的权限边界。权限边界控制实体可以具有的最大权

限。权限边界是一项高级 AWS 功能。当多个权限边界应用于请求时,AWS 会单独评估每个权限边界。您可以在以下情况下应用权限边界:• 组织 – 您可以使用 AWS Organizations 服务控制策略 (SCP) 将权限边界应用于 AWS Organizations 组

织或组织单元 (OU)。• IAM 用户或角色 – 您可以对用户或角色的权限边界使用托管策略。有关更多信息,请参阅 权限边界 IAM

实体 在 IAM 用户指南.

主题• 基于身份的策略 (p. 148)• 基于资源的策略 (p. 148)• 策略访问级别分类 (p. 149)

基于身份的策略您可以向 IAM 身份挂载策略。例如,您可以执行以下操作:

• 将权限策略附加到您账户中的用户或组 – 要向用户授予创建 AWS RoboMaker 资源(如a robotapplications)的权限,您可以将权限策略附加到用户或用户所属的组。

• 向角色附加权限策略(授予跨账户权限)– 您可以向 IAM 角色附加基于身份的权限策略,以授予跨账户的权限。例如,账户 A 中的管理员可以创建一个角色,以向其他 AWS 账户(如账户 B)或某项 AWS 服务授予跨账户权限,如下所述:1. 账户 A 管理员可以创建一个 IAM 角色,然后向该角色附加为其授予访问账户 A 中资源的权限的权限策

略。2. 账户 A 管理员可以向角色挂载信任策略,将账户 B 标识为能够担任该角色的委托人。3. 之后,账户 B 管理员可以委托权限,指派账户 B 中的任何用户代入该角色。这样,账户 B 中的用户就

可以在账户 A 中创建或访问资源了。如果您需要授予 AWS 服务权限来代入该角色,则信任策略中的委托人也可以是 AWS 服务委托人。

有关使用 IAM 委派权限的更多信息,请参阅 https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html 中的IAM 用户指南访问权限管理。

有关用户、组、角色和权限的更多信息,请参阅 IAM 用户指南 中的身份(用户、组和角色)。

基于资源的策略基于资源的策略是附加到资源的 JSON 策略文档。这些策略允许您指定,指定的委托人可在何种条件下对该资源执行哪些操作。最常见的基于资源的策略是 Amazon S3 存储桶。基于资源的策略是仅存在于资源上的内联策略。没有基于托管资源的策略。

148

Page 157: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南使用服务相关角色

使用基于资源的策略向其他 AWS 账户的成员授予权限比 IAM 角色具有一些优势。有关更多信息,请参阅 如何 IAM 角色不同于基于资源的策略 在 IAM 用户指南.

AWS RoboMaker 不支持基于资源的策略。

策略访问级别分类在 IAM 控制台中,使用以下访问级别分类对操作进行分组:

• List (列表) – 提供权限列出服务内的资源以确定某个对象是否存在。此访问权限级别的操作可以列出对象,但是看不到资源的内容。具有 List (列表) 访问级别的大多数操作都无法在特定资源上执行。使用这些操作创建策略语句时,必须指定 All resources (所有资源) ("*")。

• Read (读取) – 提供权限读取服务中资源的内容和属性但不对其进行编辑。例如,Amazon S3 操作GetObject 和 GetBucketLocation具有 Read (读取) 访问级别。

• Write (写入) – 提供权限在服务中创建、删除或修改资源。例如,Amazon S3 操作CreateBucket、DeleteBucket 和 PutObject 具有 Write (写入) 访问级别。

• Permissions management (权限管理) – 提供权限在服务中授予或修改资源权限。例如,大多数 IAM 和AWS Organizations 策略操作具有 Permissions management (权限管理) 访问级别。

Tip

要提高您的 AWS 账户的安全性,请限制或定期监控具有 Permissions management (权限管理)访问级别分类的策略。

• Tagging (标记) – 提供权限创建、删除或修改附加到服务中的资源的标签。例如,Amazon EC2CreateTags 和 DeleteTags 操作具有 Tagging (标记) 访问级别。

对 AWS RoboMaker 使用服务相关角色AWS RoboMaker 使用 AWS Identity and Access Management (IAM) 服务相关角色。服务相关角色是一种与AWS RoboMaker 直接关联的独特类型的 IAM 角色。服务相关角色由 AWS RoboMaker 预定义,并包含该服务代表您调用其他 AWS 服务所需的一切权限。

服务相关角色使 AWS RoboMaker 的设置更轻松,因为您不必手动添加必要的权限。AWS RoboMaker 定义其服务相关角色的权限,除非另行定义,否则仅 AWS RoboMaker 可以代入其角色。定义的权限包括信任策略和权限策略,并且权限策略不能附加到任何其他 IAM 实体。

只有在首先删除相关资源后,才能删除服务相关角色。这将保护您的 AWS RoboMaker 资源,因为您不会无意中删除对资源的访问权限。

有关支持服务相关角色的其他服务的信息,请参阅与 IAM 配合使用的 AWS 服务并查找 Service-Linked Role列为 Yes 的服务。选择 Yes 与查看该服务的服务相关角色文档的链接。

AWS RoboMaker 的服务相关角色权限AWS RoboMaker 使用名为 AWSServiceRoleForRoboMaker – Allows RoboMaker to access EC2,Greengrass, and Lambda resources on your behalf 的服务相关角色。

AWSServiceRoleForRoboMaker 服务相关角色信任以下服务代入该角色:

• robomaker.amazonaws.com

角色权限策略允许 AWS RoboMaker 对指定资源完成以下操作:

• 创建和取消作为模拟作业批处理的一部分创建的模拟作业• 管理 Amazon EC2 联网资源

149

Page 158: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南使用服务相关角色

• 管理 AWS IoT Greengrass 部署

您必须配置权限以允许 IAM 实体(如用户、组或角色)创建、编辑或删除服务相关角色。有关更多信息,请参阅 IAM 用户指南 中的服务相关角色权限。

为 AWS RoboMaker 创建服务相关角色您无需手动创建服务相关角色。当您在 AWS 管理控制台、AWS CLI 或 AWS API 中执行 SimulationJob 或DeploymentJob 时,AWS RoboMaker 会为您创建服务相关角色。

如果您删除了此服务相关角色然后需要再次创建它,则可以使用相同的流程在您的账户中重新创建此角色。在创建 SimulationJob、SimulationJobBatch 或 DeploymentJob 时,AWS RoboMaker 将再次为您创建服务相关角色。

您还可以使用 IAM 控制台用 RoboMaker 使用案例创建服务相关角色。在 AWS CLI 或 AWS API 中,使用robomaker.amazonaws.com 服务名称创建服务相关角色。有关更多信息,请参阅 IAM 用户指南 中的创建服务相关角色。如果您删除了此服务相关角色,则可以使用此相同过程再次创建角色。

编辑 AWS RoboMaker 的服务相关角色AWS RoboMaker 不允许您编辑 AWSServiceRoleForRoboMaker 服务相关角色。创建服务相关角色后,您将无法更改角色的名称,因为可能有多种实体引用该角色。但是,您可以使用 IAM 编辑角色的说明。有关更多信息,请参阅 IAM 用户指南 中的编辑服务相关角色。

删除 AWS RoboMaker 的服务相关角色如果您不再需要使用某个需要服务相关角色的功能或服务,我们建议您删除该角色。这样您就没有未被主动监控或维护的未使用实体。但是,您必须先清除服务相关角色的资源,然后才能手动删除它。

Note

如果在您试图删除资源时 AWS RoboMaker 服务正在使用该角色,则删除操作可能会失败。如果发生这种情况,则请等待几分钟后重试。

使用 IAM 手动删除服务相关角色

使用 IAM 控制台、AWS CLI 或 AWS API 删除 AWSServiceRoleForRoboMaker 服务相关角色。有关更多信息,请参阅 IAM 用户指南 中的删除服务相关角色。

AWS RoboMaker 服务相关角色的受支持区域AWS RoboMaker 支持在服务可用的所有区域中使用服务相关角色。有关更多信息,请参阅AWS Regionsand Endpoints。

AWS RoboMaker 不支持在服务可用的每个区域中使用服务相关角色。您可以在以下区域中使用AWSServiceRoleForRoboMaker 角色。

区域名称 区域标识 在 AWS RoboMaker 中支持

美国东部(弗吉尼亚北部) us-east-1 是

美国东部(俄亥俄州) us-east-2 是

美国西部(加利福尼亚北部) us-west-1 是

美国西部(俄勒冈) us-west-2 是

亚太地区(孟买) ap-south-1 是

150

Page 159: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南开始使用 IAM

区域名称 区域标识 在 AWS RoboMaker 中支持

亚太区域 (大阪当地) ap-northeast-3 是

亚太区域(首尔) ap-northeast-2 是

亚太区域(新加坡) ap-southeast-1 是

亚太区域(悉尼) ap-southeast-2 是

亚太区域(东京) ap-northeast-1 是

加拿大 (中部) ca-central-1 是

欧洲(法兰克福) eu-central-1 是

欧洲(爱尔兰) eu-west-1 是

欧洲(伦敦) eu-west-2 是

欧洲(巴黎) eu-west-3 是

南美洲(圣保罗) sa-east-1 是

AWS GovCloud (US) us-gov-west-1 否

开始使用 IAMAWS Identity and Access Management (IAM) 是一种 AWS 服务,允许您安全地管理对服务和资源的访问。IAM 是您的 AWS 账户的一项功能,不另外收费。

Note

在开始使用 IAM 之前,请阅读有关AWS RoboMaker 的身份验证和访问控制 (p. 138)的介绍性信息。

当您首次创建 AWS 账户时,最初使用的是一个对账户中所有 AWS 服务和资源有完全访问权限的单点登录身份。此身份称为 AWS 账户 根用户,可使用您创建账户时所用的电子邮件地址和密码登录来获得此身份。强烈建议您不使用 根用户 执行日常任务,即使是管理任务。请遵守仅将 根用户 用于创建首个 IAM 用户的最佳实践。然后请妥善保存 根用户 凭证,仅用它们执行少数账户和服务管理任务。

创建 IAM 管理员用户自行创建管理员用户并将该用户添加到管理员组(控制台)

1. 通过选择 根用户,然后输入您的 AWS 账户的电子邮件地址,以账户拥有者身份登录到 IAM 控制台。在下一页上,输入您的密码。

Note

强烈建议您遵守以下使用 Administrator IAM 用户的最佳实践,妥善保存根用户凭证。只在执行少数账户和服务管理任务时才作为根用户登录。

2. 在导航窗格中,选择用户,然后选择添加用户。3. 对于 User name (用户名),输入 Administrator。4. 选中 AWS 管理控制台 访问 旁边的复选框。然后选择自定义密码,并在文本框中输入新密码。5. (可选)默认情况下,AWS 要求新用户在首次登录时创建新密码。您可以清除 User must create a new

password at next sign-in (用户必须在下次登录时创建新密码) 旁边的复选框以允许新用户在登录后重置其密码。

151

Page 160: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南开始使用 IAM

6. 选择下一步: 权限。7. 在设置权限下,选择将用户添加到组。8. 选择创建组。9. 在 Create group (创建组) 对话框中,对于 Group name (组名称),输入 Administrators。10. 选择 Filter policies (筛选策略),然后选择 AWS managed-job function (AWS 托管的工作职能) 以筛选表

内容。11. 在策略列表中,选中 AdministratorAccess 的复选框。然后选择 Create group (创建组)。

Note

您必须先激活 IAM 用户和角色对账单的访问权限,然后才能使用 AdministratorAccess 权限访问 AWS Billing and Cost Management 控制台。为此,请按照“向账单控制台委派访问权限”教程第 1 步中的说明进行操作。

12. 返回到组列表中,选中您的新组所对应的复选框。如有必要,选择 Refresh 以在列表中查看该组。13. 选择下一步: 标签。14. (可选)通过以键值对的形式附加标签来向用户添加元数据。有关在 IAM 中使用标签的更多信息,请参

阅 IAM 用户指南 中的标记 IAM 实体。15. 选择 Next: Review (下一步: 审核) 以查看要添加到新用户的组成员资格的列表。如果您已准备好继续,

请选择 Create user。

您可使用此相同的流程创建更多的组和用户,并允许您的用户访问 AWS 账户资源。要了解有关使用策略限制用户对特定 AWS 资源的权限的信息,请参阅访问管理和示例策略。

创建 AWS RoboMaker 的委托用户要支持您的 AWS 账户中的多个用户,您必须委派权限以允许其他人仅执行您要允许的操作。为此,请创建一个 IAM 组(其中具有这些用户所需的权限),然后在创建必要的组时将 IAM 用户添加到这些组。您可以使用此过程为您的整个 AWS 账户设置组、用户和权限。此解决方案最适合中小型组织,其中 AWS 管理员可以手动管理用户和组。对于大型组织,您可以使用自定义 IAM 角色、联合身份验证或单一登录。

在以下任务中,您将创建三个名为 arnav、carlos 和 martha 的用户,并附加一个策略以grantspermission to create a robot application(名为 my-example-robot-application),但仅限在接下来的30 天内。您可以使用此处提供的步骤添加具有不同权限的用户。

为其他人创建委托用户(控制台)

1. 登录 AWS 管理控制台 并通过以下网址打开 IAM 控制台 https://console.aws.amazon.com/iam/。2. 在导航窗格中,选择用户,然后选择添加用户。3. 对于用户名,输入 arnav。4. 选择 Add another user (添加其他用户) 并输入 carlos 作为第二个用户。然后选择 Add another user

(添加其他用户) 并输入 martha 作为第三个用户。5. 选中 AWS 管理控制台 access (AWS 管理控制台访问) 旁边的复选框,然后选择 Autogenerated

password (自动生成的密码)。6. 清除 User must create a new password at next sign-in (用户必须在下次登录时创建新密码) 旁边的复选

框以允许新用户在登录后重置其密码。7. 选择 下一步: 权限。8. 选择直接附加现有策略。您将为用户创建新的托管策略。9. 选择 Create policy (创建策略)。

将在新的选项卡或浏览器窗口中打开 Create policy (创建策略) 向导。10. 在可视化编辑器选项卡上,选择选择服务。然后选择 AWS RoboMaker。您可以使用顶部的搜索框限制

服务列表中的结果。

152

Page 161: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南开始使用 IAM

此时 Service (服务) 部分关闭并且 Actions (操作) 部分自动打开。11. 选择要允许的 AWS RoboMaker 操作。例如,要grants permission to create a robot application,请

在“Filter actions (筛选操作)”文本框中输入 CreateRobotApplication。当筛选 AWS RoboMaker 操作列表时,选择 CreateRobotApplication 旁边的复选框。

AWS RoboMaker 操作按访问级别分类进行分组,以便您轻松快速确定每个操作提供的访问级别。有关更多信息,请参阅策略访问级别分类 (p. 149)。

12. 如果在前面步骤中选择的操作不支持选择特定的资源,则会为您选择 All resources (所有资源)。在这种情况下,您无法编辑该部分。

如果您选择了一个或多个支持资源级权限的操作,则可视化编辑器会在 Resources (资源) 部分中列出这些资源类型。选择 You chose actions that require the robot application resource type (您所选的操作需要 accelerator 资源类型) 以选择是否要为策略输入特定的 robot application。

13. 如果您想要允许针对所有资源执行 CreateRobotApplication 操作,请选择 All resources (所有资源)。

如果您要指定一个资源,请选择 Add ARN (添加 ARN)。指定 region and account ID (or account ID)(或者选择 Any (任意)),然后为资源输入 my-example-robot-application。然后,选择添加。

14. 选择 Specify request conditions (optional) (指定请求条件 (可选))。15. 选择 Add condition (添加条件) 以在接下来的 7 天内grants permission to create a robot application。假

定当天日期为 2019 年 1 月 1 日。16. 对于 Condition Key (条件键),选择 aws: CurrentTime。此条件键检查用户发出请求的日期和时间。它返

回 true,因此仅当日期和时间在指定范围内时才允许 CreateRobotApplication 操作。17. 对于 Qualifier (限定词),请保留默认值。18. 要指定允许的日期和时间范围的开始,请为 操作员,选择 DateGreaterThan。然后,对于 值,输入

2019-01-01T00:00:00Z.19. 选择 Add (添加) 以保存您的条件。20. 选择 Add another condition (添加另一个条件) 以指定结束日期。21. 按照类似步骤指定允许的日期和时间范围的结束日期。对于 Condition Key (条件键),选择 aws:

CurrentTime。对于 操作员,选择 DateLessThan。对于 值,输入 2019-01-06T23:59:59Z,第一个日期后七天。然后,选择 Add (添加) 以保存您的条件。

22. (可选)要查看您正在创建的策略的 JSON 策略文档,请选择 JSON 选项卡。您可以随时在可视化编辑器和 JSON 选项卡之间切换。不过,如果您进行更改或在可视化编辑器选项卡中选择查看策略,IAM 可能会调整您的策略结构以针对可视化编辑器进行优化。有关更多信息,请参阅 政策调整 在 IAM 用户指南.

23. 完成后,选择查看策略。24. 在 审查政策 页面,针对 名称,输入 CreateRobotApplicationPolicy 以及 描述,输入 Policy to

grants permission to create a robot application。查看策略摘要,确保您已获得预期权限,然后选择 创建策略 保存您的新策略。

25. 返回到原始选项卡或窗口,然后刷新您的策略列表。26. 在搜索框中,输入 CreateRobotApplicationPolicy。选中新策略旁边的复选框。然后选择 Next

Step。27. 选择 下一步: 回顾 以预览您的新用户。如果您准备好继续,请选择 Create users (创建用户)。28. 下载或复制新用户的密码并安全地将其提供给用户。单独为您的用户提供指向您的 IAM 用户控制台页面

的链接以及您刚刚创建的用户名。

允许用户自行管理他们的凭证您必须拥有对将托管用户的虚拟 MFA 设备的硬件的物理访问权限以便配置 MFA。例如,您可能为使用在智能手机上运行的虚拟 MFA 设备的用户配置 MFA。在这种情况下,您必须具有智能手机才能完成该向导。因此,您可能想让用户配置和管理他们自己的虚拟 MFA 设备。在此情况下,您必须授予用户执行必要的 IAM操作的权限。

153

Page 162: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南开始使用 IAM

创建允许凭证自我管理的策略(控制台)

1. 登录 AWS 管理控制台 并通过以下网址打开 IAM 控制台 https://console.aws.amazon.com/iam/。2. 在导航窗格中,选择策略,然后选择创建策略。3. 选择 JSON 选项卡,然后复制以下 JSON 策略文档中的文本。将该文本粘贴到 JSON 文本框中。

Important

本示例策略不允许用户在登录时重置密码。新用户和密码过期的用户可以执行此操作。您可以通过添加 iam:ChangePassword 和 iam:CreateLoginProfile 到陈述中BlockMostAccessUnlessSignedInWithMFA。然而, IAM 不推荐此。

{ "Version": "2012-10-17", "Statement": [ { "Sid": "AllowAllUsersToListAccounts", "Effect": "Allow", "Action": [ "iam:ListAccountAliases", "iam:ListUsers", "iam:ListVirtualMFADevices", "iam:GetAccountPasswordPolicy", "iam:GetAccountSummary" ], "Resource": "*" }, { "Sid": "AllowIndividualUserToSeeAndManageOnlyTheirOwnAccountInformation", "Effect": "Allow", "Action": [ "iam:ChangePassword", "iam:CreateAccessKey", "iam:CreateLoginProfile", "iam:DeleteAccessKey", "iam:DeleteLoginProfile", "iam:GetLoginProfile", "iam:ListAccessKeys", "iam:UpdateAccessKey", "iam:UpdateLoginProfile", "iam:ListSigningCertificates", "iam:DeleteSigningCertificate", "iam:UpdateSigningCertificate", "iam:UploadSigningCertificate", "iam:ListSSHPublicKeys", "iam:GetSSHPublicKey", "iam:DeleteSSHPublicKey", "iam:UpdateSSHPublicKey", "iam:UploadSSHPublicKey" ], "Resource": "arn:aws:iam::*:user/${aws:username}" }, { "Sid": "AllowIndividualUserToViewAndManageTheirOwnMFA", "Effect": "Allow", "Action": [ "iam:CreateVirtualMFADevice", "iam:DeleteVirtualMFADevice", "iam:EnableMFADevice", "iam:ListMFADevices", "iam:ResyncMFADevice" ], "Resource": [ "arn:aws:iam::*:mfa/${aws:username}",

154

Page 163: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南开始使用 IAM

"arn:aws:iam::*:user/${aws:username}" ] }, { "Sid": "AllowIndividualUserToDeactivateOnlyTheirOwnMFAOnlyWhenUsingMFA", "Effect": "Allow", "Action": [ "iam:DeactivateMFADevice" ], "Resource": [ "arn:aws:iam::*:mfa/${aws:username}", "arn:aws:iam::*:user/${aws:username}" ], "Condition": { "Bool": { "aws:MultiFactorAuthPresent": "true" } } }, { "Sid": "BlockMostAccessUnlessSignedInWithMFA", "Effect": "Deny", "NotAction": [ "iam:CreateVirtualMFADevice", "iam:DeleteVirtualMFADevice", "iam:ListVirtualMFADevices", "iam:EnableMFADevice", "iam:ResyncMFADevice", "iam:ListAccountAliases", "iam:ListUsers", "iam:ListSSHPublicKeys", "iam:ListAccessKeys", "iam:ListServiceSpecificCredentials", "iam:ListMFADevices", "iam:GetAccountSummary", "sts:GetSessionToken" ], "Resource": "*", "Condition": { "BoolIfExists": { "aws:MultiFactorAuthPresent": "false" } } } ]}

此策略有何作用?

• AllowAllUsersToListAccounts 语句让用户可以在 IAM 控制台中查看账户及其用户的基本信息。这些权限必须位于自己的语句中,因为它们不支持或不需要指定特定的资源 ARN,而需要指定"Resource" : "*"。

• AllowIndividualUserToSeeAndManageOnlyTheirOwnAccountInformation 语句让用户可以在 IAM 控制台中管理自己的用户、密码、访问密钥、签名证书、SSH 公有密钥和 MFA 信息。它还允许用户首次登录(尽管管理员要求他们设置首次密码)。资源 ARN 仅限在用户自己的 IAM 用户实体中使用这些权限。

• AllowIndividualUserToViewAndManageTheirOwnMFA 语句让用户可以查看或管理其 MFA 设备。请注意,资源 ARNs 在此声明中,仅允许访问与当前登录用户同名的MFA设备或用户。用户不能创建或更改除自己设备外的任何 MFA 设备。

• AllowIndividualUserToDeactivateOnlyTheirOwnMFAOnlyWhenUsingMFA 语句让用户可以仅停用自己的 MFA 设备(仅在用户使用 MFA 登录时)。这可防止仅具有访问密钥(但没有 MFA 设备)的其他用户停用 MFA 设备和访问账户。

155

Page 164: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南开始使用 IAM

• BlockMostAccessUnlessSignedInWithMFA 语句组合使用 "Deny" 和 "NotAction",以便在用户未使用 MFA 登录时,拒绝访问 IAM 和其他 AWS 服务中的几乎所有操作(但一些操作除外)。有关此语句逻辑的更多信息,请参阅 NotAction 与Deny 在 IAM 用户指南. 如果用户使用 MFA 登录,则"Condition" 测试失败,最后一个 "deny" 语句失效,而用户的其他策略或语句确定用户的权限。此语句可确保,当用户未使用 MFA 登录时,他们只能执行所列出的操作,并且仅当另一个语句或策略允许访问这些操作时方可执行。

...IfExists 运算符的 Bool 版本可确保:如果 aws:MultiFactorAuthPresent 键缺失,条件将返回 true。这意味着使用长期凭证(例如访问密钥)访问 API 的用户被拒绝访问非 IAM API 操作。

4. 完成后,选择查看策略。5. 在 Review (查看) 页面上,键入 Force_MFA 作为策略名称。对于策略说明,键入 This policy

allows users to manage their own passwords and MFA devices but nothing elseunless they authenticate with MFA.。查看策略 Summary (摘要) 以查看您的策略授予的权限,然后选择 Create policy (创建策略) 以保存您的工作。

将在托管策略列表中显示新策略,并已准备好附加该策略。

将策略附加到用户(控制台)

1. 在导航窗格中,选择 Users (用户)。2. 选择要编辑的用户的名称(不是复选框)。3. 在 Permissions (权限) 选项卡中,请选择Add permissions (添加权限)。4. 选择直接附加现有策略。5. 在搜索框中输入 Force,然后选中列表中 Force_MFA 旁的复选框。接下来,选择 Next (下一步):回顾.6. 检查更改,然后选择 Add permissions (添加权限)。

为 IAM 用户启用 MFA为增强安全性,我们建议所有 IAM 用户配置多重验证 (MFA) 以帮助保护 AWS RoboMaker 资源。MFA 增强了安全性,因为它要求用户除了其常规登录凭证之外,还要提供来自 AWS 支持的 MFA 设备的唯一身份验证。最安全的 AWS MFA 设备是 U2F 安全密钥。如果您的公司已经有 U2F 设备,我们建议您为 AWS 启用这些设备。否则,您必须为每个用户购买设备并等待硬件到达。有关更多信息,请参阅 启用U2F安全密钥 在IAM 用户指南.

如果您还没有 U2F 设备,则可以通过启用虚拟 MFA 设备快速、低成本地开始使用。这要求您在现有手机或其他移动设备上安装软件应用程序。该设备将基于进行了时间同步的一次性密码算法生成一个六位数字代码。当用户登录 AWS 时,系统会提示从设备输入代码。分配给用户的每个虚拟 MFA 设备必须是唯一的。用户无法从另一个用户的虚拟 MFA 设备代码输入代码来进行身份验证。有关可用作虚拟 MFA 设备的一些受支持应用程序的列表,请参阅 Multi-Factor Authentication。

Note

您必须拥有对将托管用户的虚拟 MFA 设备的移动设备的物理访问权限以便为 IAM 用户配置 MFA。

为 IAM 用户启用虚拟 MFA 设备(控制台)

1. 登录 AWS 管理控制台 并通过以下网址打开 IAM 控制台 https://console.aws.amazon.com/iam/。2. 在导航窗格中,选择 Users (用户)。3. 在 User Name 列表中,选择目标 MFA 用户的名称。4. 选择 Security Credentials 选项卡。在 Assigned MFA device (已分配 MFA 设备) 旁边,选择 Manage

(管理)。5. 在 Manage MFA Device (管理 MFA 设备) 向导中,选择 Virtual MFA device (虚拟 MFA 设备),然后选

择 Continue (继续)。

156

Page 165: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南日志记录和监控

IAM 将生成并显示虚拟 MFA 设备的配置信息,包括 QR 代码图形。此图形是秘密配置密钥的表示形式,适用于不支持 QR 代码的设备上的手动输入。

6. 打开您的虚拟 MFA 应用程序。

有关可用于托管虚拟 MFA 设备的应用程序的列表,请参阅 Multi-Factor Authentication。如果虚拟 MFA应用程序支持多个账户 (多个虚拟 MFA 设备),请选择相应的选项以创建新账户 (新的虚拟 MFA 设备)。

7. 确定 MFA 应用程序是否支持 QR 代码,然后执行以下操作之一:

• 在向导中,选择 Show QR 代码 (显示 QR 代码),然后使用该应用程序扫描 QR 代码。例如,您可选择摄像头图标或选择类似于 Scan code 的选项,然后使用设备的摄像头扫描此代码。

• 在 Manage MFA Device (管理 MFA 设备) 向导中,选择 Show secret key (显示私有密钥),然后在您的 MFA 应用程序中输入私有密钥。

完成操作后,虚拟 MFA 设备会开始生成一次性密码。8. 在 Manage MFA Device (管理 MFA 设备) 向导的 MFA code 1 (MFA 代码 1) 框中,输入虚拟 MFA 设备

上当前显示的一次性密码。请等候 30 秒,以便设备生成新的一次性密码。然后在 MFA code 2 (MFA 代码 2) 框中输入第二个一次性密码。选择 Assign MFA (分配 MFA)。

Important

生成代码之后立即提交您的请求。如果生成代码后等待很长时间才提交请求,MFA 设备会成功与用户关联,但 MFA 设备无法同步。这是因为基于时间的一次性密码 (TOTP) 很快会过期。这种情况下,您可以重新同步设备。有关更多信息,请参阅 重新同步虚拟和硬件MFA设备 在 IAM用户指南.

虚拟 MFA 设备现在已准备好与 AWS 一起使用了。

AWS RoboMaker 中的日志记录和监控监控是保持 AWS RoboMaker 和您的 AWS 解决方案的可靠性、可用性和性能的重要方面。您应从 AWS 解决方案的所有部分收集监控数据,以便更轻松地调试出现的多点故障。

主题• 使用 Amazon CloudWatch 监控 AWS RoboMaker (p. 157)• 使用 AWS CloudTrail 记录 AWS RoboMaker API 调用 (p. 159)

使用 Amazon CloudWatch 监控 AWS RoboMakerAWS RoboMaker 将指标发送到 Amazon CloudWatch。可以使用 AWS 管理控制台、AWS CLI 或 API 列出AWS RoboMaker 发送到 CloudWatch 的指标。

指标仅存在于创建它们的区域中。指标无法删除,但如果在 15 个月后没有向指标发布新数据,这些指标将自动过期。

有关 Amazon CloudWatch 的更多信息,请参阅 Amazon CloudWatch 用户指南。

主题• AWS RoboMaker 模拟指标 (p. 158)• AWS RoboMaker 使用情况指标 (p. 158)

157

Page 166: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南使用 Amazon CloudWatch 监控 AWS RoboMaker

AWS RoboMaker 模拟指标您可以使用 Amazon CloudWatch 监控 AWS RoboMaker 模拟任务,这会从您的模拟任务收集信息并创建可读的、近乎实时的指标。信息以每分钟一次的频率提供。

SimulationJobId 维度中包含以下指标。

指标 说明

RealTimeFactor 模拟的时间量与挂钟时间的比率。例如,如果模拟30 分钟需要 1 小时,则系数为 0.5。

更复杂的模拟具有较低的实时系数。

vCPU* 模拟作业使用的虚拟 CPU 核心数

单位:计数

Memory* 模拟作业使用的内存量(以 GB 为单位)

单位:GB

SimulationUnit* 模拟单位是基于模拟作业的 vCPU 和内存消耗计算得出的

单位:计数

Important

带有 * 的指标用于评估目的。AWS RoboMaker 在准备运行模拟作业时才会发送指标。除非模拟作业处于 Running 状态,否则费用不会累积。

AWS RoboMaker 使用情况指标您可以使用 CloudWatch 用量指标来提供账户资源使用情况的可见性。使用这些指标在 CloudWatch 图表和控制面板上可视化当前服务用量。

AWS RoboMaker 使用情况指标与 AWS 服务配额对应。您可以配置警报,以在用量接近服务配额时向您发出警报。有关 CloudWatch 与服务配额集成的更多信息,请参阅服务配额集成和用量指标。

AWS/Usage 维度中包含以下指标。

指标 说明

ResourceCount 您账户中运行的指定资源的数量。资源由与指标关联的维度定义。

此指标最有用的统计数据是 MAXIMUM,这表示 1 分钟期间内使用的最大资源数。

以下维度用于优化由 AWS RoboMaker 发布的使用情况指标。

158

Page 167: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南使用 AWS CloudTrail 记录 AWS RoboMaker API 调用

维度 说明

Service 包含该资源的 AWS 服务的名称。对于 AWSRoboMaker 使用情况指标,此维度的值为RoboMaker。

Type 正在报告的实体的类型。目前,AWS RoboMaker使用情况指标的唯一有效值为 Resource。

Resource 正在运行的资源的类型。目前,AWSRoboMaker 使用情况指标的有效值为RobotApplication、SimulationApplication、ActiveSimulationJob和 ActiveSimulationJobBatch。

Class 要跟踪资源的级别。对于以ActiveSimulationJob 作为 资源维度的值的AWS RoboMaker 使用情况指标,有效值为 CPU。此维度的值定义该指标报告的由 SimulationJobs 使用的计算资源类型。对于其他而言,类值为 None。

这些指标每分钟发出一次。使用这些指标来监控使用情况,然后根据需要请求相应地提高限制。有关监控使用情况的更多信息,请参阅可视化服务配额并设置警报。

使用 AWS CloudTrail 记录 AWS RoboMaker API 调用AWS RoboMaker 与 AWS CloudTrail 集成,后者是一项服务,该服务提供了由用户、角色或 AWSRoboMaker 中的 AWS 服务执行的操作的记录。CloudTrail 将 AWS RoboMaker 的所有 API 调用作为事件捕获。捕获的调用包含来自 AWS RoboMaker 控制台和代码的 AWS RoboMaker API 操作调用。如果您创建跟踪,则可以使 CloudTrail 事件持续传送到 Amazon S3 存储桶(包括 AWS RoboMaker 的事件)。如果您不配置跟踪,则仍可在 CloudTrail 控制台的 Event history (事件历史记录) 中查看最新事件。通过使用CloudTrail 收集的信息,您可以确定向 AWS RoboMaker 发出了什么请求、发出请求的 IP 地址、何人发出的请求、请求的发出时间以及其他详细信息。

要了解有关 CloudTrail 的更多信息,请参阅 AWS CloudTrail User Guide。

CloudTrail 中的 AWS RoboMaker 信息在您创建 CloudTrail 账户时,即针对该账户启用了 AWS。AWS RoboMaker 中发生活动时,该活动将记录在 CloudTrail 事件中,并与其他 AWS 服务事件一同保存在 Event history (事件历史记录) 中。您可以在AWS 账户中查看、搜索和下载最新事件。有关更多信息,请参阅使用 CloudTrail 事件历史记录查看事件。

要持续记录 AWS 账户中的事件(包括 AWS RoboMaker 的事件),请创建跟踪。通过跟踪,CloudTrail 可将日志文件传送至 Amazon S3 存储桶。默认情况下,在控制台中创建跟踪时,此跟踪应用于所有 AWS 区域。此跟踪在 AWS 分区中记录来自所有区域的事件,并将日志文件传送至您指定的 Amazon S3 存储桶。此外,您可以配置其他 AWS 服务,进一步分析在 CloudTrail 日志中收集的事件数据并采取行动。有关更多信息,请参阅下列内容:

• 创建跟踪概述• CloudTrail 支持的服务和集成• 为 CloudTrail 配置 Amazon SNS 通知• 接收多个区域中的 CloudTrail 日志文件和从多个账户中接收 CloudTrail 日志文件

所有 AWS RoboMaker 操作由 CloudTrail 记录,并且在 AWS RoboMaker API 参考中正式记载。例如,对CreateSimulationJob、RegisterRobot 和 UpdateRobotApplication 操作的调用会在 CloudTrail日志文件中生成条目。

159

Page 168: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南安全合规性

每个事件或日志条目都包含有关生成请求的人员的信息。身份信息帮助您确定以下内容:

• 请求是使用根用户凭证还是 AWS Identity and Access Management (IAM) 用户凭证发出的。• 请求是使用角色还是联合身份用户的临时安全凭证发出的。• 请求是否由其他 AWS 服务发出。

有关更多信息,请参阅 CloudTrail userIdentity 元素。

了解 AWS RoboMaker 日志文件条目跟踪是一种配置,可用于将事件作为日志文件传送到您指定的 Amazon S3 存储桶。CloudTrail 日志文件包含一个或多个日志条目。一个事件表示来自任何源的一个请求,包括有关所请求的操作、操作的日期和时间、请求参数等方面的信息。CloudTrail 日志文件不是公用 API 调用的有序堆栈跟踪,因此它们不会以任何特定顺序显示。

下面的示例显示了一个 CloudTrail 日志条目,该条目说明了 DescribeRobot 操作。

{ "eventVersion": "1.05", "userIdentity": { "type": "IAMUser", "principalId": "my-principal-id", "arn": "my-arn", "accountId": "my-account-id", "accessKeyId": "my-access-key", "userName": "my-user-name" }, "eventTime": "2018-12-07T00:28:03Z", "eventSource": "robomaker.amazonaws.com", "eventName": "DescribeRobot", "awsRegion": "us-west-2", "sourceIPAddress": "my-ip-address", "userAgent": "aws-internal/3 aws-sdk-java/1.11.455 Linux/4.4.83-0.1.fm.327.54.326.metal1.x86_64 OpenJDK_64-Bit_Server_VM/25.192-b12 java/1.8.0_192,", "requestParameters": { "robot": "my-robot-arn" }, "responseElements": null, "requestID": "f54cdf8b-f9b6-11e8-8883-c3f04579eca3", "eventID": "affb0303-ff48-4f65-af8e-d7d19710bac3", "readOnly": true, "eventType": "AwsApiCall", "recipientAccountId": "my-recipient-account-id"}

安全合规性AWS HIPAA 合规性计划将 AWS RoboMaker 纳为符合 HIPAA 要求的服务。AWS PCI DSS 合规性计划将AWS RoboMaker 纳为符合 PCI 要求的服务。

有关 AWS 云和 HIPAA 合规性的一般信息,请参阅下列内容:

• HIPAA 合规性• Amazon Web Services 上的 HIPAA 安全性和合规性架构设计

160

Page 169: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南恢复功能

AWS RoboMaker 中的弹性AWS 全球基础设施围绕 AWS 区域和可用区构建。AWS 区域提供多个在物理上独立且隔离的可用区,这些可用区通过延迟低、吞吐量高且冗余性高的网络连接在一起。利用可用区,您可以设计和操作在可用区之间无中断地自动实现故障转移的应用程序和数据库。与传统的单个或多个数据中心基础设施相比,可用区具有更高的可用性、容错性和可扩展性。

有关 AWS 区域和可用区的更多信息,请参阅 AWS 全球基础设施。

除了 AWS 全球基础设施之外,AWS RoboMaker 还提供了多种功能,以帮助支持您的数据弹性和备份需求。

AWS RoboMaker 中的基础设施安全性作为一项托管服务,AWS RoboMaker 由 Amazon Web Services:安全流程概述白皮书中所述的 AWS 全球网络安全程序提供保护。

您可以使用 AWS 发布的 API 调用通过网络访问 AWS RoboMaker。客户端必须支持传输层安全性 (TLS) 1.0或更高版本。建议使用 TLS 1.2 或更高版本。客户端还必须支持具有完全向前保密 (PFS) 的密码套件,例如 Ephemeral Diffie-Hellman (DHE) 或 Elliptic Curve Ephemeral Diffie-Hellman (ECDHE)。大多数现代系统(如 Java 7 及更高版本)都支持这些模式。

此外,必须使用访问密钥 ID 和与 IAM 委托人关联的秘密访问密钥来对请求进行签名。或者,您可以使用AWS Security Token Service (AWS STS) 生成临时安全凭证来对请求进行签名。

161

Page 170: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南有关标签的基本知识

标记您的 AWS RoboMaker 资源为了帮助您管理和组织队列、机器人、机器人应用程序、模拟应用程序、模拟作业和部署,您可以选择以标签的形式为每个资源分配您自己的元数据。本节介绍标签并说明如何创建标签。

有关标签的基本知识标签可让您按各种标准(例如用途、所有者或环境)对 AWS RoboMaker 资源进行分类。这在您拥有许多同类型资源时很有用 - 您可以根据分配给资源的标签快速识别特定资源。每个标签都包含您定义的一个键和可选值。例如,您可以为机器人定义一组标签来帮助您按功能跟踪设备。我们建议您为每类资源创建一组可满足您的需求的标签键。使用一组连续的标签键,管理资源时会更加轻松。

您可以根据添加或应用的标签搜索和筛选资源。您还可以使用标签控制对资源的访问,如在 IAM 策略中使用标签 (p. )中所述。

为便于使用,AWS 管理控制台中的标签编辑器提供了一种用于创建和管理标签的集中而统一的方法。有关详细信息,请参阅 使用标签编辑器 在 使用AWS管理控制台.

您还可以使用 AWS CLI 和 AWS RoboMaker API 处理标签。当您在以下命令中使用“Tags”字段创建标签时,可以将标签与事物组、事物类型、主题规则、作业、安全配置文件和账单组相关联:

• CreateDeploymentJob• CreateFleet• CreateRobot• CreateRobotApplication• CreateSimulationApplication• CreateSimulationJob• 创建WorldExportJob• 创建WorldGenerationJob• CreateWorld模板• StartSimulationJobBatch

您可以使用以下命令为支持标记的现有资源添加、修改或删除标签:

• TagResource ()• ListTagsForResource• UntagResource

您可以修改标签的密钥和值,还可以随时删除资源的标签。您可以将标签的值设为空的字符串,但是不能将其设为空值。如果您添加的标签的值与该实例上现有标签的值相同,新的值就会覆盖旧值。如果删除资源,则所有与资源相关的标签都将被删除。

AWS 标记策略中提供了其他信息。

标签限制下面是适用于标签的基本限制:

162

Page 171: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南在 IAM 策略中使用标签

• 每个资源的最大标签数 - 50• 最大键长度:127 个 Unicode 字符(采用 UTF-8 格式)• 最大值长度:255 个 Unicode 字符(采用 UTF-8 格式)• 标签键和值区分大小写。• 请勿使用“AWS:” 标签名称或值中的前缀,因为AWS保留使用。您无法编辑或删除带此前缀的标签名称或

值。具有此前缀的标签不计入每个资源的标签数限制。• 如果您的标记方案针对多个服务和资源使用,请记得其他服务可能对允许使用的字符有限制。通常允许使

用的字符包括:可用 UTF-8 格式表示的字母、空格和数字以及以下特殊字符:+ - = . _ : / @。

在 IAM 策略中使用标签可以在用于 AWS RoboMaker API 操作的 IAM 策略中应用基于标签的资源级权限。这可让您更好地控制用户可创建、修改或使用哪些资源。在 IAM 策略中将 Condition 元素(也称作 Condition 块)与以下条件上下文键和值结合使用来基于资源标签控制用户访问(权限):

• 使用 aws:ResourceTag/tag-key: tag-value 可允许或拒绝带特定标签的资源上的用户操作。• 使用 aws:RequestTag/tag-key: tag-value 可要求在发出创建或修改允许标签的资源的 API 请求时

使用(或不使用)特定标签。• 使用 aws:TagKeys: [tag-key, ...] 可要求在发出创建或修改允许标签的资源的 API 请求时使用

(或不使用)一组特定标签键。

Note

IAM 策略中的条件上下文键和值仅适用于能够标记的资源的标识符是必需参数的那些 AWSRoboMaker 操作。例如,基于条件上下文键和值,不允许或拒绝使用 ListFleets,因为此请求中未引用可标记资源(队列、机器人、机器人应用程序、模拟应用程序、模拟作业、部署作业)。

使用标签控制访问 在 AWS身份和访问管理用户指南 有关于使用标签的其他信息。该指南的 IAM JSON 策略参考一节包含 IAM 中的 JSON 策略的元素、变量和评估逻辑的详细语法、描述和示例。

以下示例策略应用两个基于标签的限制。受此策略限制的 IAM 用户:

• 无法为资源提供标签“env=prod”(在示例中,请参阅行 "aws:RequestTag/env" : "prod"• 无法修改或访问具有现有标签“env=prod”的资源(在示例中,请参阅行 "aws:ResourceTag/env" :"prod")。

{ "Version" : "2012-10-17", "Statement" : [ { "Effect" : "Deny", "Action" : "robomaker:*", "Resource" : "*", "Condition" : { "StringEquals" : { "aws:RequestTag/env" : "prod" } } }, { "Effect" : "Deny", "Action" : "robomaker:*", "Resource" : "*", "Condition" : {

163

Page 172: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南在 IAM 策略中使用标签

"StringEquals" : { "aws:ResourceTag/env" : "prod" } } }, { "Effect": "Allow", "Action": [ "robomaker:*" ], "Resource": "*" } ]}

您还可以为给定标签键指定多个标签值,方法是将它们括在列表中,如下所示:

"StringEquals" : { "aws:ResourceTag/env" : ["dev", "test"] }

Note

如果您基于标签允许或拒绝用户访问资源,则必须考虑显式拒绝用户对相同资源添加或删除这些标签的能力。否则,用户可能通过修改资源标签来绕过您的限制并获得资源访问权限。

164

Page 173: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南模拟作业问题排查

Troubleshooting解决您在使用 AWS RoboMaker 开发机器人应用程序时可能发现的常见问题。

主题• 模拟作业问题排查 (p. 165)• Simulation WorldForge 疑难解答 (p. 168)• 开发环境问题排查 (p. 168)• 部署问题排查 (p. 169)• 对 Colcon 构建和捆绑进行问题排查 (p. 171)

模拟作业问题排查本节可以帮助您解决 AWS RoboMaker 模拟作业的问题。

模拟作业失败如果模拟作业失败,请参阅以下常见解决方案。

您的 Amazon S3 资源是否位于 AWS RoboMaker 所在的同一个区域内?您的机器人应用程序、模拟应用程序和输出位置必须位于 AWS RoboMaker 所在的同一区域内。验证您的应用程序源和模拟作业输出位置。

您的机器人应用程序是否异常退出?设置您的机器人应用程序进行模拟时出现问题。请在 Amazon CloudWatch 中查看模拟作业的机器人应用程序日志。

从模拟作业详细信息屏幕访问日志。选择 Logs (日志),然后选择一个日志流。要查找特定问题,请使用筛选条件。例如,警告或错误。

您的应用程序是否缺少 .so 文件?如果您的应用程序崩溃,它可能缺少一个依赖的共享对象 (.so) 文件。在您的环境中提取应用程序包,并确认所需的共享对象库位于 /usr/lib 或 /usr/local/lib 中。 确保将依赖项添加到您的程序包 .xml 文件。

是否已将角色的 ARN 用于 CLI?在从 AWS CLI 调用 create-simulation-job 时,使用角色的完整 Amazon 资源名称 (ARN),而不仅仅是角色名称。

您的角色是否具有 AWS RoboMaker 的信任策略?如果您在从 AWS CLI 调用 create-simulation-job 时传递 IAM 角色的完整 Amazon 资源名称 (ARN),则您的信任策略可能没有足够的权限。检查角色,确保该角色与 robomaker.amazonaws.com 具有信任关系。

有关查看角色访问权限以及向 角色添加信任策略的更多信息,请参阅修改角色IAM。

165

Page 174: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南模拟作业失败

您的角色是否有权发布到 Amazon S3?如果您为模拟作业指定输出 S3 存储桶,则您的角色必须对此存储桶具有写入权限。更新您的信任策略以包含写入权限。以下示例信任策略将读取、列出和写入权限添加到 S3 存储桶。

{ "Action": "s3:ListBucket", "Resource": [ "my-bucket/*" ], "Effect": "Allow"},{ "Action": [ "s3:Get*", "s3:List*" ], "Resource": [ "my-bucket/*" ], "Effect": "Allow"},{ "Action": "s3:Put*", "Resource": [ "my-bucket/*" ], "Effect": "Allow"}

您的角色是否有权发布到 Amazon CloudWatch?更新具有 CloudWatch 访问权限的 IAM 角色的权限策略。

{ "Effect": "Allow", "Action": [ "logs:CreateLogGroup", "logs:CreateLogStream", "logs:PutLogEvents", "logs:DescribeLogStreams" ], "Resource": "*"}

您的应用程序是否具有不匹配的实体标签?实体标签 (ETag) 是创建模拟时提供的 Amazon S3 对象的哈希。仅反映对对象内容的更改,而不反映对其元数据的更改。ETag如果您在 AWS RoboMaker 使用 Amazon S3 中的机器人应用程序或模拟包的内容之前更改此内容,则将出现版本不匹配的情况。

要解决此问题,请创建一个新的机器人应用程序或模拟应用程序版本,并为更新后的应用程序包提供密钥位置。有关更多信息,请参阅 创建机器人应用程序版本 (p. 47) 或 创建模拟应用程序版本 (p. 47)。

是否已超出您的子网 ENI 限制?AWS RoboMaker 在运行模拟作业的子网中,为每个并发模拟作业使用一个弹性网络接口 (ENI)。必须为每个接口分配一个 IP 地址。要解决此问题,您可以:

166

Page 175: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南模拟作业失败

• 删除未使用的 ENIs 以释放子网中的 IP 地址。要删除未使用的 ENI,请参阅删除网络接口。• 为特定 区域中的 请求ENIs提高服务限制AWS。

是否已正确配置启动命令?如果您的模拟很复杂,Gazebo 可能需要几分钟才能启动。如果 AWS RoboMaker 准备模拟作业的时间超过10 分钟,则启动命令可能有问题。

取消该作业,然后创建新的模拟作业。如果问题仍存在,请联系 AWS Support。

也可能其中一个 ROS 节点没有启动或遇到问题。查看模拟日志以了解错误。您也可以使用终端模拟来连接正在运行的模拟作业并排查其问题。

您的子网是否在 AWS RoboMaker 支持的区域内?提供 AWS RoboMaker 支持的两个 AWS 可用区中的子网。API 响应包含受支持的 AWS 可用区的列表。

启动文件和程序包名称是否正确?使用 CloudWatch Logs 验证模拟作业使用的程序包名称和启动文件。筛选到 roslaunch 事件,然后展开每个事件以查找与以下内容类似的问题。

[launch_file.launch] is neither a launch file in package [package_name] nor is [package_name] a launch file name

是否在启动文件中正确命名节点程序包?使用 CloudWatch Logs 验证模拟作业使用的节点程序包名称。筛选到 cannot launch node 事件,然后展开每个事件以查找与以下内容类似的问题。

ERROR: cannot launch node of type [node_package_name/node_type]: node_package_name

您是否包含了错误的启动文件?使用 CloudWatch Logs 检查是否未找到启动文件。筛选到 roslaunch 事件,然后展开每个事件以查找与以下内容类似的问题。

while processing directory/path/to/launch/launch_fileInvalid roslaunch XML syntax: [Errno 2] No such file or directory: 'directory/path/to/launch/launch_file'

您的世界文件模型引用是否正确?使用 CloudWatch Logs 验证世界文件中的所有模型是否正确。如果找不到模型,您将看到类似于以下内容的信息。

[Wrn] [ModelDatabase.cc:340] Getting models from[http://models.gazebosim.org/]. This may take a few seconds.[Wrn] [ModelDatabase.cc:212] Unable to connect to model database using [http://models.gazebosim.org//database.config]. Only locally installed models will be available.[Err] [ModelDatabase.cc:414] Unable to download model[model://model_name][Err] [SystemPaths.cc:429] File or path does not exist[""]

167

Page 176: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南Simulation WorldForge 疑难解答

Error [parser.cc:581] Unable to find uri[model://model_name]

Simulation WorldForge 疑难解答本节可以帮助您修复 Simulation WorldForge 的问题。

主题• 为什么我的世界代作业失败? (p. 168)• 为什么我的世界导出任务失败? (p. 168)

为什么我的世界代作业失败?本节可以帮助您解决 Simulation WorldForge 模拟世界代的问题。

您的世界计数是 0 还是大于 50?如果您的世界生成作业未完成,请确保您的世界计数 floorplanCount *interiorCountPerFloorplan 大于 1 且小于 50。

为什么我的世界导出任务失败?本部分可以帮助您解决 Simulation WorldForge 世界导出任务的问题。

您是否具有针对 AWS RoboMaker 的信任策略?如果您在从 AWS CLI 调用 create-world-export-job 时传递 IAM 角色的完整 Amazon 资源名称(ARN),则您的信任策略可能没有足够的权限。检查角色,确保该角色与 robomaker.amazonaws.com 具有信任关系。

您的角色是否有权发布到 Amazon S3?如果您为导出任务指定输出 Amazon S3 存储桶,则您的角色必须具有该存储桶的权限。更新您的信任策略以包含以下权限:

{ "Effect": "Allow", "Action": [ "s3:AbortMultipartUpload", "s3:GetObject", "s3:PutObject" ], "Resource": “my-bucket"}

您是否修改或删除为导出任务指定的存储桶?如果您在导出任务期间更新存储桶,您可能会在导出任务中收到 ResourceNotFound 错误。

开发环境问题排查本部分帮助您解决与在 AWS RoboMaker 环境中创建应用程序相关的问题。

168

Page 177: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南示例代码存在问题

示例代码存在问题如果示例代码出现问题,请参阅以下解决方案。

示例是否安装失败?如果 AWS Cloud9 正在运行后台更新,则可能无法安装示例。IDE 尝试更新存储库的依赖项时可能会出现问题。请等待几分钟,然后重试。

部署问题排查本节可以帮助您解决将机器人应用程序部署到队列时的问题。

我的部署失败请参阅以下主题了解常见解决方案。

您的机器人是否为队列的一部分?机器人必须是队组的一部分才能接收部署。要在 AWS RoboMaker 控制台中查看机器人的状态,请展开Fleet management (队组管理),然后选择 Robots (机器人)。已注册到队组的机器人将包含 Fleet name (队组名称)。

AWS IoT Greengrass 是否正在机器人上运行?要配置和运行 AWS IoT Greengrass 核心软件,请按照模块 1: 中的步骤操作。 Greengrass 环境设置,然后按照在核心设备上启动 AWS Greengrass 中的步骤操作。

有关如何验证设备支持 AWS IoT Greengrass 的更多信息,请参阅https://docs.aws.amazon.com/greengrass/latest/developerguide/device-tester-for-greengrass-ug.html适用于 AWS 的 AWS IoT DeviceTester IoTGreengrass。

资源是否缺失?在部署详细信息页面上,查看 Failure reason (故障原因)。它将列出缺少的资源。验证资源是否存在。例如,如果机器人应用程序丢失,则可能已从 Amazon S3 位置删除它。此外,Amazon S3 ETag 信息可能不正确。

AWS IoT Greengrass 部署是否遇到了问题?在部署详细信息页面上,查看 Failure reason (故障原因)。它将包含更多详细信息。

如果 AWS IoT Greengrass 在启动或重新启动时遇到问题,请查看位于 /greengrass/ggc/var/log/system/runtime.log 的机器人上的 AWS IoT Greengrass 系统日志。

要排查问题,请参阅 AWS IoT Greengrass 问题排查。

您是否收到错误 x509:由未知颁发机构签署的证书?如果您最近通过机器人中的 AWS RoboMaker 或 AWS IoT Greengrass 更新了认证或配置文件,则可能会发生此错误。错误显示在日志 /greengrass/ggc/var/log/system/runtime.log 中。 要解决此问题,请升级机器人中的 root.ca.pem。要升级,请按照在核心设备上启动 AWS IoT Greengrass 中的步骤 5 操作。

169

Page 178: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南我的部署失败

是否违反了故障阈值?如果超过失败阈值,部署将停止。您可以增大阈值以尝试部署到队组的更多部分。

部署时间是否超过预期?部署时间取决于机器人应用程序包的大小。它还取决于机器人网络状况。如果您有许多机器人并同时部署少量机器人,则部署可能需要更长时间。

启动后,单个机器人部署超时为五小时。使用部署详细信息页面来标识拥有有效部署的机器人。使用 SSH 进行连接。使用命令 ps aux | grep 'greengrass' 验证 AWS IoT Greengrass 是否正在运行。要排查问题,请参阅 AWS IoT Greengrass 问题排查。

您的机器人是否收到了部署请求?如果 AWS IoT Greengrass 未正确配置并运行,则机器人可能无法收到部署请求。

首先,验证您的机器人是否收到了部署请求。SSH 至机器人。连接后,使用 s aux | grep'greengrass' 查看 AWS IoT Greengrass 是否正在运行。查看位于 /greengrass/ggc/var/log/user/region/account/aws-robomaker-deployment-function-robotarchitecture_DO_NOT_DELETE.log 的日志中的错误。

如果日志中没有错误,请确保您已安装 AWS IoT Greengrass 版本 1.7.0 或更高版本。请参阅模块1:。Greengrass 的环境设置了解更多信息。

接下来,使用以下命令确保 AWS IoT Greengrass 正在运行。

ps aux | grep 'greengrass'

如果它正在运行,请查看位于机器人上的 AWS IoT Greengrass 系统日志(位于 /greengrass/ggc/var/log/system/runtime.log)。 有关其他故障排除信息,请参阅 AWS IoT Greengrass 故障排除。

使用脱机机器人,最新部署或最后一次部署是否能够成功?如果您由于机器人不可用而在新的部署中收到 RobotAgentResponseTimeoutException,则当它可用时,将下载最新的(超时)部署。机器人完成部署后,会更新机器人状态。状态从 NoResponse 更改为InSync。

您是否尝试覆盖在捆绑包设置脚本中提供的环境变量?源自安装捆绑包脚本的环境变量可以覆盖创建作业时定义的类似变量。要避免此问题,请定义一个新的唯一的环境变量,或更改设置脚本中使用的值。

ROS 没有在设备重启时重新启动如果 AWS IoT Greengrass 守护程序未配置为在重新启动时运行,则无法重新启动。要修改设备 init 系统以运行 AWS IoT Greengrass 守护程序,请参阅配置 Init 系统以开始 Greengrass 守护程序。

ROS 需要根用户权限您可以通过在 ggc_user 中配置 Linux 用户配置文件来授予 /etc/passwd 根特权权限。 您可以将user_id 和 group_id 设置为 0。 使用以下命令。

name:password:user_ID:group_ID:gecos:home directory:shell ggc_user:x:0:0::/home/ggc_user:/bin/false

170

Page 179: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南如何在机器人上使用本地库?

管理机器人应用程序和默认 ROS HOME 目录AWS IoT Greengrass 当前会将机器人应用程序下载到 /home/ggc_user 文件夹(如果在创建 ggc_user时已创建)。 否则,它会下载到 /tmp/roboMakerDeploymentPackage。 重新启动时,可能会清理 /tmp 目录。

如果您不希望在重启后删除捆绑包,请确保目录 /home/ggc_user 存在并且 ggc_user 具有读取和写入权限。

默认 ROS_HOME 目录为 /home/ggc_user/ros/home/deployment-id。 如果 ggc_user 主目录不存在,则默认目录为 /tmp/ros/home/deployment-id。 您还可以在创建部署作业时通过将其添加到环境变量来指定 ROS_HOME 目录。ggc_user 必须对该文件夹具有读取和写入权限。

如果 /tmp/roboMakerDeploymentPackage 已添加到 tmpfiles.d 配置文件以将其保留在 tmp 文件夹中,请删除它。

Note

AWS RoboMaker 部署会清除机器人应用程序文件夹。它不清理 ROS_HOME 文件夹。使用部署前或部署后脚本来管理目录。

如何在机器人上使用本地库?您可以覆盖或链接已部署的捆绑包以使用本地 ROS 库。为此,请在创建部署作业时提供环境变量。例如,将 ROS_ROOT 设置为本地 ROS。

"ROS_ROOT":"/opt/ros/kinetic/share/ros"

您是否遇到机器人应用程序版本 ETag 不匹配的情况?当选定的机器人应用程序版本的源文件(Amazon S3 对象)在创建版本后发生修改,而 Etag 不再匹配时,会发生这种情况。在创建机器人应用程序版本时,AWS RoboMaker 会记住版本的 Amazon S3 路径和ETag。您不能删除或修改版本。

要解决此问题,请找到源文件的未修改版本、使用其他版本或者创建新的版本。有关应用程序版本控制的更多信息,请参阅应用程序版本控制 (p. 22)。

对 Colcon 构建和捆绑进行问题排查帮助使用 colcon 构建和捆绑应用程序。有关捆绑格式和其他技术细节的更多信息,请参阅 AWS 开源博客RoboMaker上的构建和捆绑适用于 AWS 的 ROS 应用程序。

Colcon 构建失败请参阅以下主题了解常见解决方案。

嵌套文件夹中是否有 CMakeLists.txt 文件?如果您要构建一个使用 catkin_make 构建的 ROS1 应用程序,则 colcon 可能无法正确枚举工作区中的所有程序包。这通常是由一个或多个中间目录中的嵌套文件夹结构以及 CMakeLists.txt 造成的。colcon 支持嵌套文件夹结构并自动查找您的程序包。

例如,intermediate_directory 中的 CMakeLists.txt 不是必需的。

171

Page 180: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南Colcon 捆绑失败

src/### package_1/# ### package.xml| ### CMakeLists.txt # okay### intermediate_directory/ ### package_2 | ### package.xml | ### CMakeLists.txt # okay ### package_3 | ### package.xml | ### CMakeLists.txt # okay ### CMakeLists.txt # !!! remove !!!

中存在缺失的安装指令CMakeLists.txt?如果您要构建一个使用 catkin_make 构建的 ROS1 应用程序,则 devel 目录及其 setup.sh 会将所有本地程序包添加到 ROS 工具的搜索路径中。colcon 具有不同的行为。它将您指定的目标安装到 install 目录,以便您的所有 cmake install() 指令都得以执行。

如果您遇到 [my_launchfile] is neither a launch file in package [my_package]nor is [my_package] a launch file name 或 [rosrun] Couldn't find executablenamed my_node below /opt/ros/$ROS_DISTRO/share/my_package 等错误,那么在您的CMakeLists.txt 中添加 install() 调用可能会解决此问题。

有关如何修复此问题的更多示例,请参阅 ROS Wiki。

Colcon 捆绑失败请参阅以下主题了解常见解决方案。

无法为 [package_name] 找到 rosdep 定义确保您使用的是您希望依赖的 ROS 程序包的正确名称。例如,程序包在 ros-kinetic-packagename中可能名为 apt,但在您的 package.xml 中,它应该为 packagename。 搜索 ROS 发行版 GitHub 存储库以查看程序包是否在 rosdep 数据库中。如果该包确实,则将依赖项添加到 rosdep。有关将依赖项添加到rosdep 的更多信息,请参阅 教程。

缺少依赖项缺少依赖项的常见错误消息包括:

• Could not load libxyz.so

• No such file or directory some_script.py

• Could not load module 'python_dependency'

要解决此问题,请将依赖项添加到需要它的程序包的 package.xml。重试捆绑命令。

如果您的应用程序使用来自您自己的 apt 或 pip 存储库的依赖项,则在调用 colcon bundle 时,您需要包含这些存储库。 要解决此问题,请尝试以下操作。

• 对于包含 --apt-sources-list 参数的 colcon bundle, 覆盖 apt 安装程序使用的 sources.lst。要避免基础操作系统和 ROS 程序包的分辨率错误,我们建议您包含我们当前使用的所有源。有关更多信息,请参阅 上的 examplesources.listGitHub。

• 要覆盖 pip 或 pip3 源,请使用 --pip-args 和 --pip3-args 参数。这些参数后面的字符串将直接传递到 pip。例如,--extra-index-url https://my-custom-pip-repo/index。

172

Page 181: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南Actions

API 参考本节包含 API 参考文档。

ActionsThe following actions are supported:

• BatchDeleteWorlds (p. 175)• BatchDescribeSimulationJob (p. 177)• CancelDeploymentJob (p. 181)• CancelSimulationJob (p. 183)• CancelSimulationJobBatch (p. 185)• CancelWorldExportJob (p. 187)• CancelWorldGenerationJob (p. 189)• CreateDeploymentJob (p. 191)• CreateFleet (p. 197)• CreateRobot (p. 200)• CreateRobotApplication (p. 204)• CreateRobotApplicationVersion (p. 208)• CreateSimulationApplication (p. 212)• CreateSimulationApplicationVersion (p. 217)• CreateSimulationJob (p. 221)• CreateWorldExportJob (p. 231)• CreateWorldGenerationJob (p. 236)• CreateWorldTemplate (p. 242)• DeleteFleet (p. 246)• DeleteRobot (p. 248)• DeleteRobotApplication (p. 250)• DeleteSimulationApplication (p. 252)• DeleteWorldTemplate (p. 254)• DeregisterRobot (p. 256)• DescribeDeploymentJob (p. 259)• DescribeFleet (p. 263)• DescribeRobot (p. 267)• DescribeRobotApplication (p. 271)• DescribeSimulationApplication (p. 275)• DescribeSimulationJob (p. 279)• DescribeSimulationJobBatch (p. 286)• DescribeWorld (p. 293)• DescribeWorldExportJob (p. 296)• DescribeWorldGenerationJob (p. 300)• DescribeWorldTemplate (p. 305)

173

Page 182: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南Actions

• GetWorldTemplateBody (p. 308)• ListDeploymentJobs (p. 310)• ListFleets (p. 314)• ListRobotApplications (p. 317)• ListRobots (p. 320)• ListSimulationApplications (p. 323)• ListSimulationJobBatches (p. 326)• ListSimulationJobs (p. 329)• ListTagsForResource (p. 332)• ListWorldExportJobs (p. 334)• ListWorldGenerationJobs (p. 337)• ListWorlds (p. 340)• ListWorldTemplates (p. 343)• RegisterRobot (p. 346)• RestartSimulationJob (p. 349)• StartSimulationJobBatch (p. 351)• SyncDeploymentJob (p. 360)• TagResource (p. 365)• UntagResource (p. 367)• UpdateRobotApplication (p. 369)• UpdateSimulationApplication (p. 373)• UpdateWorldTemplate (p. 378)

174

Page 183: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南BatchDeleteWorlds

BatchDeleteWorldsDeletes one or more worlds in a batch operation.

Request Syntax

POST /batchDeleteWorlds HTTP/1.1Content-type: application/json

{ "worlds": [ "string" ]}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

worlds (p. 175)

A list of Amazon Resource Names (arns) that correspond to worlds to delete.

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 100 items.

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: Yes

Response Syntax

HTTP/1.1 200Content-type: application/json

{ "unprocessedWorlds": [ "string" ]}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

unprocessedWorlds (p. 175)

A list of unprocessed worlds associated with the call. These worlds were not deleted.

Type: Array of strings

175

Page 184: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南BatchDeleteWorlds

Array Members: Minimum number of 1 item. Maximum number of 100 items.

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

176

Page 185: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南BatchDescribeSimulationJob

BatchDescribeSimulationJobDescribes one or more simulation jobs.

Request Syntax

POST /batchDescribeSimulationJob HTTP/1.1Content-type: application/json

{ "jobs": [ "string" ]}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

jobs (p. 177)

A list of Amazon Resource Names (ARNs) of simulation jobs to describe.

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 100 items.

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: Yes

Response Syntax

HTTP/1.1 200Content-type: application/json

{ "jobs": [ { "arn": "string", "clientRequestToken": "string", "compute": { "simulationUnitLimit": number }, "dataSources": [ { "name": "string", "s3Bucket": "string", "s3Keys": [ { "etag": "string", "s3Key": "string" }

177

Page 186: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南BatchDescribeSimulationJob

] } ], "failureBehavior": "string", "failureCode": "string", "failureReason": "string", "iamRole": "string", "lastStartedAt": number, "lastUpdatedAt": number, "loggingConfig": { "recordAllRosTopics": boolean }, "maxJobDurationInSeconds": number, "name": "string", "networkInterface": { "networkInterfaceId": "string", "privateIpAddress": "string", "publicIpAddress": "string" }, "outputLocation": { "s3Bucket": "string", "s3Prefix": "string" }, "robotApplications": [ { "application": "string", "applicationVersion": "string", "launchConfig": { "environmentVariables": { "string" : "string" }, "launchFile": "string", "packageName": "string", "portForwardingConfig": { "portMappings": [ { "applicationPort": number, "enableOnPublicIp": boolean, "jobPort": number } ] }, "streamUI": boolean } } ], "simulationApplications": [ { "application": "string", "applicationVersion": "string", "launchConfig": { "environmentVariables": { "string" : "string" }, "launchFile": "string", "packageName": "string", "portForwardingConfig": { "portMappings": [ { "applicationPort": number, "enableOnPublicIp": boolean, "jobPort": number } ] }, "streamUI": boolean

178

Page 187: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南BatchDescribeSimulationJob

}, "worldConfigs": [ { "world": "string" } ] } ], "simulationTimeMillis": number, "status": "string", "tags": { "string" : "string" }, "vpcConfig": { "assignPublicIp": boolean, "securityGroups": [ "string" ], "subnets": [ "string" ], "vpcId": "string" } } ], "unprocessedJobs": [ "string" ]}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

jobs (p. 177)

A list of simulation jobs.

Type: Array of SimulationJob (p. 423) objectsunprocessedJobs (p. 177)

A list of unprocessed simulation job Amazon Resource Names (ARNs).

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 100 items.

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

179

Page 188: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南BatchDescribeSimulationJob

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

180

Page 189: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CancelDeploymentJob

CancelDeploymentJobCancels the specified deployment job.

Request SyntaxPOST /cancelDeploymentJob HTTP/1.1Content-type: application/json

{ "job": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

job (p. 181)

The deployment job ARN to cancel.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: Yes

Response SyntaxHTTP/1.1 200

Response ElementsIf the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

181

Page 190: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CancelDeploymentJob

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

182

Page 191: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CancelSimulationJob

CancelSimulationJobCancels the specified simulation job.

Request SyntaxPOST /cancelSimulationJob HTTP/1.1Content-type: application/json

{ "job": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

job (p. 183)

The simulation job ARN to cancel.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: Yes

Response SyntaxHTTP/1.1 200

Response ElementsIf the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

183

Page 192: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CancelSimulationJob

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

184

Page 193: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CancelSimulationJobBatch

CancelSimulationJobBatchCancels a simulation job batch. When you cancel a simulation job batch, you are also cancelling all of theactive simulation jobs created as part of the batch.

Request SyntaxPOST /cancelSimulationJobBatch HTTP/1.1Content-type: application/json

{ "batch": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

batch (p. 185)

The id of the batch to cancel.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: Yes

Response SyntaxHTTP/1.1 200

Response ElementsIf the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

185

Page 194: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CancelSimulationJobBatch

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

186

Page 195: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CancelWorldExportJob

CancelWorldExportJobCancels the specified export job.

Request SyntaxPOST /cancelWorldExportJob HTTP/1.1Content-type: application/json

{ "job": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

job (p. 187)

The Amazon Resource Name (arn) of the world export job to cancel.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: Yes

Response SyntaxHTTP/1.1 200

Response ElementsIf the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

187

Page 196: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CancelWorldExportJob

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

188

Page 197: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CancelWorldGenerationJob

CancelWorldGenerationJobCancels the specified world generator job.

Request SyntaxPOST /cancelWorldGenerationJob HTTP/1.1Content-type: application/json

{ "job": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

job (p. 189)

The Amazon Resource Name (arn) of the world generator job to cancel.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: Yes

Response SyntaxHTTP/1.1 200

Response ElementsIf the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

189

Page 198: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CancelWorldGenerationJob

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

190

Page 199: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateDeploymentJob

CreateDeploymentJobDeploys a specific version of a robot application to robots in a fleet.

The robot application must have a numbered applicationVersion for consistency reasons. To create anew version, use CreateRobotApplicationVersion or see Creating a Robot Application Version.

Note

After 90 days, deployment jobs expire and will be deleted. They will no longer be accessible.

Request Syntax

POST /createDeploymentJob HTTP/1.1Content-type: application/json

{ "clientRequestToken": "string", "deploymentApplicationConfigs": [ { "application": "string", "applicationVersion": "string", "launchConfig": { "environmentVariables": { "string" : "string" }, "launchFile": "string", "packageName": "string", "postLaunchFile": "string", "preLaunchFile": "string" } } ], "deploymentConfig": { "concurrentDeploymentPercentage": number, "downloadConditionFile": { "bucket": "string", "etag": "string", "key": "string" }, "failureThresholdPercentage": number, "robotDeploymentTimeoutInSeconds": number }, "fleet": "string", "tags": { "string" : "string" }}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

clientRequestToken (p. 191)

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

191

Page 200: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateDeploymentJob

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-zA-Z0-9_\-=]*

Required: YesdeploymentApplicationConfigs (p. 191)

The deployment application configuration.

Type: Array of DeploymentApplicationConfig (p. 387) objects

Array Members: Fixed number of 1 item.

Required: YesdeploymentConfig (p. 191)

The requested deployment configuration.

Type: DeploymentConfig (p. 388) object

Required: Nofleet (p. 191)

The Amazon Resource Name (ARN) of the fleet to deploy.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: Yestags (p. 191)

A map that contains tag keys and tag values that are attached to the deployment job.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Required: No

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "arn": "string",

192

Page 201: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateDeploymentJob

"createdAt": number, "deploymentApplicationConfigs": [ { "application": "string", "applicationVersion": "string", "launchConfig": { "environmentVariables": { "string" : "string" }, "launchFile": "string", "packageName": "string", "postLaunchFile": "string", "preLaunchFile": "string" } } ], "deploymentConfig": { "concurrentDeploymentPercentage": number, "downloadConditionFile": { "bucket": "string", "etag": "string", "key": "string" }, "failureThresholdPercentage": number, "robotDeploymentTimeoutInSeconds": number }, "failureCode": "string", "failureReason": "string", "fleet": "string", "status": "string", "tags": { "string" : "string" }}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

arn (p. 192)

The Amazon Resource Name (ARN) of the deployment job.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*createdAt (p. 192)

The time, in milliseconds since the epoch, when the fleet was created.

Type: TimestampdeploymentApplicationConfigs (p. 192)

The deployment application configuration.

Type: Array of DeploymentApplicationConfig (p. 387) objects

Array Members: Fixed number of 1 item.

193

Page 202: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateDeploymentJob

deploymentConfig (p. 192)

The deployment configuration.

Type: DeploymentConfig (p. 388) objectfailureCode (p. 192)

The failure code of the simulation job if it failed:BadPermissionError

AWS Greengrass requires a service-level role permission to access other services. The role mustinclude the AWSGreengrassResourceAccessRolePolicy managed policy.

ExtractingBundleFailure

The robot application could not be extracted from the bundle.FailureThresholdBreached

The percentage of robots that could not be updated exceeded the percentage set for thedeployment.

GreengrassDeploymentFailed

The robot application could not be deployed to the robot.GreengrassGroupVersionDoesNotExist

The AWS Greengrass group or version associated with a robot is missing.InternalServerError

An internal error has occurred. Retry your request, but if the problem persists, contact us withdetails.

MissingRobotApplicationArchitecture

The robot application does not have a source that matches the architecture of the robot.MissingRobotDeploymentResource

One or more of the resources specified for the robot application are missing. For example, doesthe robot application have the correct launch package and launch file?

PostLaunchFileFailure

The post-launch script failed.PreLaunchFileFailure

The pre-launch script failed.ResourceNotFound

One or more deployment resources are missing. For example, do robot application source bundlesstill exist?

RobotDeploymentNoResponse

There is no response from the robot. It might not be powered on or connected to the internet.

Type: String

Valid Values: ResourceNotFound | EnvironmentSetupError |EtagMismatch | FailureThresholdBreached | RobotDeploymentAborted| RobotDeploymentNoResponse | RobotAgentConnectionTimeout| GreengrassDeploymentFailed | InvalidGreengrassGroup |MissingRobotArchitecture | MissingRobotApplicationArchitecture |

194

Page 203: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateDeploymentJob

MissingRobotDeploymentResource | GreengrassGroupVersionDoesNotExist| LambdaDeleted | ExtractingBundleFailure | PreLaunchFileFailure |PostLaunchFileFailure | BadPermissionError | DownloadConditionFailed |InternalServerError

failureReason (p. 192)

The failure reason of the deployment job if it failed.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1024.

Pattern: .*fleet (p. 192)

The target fleet for the deployment job.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*status (p. 192)

The status of the deployment job.

Type: String

Valid Values: Pending | Preparing | InProgress | Failed | Succeeded | Canceledtags (p. 192)

The list of all tags added to the deployment job.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

ConcurrentDeploymentException

The failure percentage threshold percentage was met.

HTTP Status Code: 400IdempotentParameterMismatchException

The request uses the same client token as a previous, but non-identical request. Do not reuse a clienttoken with different requests, unless the requests are identical.

195

Page 204: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateDeploymentJob

HTTP Status Code: 400InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400LimitExceededException

The requested resource exceeds the maximum number allowed, or the number of concurrent streamrequests exceeds the maximum number allowed.

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

196

Page 205: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateFleet

CreateFleetCreates a fleet, a logical group of robots running the same robot application.

Request Syntax

POST /createFleet HTTP/1.1Content-type: application/json

{ "name": "string", "tags": { "string" : "string" }}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

name (p. 197)

The name of the fleet.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*

Required: Yestags (p. 197)

A map that contains tag keys and tag values that are attached to the fleet.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Required: No

Response Syntax

HTTP/1.1 200

197

Page 206: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateFleet

Content-type: application/json

{ "arn": "string", "createdAt": number, "name": "string", "tags": { "string" : "string" }}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

arn (p. 197)

The Amazon Resource Name (ARN) of the fleet.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*createdAt (p. 197)

The time, in milliseconds since the epoch, when the fleet was created.

Type: Timestampname (p. 197)

The name of the fleet.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*tags (p. 197)

The list of all tags added to the fleet.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

198

Page 207: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateFleet

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400LimitExceededException

The requested resource exceeds the maximum number allowed, or the number of concurrent streamrequests exceeds the maximum number allowed.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

199

Page 208: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateRobot

CreateRobotCreates a robot.

Request Syntax

POST /createRobot HTTP/1.1Content-type: application/json

{ "architecture": "string", "greengrassGroupId": "string", "name": "string", "tags": { "string" : "string" }}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

architecture (p. 200)

The target architecture of the robot.

Type: String

Valid Values: X86_64 | ARM64 | ARMHF

Required: YesgreengrassGroupId (p. 200)

The Greengrass group id.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: .*

Required: Yesname (p. 200)

The name for the robot.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*

Required: Yes

200

Page 209: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateRobot

tags (p. 200)

A map that contains tag keys and tag values that are attached to the robot.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Required: No

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "architecture": "string", "arn": "string", "createdAt": number, "greengrassGroupId": "string", "name": "string", "tags": { "string" : "string" }}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

architecture (p. 201)

The target architecture of the robot.

Type: String

Valid Values: X86_64 | ARM64 | ARMHFarn (p. 201)

The Amazon Resource Name (ARN) of the robot.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*createdAt (p. 201)

The time, in milliseconds since the epoch, when the robot was created.

201

Page 210: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateRobot

Type: TimestampgreengrassGroupId (p. 201)

The Amazon Resource Name (ARN) of the Greengrass group associated with the robot.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: .*name (p. 201)

The name of the robot.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*tags (p. 201)

The list of all tags added to the robot.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400LimitExceededException

The requested resource exceeds the maximum number allowed, or the number of concurrent streamrequests exceeds the maximum number allowed.

HTTP Status Code: 400ResourceAlreadyExistsException

The specified resource already exists.

202

Page 211: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateRobot

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

203

Page 212: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateRobotApplication

CreateRobotApplicationCreates a robot application.

Request Syntax

POST /createRobotApplication HTTP/1.1Content-type: application/json

{ "name": "string", "robotSoftwareSuite": { "name": "string", "version": "string" }, "sources": [ { "architecture": "string", "s3Bucket": "string", "s3Key": "string" } ], "tags": { "string" : "string" }}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

name (p. 204)

The name of the robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*

Required: YesrobotSoftwareSuite (p. 204)

The robot software suite (ROS distribuition) used by the robot application.

Type: RobotSoftwareSuite (p. 417) object

Required: Yessources (p. 204)

The sources of the robot application.

Type: Array of SourceConfig (p. 436) objects

204

Page 213: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateRobotApplication

Required: Yestags (p. 204)

A map that contains tag keys and tag values that are attached to the robot application.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Required: No

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "arn": "string", "lastUpdatedAt": number, "name": "string", "revisionId": "string", "robotSoftwareSuite": { "name": "string", "version": "string" }, "sources": [ { "architecture": "string", "etag": "string", "s3Bucket": "string", "s3Key": "string" } ], "tags": { "string" : "string" }, "version": "string"}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

arn (p. 205)

The Amazon Resource Name (ARN) of the robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

205

Page 214: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateRobotApplication

Pattern: arn:.*lastUpdatedAt (p. 205)

The time, in milliseconds since the epoch, when the robot application was last updated.

Type: Timestampname (p. 205)

The name of the robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*revisionId (p. 205)

The revision id of the robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 40.

Pattern: [a-zA-Z0-9_.\-]*robotSoftwareSuite (p. 205)

The robot software suite (ROS distribution) used by the robot application.

Type: RobotSoftwareSuite (p. 417) objectsources (p. 205)

The sources of the robot application.

Type: Array of Source (p. 435) objectstags (p. 205)

The list of all tags added to the robot application.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*version (p. 205)

The version of the robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: (\$LATEST)|[0-9]*

206

Page 215: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateRobotApplication

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

IdempotentParameterMismatchException

The request uses the same client token as a previous, but non-identical request. Do not reuse a clienttoken with different requests, unless the requests are identical.

HTTP Status Code: 400InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400LimitExceededException

The requested resource exceeds the maximum number allowed, or the number of concurrent streamrequests exceeds the maximum number allowed.

HTTP Status Code: 400ResourceAlreadyExistsException

The specified resource already exists.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

207

Page 216: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateRobotApplicationVersion

CreateRobotApplicationVersionCreates a version of a robot application.

Request SyntaxPOST /createRobotApplicationVersion HTTP/1.1Content-type: application/json

{ "application": "string", "currentRevisionId": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

application (p. 208)

The application information for the robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: YescurrentRevisionId (p. 208)

The current revision id for the robot application. If you provide a value and it matches the latest revisionID, a new version will be created.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 40.

Pattern: [a-zA-Z0-9_.\-]*

Required: No

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "arn": "string", "lastUpdatedAt": number, "name": "string", "revisionId": "string", "robotSoftwareSuite": {

208

Page 217: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateRobotApplicationVersion

"name": "string", "version": "string" }, "sources": [ { "architecture": "string", "etag": "string", "s3Bucket": "string", "s3Key": "string" } ], "version": "string"}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

arn (p. 208)

The Amazon Resource Name (ARN) of the robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*lastUpdatedAt (p. 208)

The time, in milliseconds since the epoch, when the robot application was last updated.

Type: Timestampname (p. 208)

The name of the robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*revisionId (p. 208)

The revision id of the robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 40.

Pattern: [a-zA-Z0-9_.\-]*robotSoftwareSuite (p. 208)

The robot software suite (ROS distribution) used by the robot application.

Type: RobotSoftwareSuite (p. 417) objectsources (p. 208)

The sources of the robot application.

209

Page 218: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateRobotApplicationVersion

Type: Array of Source (p. 435) objectsversion (p. 208)

The version of the robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: (\$LATEST)|[0-9]*

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

IdempotentParameterMismatchException

The request uses the same client token as a previous, but non-identical request. Do not reuse a clienttoken with different requests, unless the requests are identical.

HTTP Status Code: 400InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400LimitExceededException

The requested resource exceeds the maximum number allowed, or the number of concurrent streamrequests exceeds the maximum number allowed.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3

210

Page 220: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateSimulationApplication

CreateSimulationApplicationCreates a simulation application.

Request Syntax

POST /createSimulationApplication HTTP/1.1Content-type: application/json

{ "name": "string", "renderingEngine": { "name": "string", "version": "string" }, "robotSoftwareSuite": { "name": "string", "version": "string" }, "simulationSoftwareSuite": { "name": "string", "version": "string" }, "sources": [ { "architecture": "string", "s3Bucket": "string", "s3Key": "string" } ], "tags": { "string" : "string" }}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

name (p. 212)

The name of the simulation application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*

Required: YesrenderingEngine (p. 212)

The rendering engine for the simulation application.

Type: RenderingEngine (p. 409) object

212

Page 221: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateSimulationApplication

Required: NorobotSoftwareSuite (p. 212)

The robot software suite (ROS distribution) used by the simulation application.

Type: RobotSoftwareSuite (p. 417) object

Required: YessimulationSoftwareSuite (p. 212)

The simulation software suite used by the simulation application.

Type: SimulationSoftwareSuite (p. 434) object

Required: Yessources (p. 212)

The sources of the simulation application.

Type: Array of SourceConfig (p. 436) objects

Required: Yestags (p. 212)

A map that contains tag keys and tag values that are attached to the simulation application.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Required: No

Response Syntax

HTTP/1.1 200Content-type: application/json

{ "arn": "string", "lastUpdatedAt": number, "name": "string", "renderingEngine": { "name": "string", "version": "string" }, "revisionId": "string", "robotSoftwareSuite": { "name": "string", "version": "string" }, "simulationSoftwareSuite": {

213

Page 222: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateSimulationApplication

"name": "string", "version": "string" }, "sources": [ { "architecture": "string", "etag": "string", "s3Bucket": "string", "s3Key": "string" } ], "tags": { "string" : "string" }, "version": "string"}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

arn (p. 213)

The Amazon Resource Name (ARN) of the simulation application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*lastUpdatedAt (p. 213)

The time, in milliseconds since the epoch, when the simulation application was last updated.

Type: Timestampname (p. 213)

The name of the simulation application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*renderingEngine (p. 213)

The rendering engine for the simulation application.

Type: RenderingEngine (p. 409) objectrevisionId (p. 213)

The revision id of the simulation application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 40.

Pattern: [a-zA-Z0-9_.\-]*

214

Page 223: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateSimulationApplication

robotSoftwareSuite (p. 213)

Information about the robot software suite (ROS distribution).

Type: RobotSoftwareSuite (p. 417) objectsimulationSoftwareSuite (p. 213)

The simulation software suite used by the simulation application.

Type: SimulationSoftwareSuite (p. 434) objectsources (p. 213)

The sources of the simulation application.

Type: Array of Source (p. 435) objectstags (p. 213)

The list of all tags added to the simulation application.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*version (p. 213)

The version of the simulation application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: (\$LATEST)|[0-9]*

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

IdempotentParameterMismatchException

The request uses the same client token as a previous, but non-identical request. Do not reuse a clienttoken with different requests, unless the requests are identical.

HTTP Status Code: 400InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

215

Page 224: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateSimulationApplication

HTTP Status Code: 400LimitExceededException

The requested resource exceeds the maximum number allowed, or the number of concurrent streamrequests exceeds the maximum number allowed.

HTTP Status Code: 400ResourceAlreadyExistsException

The specified resource already exists.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

216

Page 225: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateSimulationApplicationVersion

CreateSimulationApplicationVersionCreates a simulation application with a specific revision id.

Request SyntaxPOST /createSimulationApplicationVersion HTTP/1.1Content-type: application/json

{ "application": "string", "currentRevisionId": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

application (p. 217)

The application information for the simulation application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: YescurrentRevisionId (p. 217)

The current revision id for the simulation application. If you provide a value and it matches the latestrevision ID, a new version will be created.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 40.

Pattern: [a-zA-Z0-9_.\-]*

Required: No

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "arn": "string", "lastUpdatedAt": number, "name": "string", "renderingEngine": { "name": "string",

217

Page 226: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateSimulationApplicationVersion

"version": "string" }, "revisionId": "string", "robotSoftwareSuite": { "name": "string", "version": "string" }, "simulationSoftwareSuite": { "name": "string", "version": "string" }, "sources": [ { "architecture": "string", "etag": "string", "s3Bucket": "string", "s3Key": "string" } ], "version": "string"}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

arn (p. 217)

The Amazon Resource Name (ARN) of the simulation application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*lastUpdatedAt (p. 217)

The time, in milliseconds since the epoch, when the simulation application was last updated.

Type: Timestampname (p. 217)

The name of the simulation application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*renderingEngine (p. 217)

The rendering engine for the simulation application.

Type: RenderingEngine (p. 409) objectrevisionId (p. 217)

The revision ID of the simulation application.

Type: String

218

Page 227: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateSimulationApplicationVersion

Length Constraints: Minimum length of 1. Maximum length of 40.

Pattern: [a-zA-Z0-9_.\-]*robotSoftwareSuite (p. 217)

Information about the robot software suite (ROS distribution).

Type: RobotSoftwareSuite (p. 417) objectsimulationSoftwareSuite (p. 217)

The simulation software suite used by the simulation application.

Type: SimulationSoftwareSuite (p. 434) objectsources (p. 217)

The sources of the simulation application.

Type: Array of Source (p. 435) objectsversion (p. 217)

The version of the simulation application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: (\$LATEST)|[0-9]*

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

IdempotentParameterMismatchException

The request uses the same client token as a previous, but non-identical request. Do not reuse a clienttoken with different requests, unless the requests are identical.

HTTP Status Code: 400InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400LimitExceededException

The requested resource exceeds the maximum number allowed, or the number of concurrent streamrequests exceeds the maximum number allowed.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

219

Page 229: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateSimulationJob

CreateSimulationJobCreates a simulation job.

Note

After 90 days, simulation jobs expire and will be deleted. They will no longer be accessible.

Request SyntaxPOST /createSimulationJob HTTP/1.1Content-type: application/json

{ "clientRequestToken": "string", "compute": { "simulationUnitLimit": number }, "dataSources": [ { "name": "string", "s3Bucket": "string", "s3Keys": [ "string" ] } ], "failureBehavior": "string", "iamRole": "string", "loggingConfig": { "recordAllRosTopics": boolean }, "maxJobDurationInSeconds": number, "outputLocation": { "s3Bucket": "string", "s3Prefix": "string" }, "robotApplications": [ { "application": "string", "applicationVersion": "string", "launchConfig": { "environmentVariables": { "string" : "string" }, "launchFile": "string", "packageName": "string", "portForwardingConfig": { "portMappings": [ { "applicationPort": number, "enableOnPublicIp": boolean, "jobPort": number } ] }, "streamUI": boolean } } ], "simulationApplications": [ { "application": "string", "applicationVersion": "string", "launchConfig": { "environmentVariables": {

221

Page 230: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateSimulationJob

"string" : "string" }, "launchFile": "string", "packageName": "string", "portForwardingConfig": { "portMappings": [ { "applicationPort": number, "enableOnPublicIp": boolean, "jobPort": number } ] }, "streamUI": boolean }, "worldConfigs": [ { "world": "string" } ] } ], "tags": { "string" : "string" }, "vpcConfig": { "assignPublicIp": boolean, "securityGroups": [ "string" ], "subnets": [ "string" ] }}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

clientRequestToken (p. 221)

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-zA-Z0-9_\-=]*

Required: Nocompute (p. 221)

Compute information for the simulation job.

Type: Compute (p. 383) object

Required: NodataSources (p. 221)

Specify data sources to mount read-only files from S3 into your simulation. These files are availableunder /opt/robomaker/datasources/data_source_name.

222

Page 231: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateSimulationJob

Note

There is a limit of 100 files and a combined size of 25GB for all DataSourceConfig objects.

Type: Array of DataSourceConfig (p. 386) objects

Array Members: Minimum number of 1 item. Maximum number of 5 items.

Required: NofailureBehavior (p. 221)

The failure behavior the simulation job.Continue

Restart the simulation job in the same host instance.Fail

Stop the simulation job and terminate the instance.

Type: String

Valid Values: Fail | Continue

Required: NoiamRole (p. 221)

The IAM role name that allows the simulation instance to call the AWS APIs that are specified in itsassociated policies on your behalf. This is how credentials are passed in to your simulation job.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: arn:aws:iam::\w+:role/.*

Required: YesloggingConfig (p. 221)

The logging configuration.

Type: LoggingConfig (p. 402) object

Required: NomaxJobDurationInSeconds (p. 221)

The maximum simulation job duration in seconds (up to 14 days or 1,209,600 seconds. WhenmaxJobDurationInSeconds is reached, the simulation job will status will transition to Completed.

Type: Long

Required: YesoutputLocation (p. 221)

Location for output files generated by the simulation job.

Type: OutputLocation (p. 404) object

Required: No

223

Page 232: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateSimulationJob

robotApplications (p. 221)

The robot application to use in the simulation job.

Type: Array of RobotApplicationConfig (p. 412) objects

Array Members: Fixed number of 1 item.

Required: NosimulationApplications (p. 221)

The simulation application to use in the simulation job.

Type: Array of SimulationApplicationConfig (p. 420) objects

Array Members: Fixed number of 1 item.

Required: Notags (p. 221)

A map that contains tag keys and tag values that are attached to the simulation job.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Required: NovpcConfig (p. 221)

If your simulation job accesses resources in a VPC, you provide this parameter identifying the list ofsecurity group IDs and subnet IDs. These must belong to the same VPC. You must provide at leastone security group and one subnet ID.

Type: VPCConfig (p. 439) object

Required: No

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "arn": "string", "clientRequestToken": "string", "compute": { "simulationUnitLimit": number }, "dataSources": [ { "name": "string", "s3Bucket": "string",

224

Page 233: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateSimulationJob

"s3Keys": [ { "etag": "string", "s3Key": "string" } ] } ], "failureBehavior": "string", "failureCode": "string", "iamRole": "string", "lastStartedAt": number, "lastUpdatedAt": number, "loggingConfig": { "recordAllRosTopics": boolean }, "maxJobDurationInSeconds": number, "outputLocation": { "s3Bucket": "string", "s3Prefix": "string" }, "robotApplications": [ { "application": "string", "applicationVersion": "string", "launchConfig": { "environmentVariables": { "string" : "string" }, "launchFile": "string", "packageName": "string", "portForwardingConfig": { "portMappings": [ { "applicationPort": number, "enableOnPublicIp": boolean, "jobPort": number } ] }, "streamUI": boolean } } ], "simulationApplications": [ { "application": "string", "applicationVersion": "string", "launchConfig": { "environmentVariables": { "string" : "string" }, "launchFile": "string", "packageName": "string", "portForwardingConfig": { "portMappings": [ { "applicationPort": number, "enableOnPublicIp": boolean, "jobPort": number } ] }, "streamUI": boolean }, "worldConfigs": [

225

Page 234: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateSimulationJob

{ "world": "string" } ] } ], "simulationTimeMillis": number, "status": "string", "tags": { "string" : "string" }, "vpcConfig": { "assignPublicIp": boolean, "securityGroups": [ "string" ], "subnets": [ "string" ], "vpcId": "string" }}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

arn (p. 224)

The Amazon Resource Name (ARN) of the simulation job.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*clientRequestToken (p. 224)

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-zA-Z0-9_\-=]*compute (p. 224)

Compute information for the simulation job.

Type: ComputeResponse (p. 384) objectdataSources (p. 224)

The data sources for the simulation job.

Type: Array of DataSource (p. 385) objectsfailureBehavior (p. 224)

the failure behavior for the simulation job.

Type: String

Valid Values: Fail | Continue

226

Page 235: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateSimulationJob

failureCode (p. 224)

The failure code of the simulation job if it failed:InternalServiceError

Internal service error.RobotApplicationCrash

Robot application exited abnormally.SimulationApplicationCrash

Simulation application exited abnormally.BadPermissionsRobotApplication

Robot application bundle could not be downloaded.BadPermissionsSimulationApplication

Simulation application bundle could not be downloaded.BadPermissionsS3Output

Unable to publish outputs to customer-provided S3 bucket.BadPermissionsCloudwatchLogs

Unable to publish logs to customer-provided CloudWatch Logs resource.SubnetIpLimitExceeded

Subnet IP limit exceeded.ENILimitExceeded

ENI limit exceeded.BadPermissionsUserCredentials

Unable to use the Role provided.InvalidBundleRobotApplication

Robot bundle cannot be extracted (invalid format, bundling error, or other issue).InvalidBundleSimulationApplication

Simulation bundle cannot be extracted (invalid format, bundling error, or other issue).RobotApplicationVersionMismatchedEtag

Etag for RobotApplication does not match value during version creation.SimulationApplicationVersionMismatchedEtag

Etag for SimulationApplication does not match value during version creation.

Type: String

Valid Values: InternalServiceError | RobotApplicationCrash |SimulationApplicationCrash | BadPermissionsRobotApplication |BadPermissionsSimulationApplication | BadPermissionsS3Object| BadPermissionsS3Output | BadPermissionsCloudwatchLogs| SubnetIpLimitExceeded | ENILimitExceeded |BadPermissionsUserCredentials | InvalidBundleRobotApplication |InvalidBundleSimulationApplication | InvalidS3Resource | LimitExceeded| MismatchedEtag | RobotApplicationVersionMismatchedEtag |

227

Page 236: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateSimulationJob

SimulationApplicationVersionMismatchedEtag | ResourceNotFound |RequestThrottled | BatchTimedOut | BatchCanceled | InvalidInput |WrongRegionS3Bucket | WrongRegionS3Output | WrongRegionRobotApplication |WrongRegionSimulationApplication

iamRole (p. 224)

The IAM role that allows the simulation job to call the AWS APIs that are specified in its associatedpolicies on your behalf.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: arn:aws:iam::\w+:role/.*lastStartedAt (p. 224)

The time, in milliseconds since the epoch, when the simulation job was last started.

Type: TimestamplastUpdatedAt (p. 224)

The time, in milliseconds since the epoch, when the simulation job was last updated.

Type: TimestamploggingConfig (p. 224)

The logging configuration.

Type: LoggingConfig (p. 402) objectmaxJobDurationInSeconds (p. 224)

The maximum simulation job duration in seconds.

Type: LongoutputLocation (p. 224)

Simulation job output files location.

Type: OutputLocation (p. 404) objectrobotApplications (p. 224)

The robot application used by the simulation job.

Type: Array of RobotApplicationConfig (p. 412) objects

Array Members: Fixed number of 1 item.simulationApplications (p. 224)

The simulation application used by the simulation job.

Type: Array of SimulationApplicationConfig (p. 420) objects

Array Members: Fixed number of 1 item.simulationTimeMillis (p. 224)

The simulation job execution duration in milliseconds.

Type: Long

228

Page 237: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateSimulationJob

status (p. 224)

The status of the simulation job.

Type: String

Valid Values: Pending | Preparing | Running | Restarting | Completed | Failed |RunningFailed | Terminating | Terminated | Canceled

tags (p. 224)

The list of all tags added to the simulation job.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*vpcConfig (p. 224)

Information about the vpc configuration.

Type: VPCConfigResponse (p. 440) object

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

IdempotentParameterMismatchException

The request uses the same client token as a previous, but non-identical request. Do not reuse a clienttoken with different requests, unless the requests are identical.

HTTP Status Code: 400InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400LimitExceededException

The requested resource exceeds the maximum number allowed, or the number of concurrent streamrequests exceeds the maximum number allowed.

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

229

Page 238: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateSimulationJob

HTTP Status Code: 400ServiceUnavailableException

The request has failed due to a temporary failure of the server.

HTTP Status Code: 503ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

230

Page 239: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateWorldExportJob

CreateWorldExportJobCreates a world export job.

Request SyntaxPOST /createWorldExportJob HTTP/1.1Content-type: application/json

{ "clientRequestToken": "string", "iamRole": "string", "outputLocation": { "s3Bucket": "string", "s3Prefix": "string" }, "tags": { "string" : "string" }, "worlds": [ "string" ]}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

clientRequestToken (p. 231)

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-zA-Z0-9_\-=]*

Required: NoiamRole (p. 231)

The IAM role that the world export process uses to access the Amazon S3 bucket and put the export.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: arn:aws:iam::\w+:role/.*

Required: YesoutputLocation (p. 231)

The output location.

Type: OutputLocation (p. 404) object

Required: Yes

231

Page 240: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateWorldExportJob

tags (p. 231)

A map that contains tag keys and tag values that are attached to the world export job.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Required: Noworlds (p. 231)

A list of Amazon Resource Names (arns) that correspond to worlds to export.

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 100 items.

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: Yes

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "arn": "string", "clientRequestToken": "string", "createdAt": number, "failureCode": "string", "iamRole": "string", "outputLocation": { "s3Bucket": "string", "s3Prefix": "string" }, "status": "string", "tags": { "string" : "string" }}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

arn (p. 232)

The Amazon Resource Name (ARN) of the world export job.

232

Page 241: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateWorldExportJob

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*clientRequestToken (p. 232)

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-zA-Z0-9_\-=]*createdAt (p. 232)

The time, in milliseconds since the epoch, when the world export job was created.

Type: TimestampfailureCode (p. 232)

The failure code of the world export job if it failed:InternalServiceError

Internal service error.LimitExceeded

The requested resource exceeds the maximum number allowed, or the number of concurrentstream requests exceeds the maximum number allowed.

ResourceNotFound

The specified resource could not be found.RequestThrottled

The request was throttled.InvalidInput

An input parameter in the request is not valid.AllWorldGenerationFailed

All of the worlds in the world generation job failed. This can happen if your worldCount is greaterthan 50 or less than 1.

For more information about troubleshooting WorldForge, see Troubleshooting Simulation WorldForge.

Type: String

Valid Values: InternalServiceError | LimitExceeded | ResourceNotFound |RequestThrottled | InvalidInput | AccessDenied

iamRole (p. 232)

The IAM role that the world export process uses to access the Amazon S3 bucket and put the export.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: arn:aws:iam::\w+:role/.*

233

Page 242: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateWorldExportJob

outputLocation (p. 232)

The output location.

Type: OutputLocation (p. 404) objectstatus (p. 232)

The status of the world export job.Pending

The world export job request is pending.Running

The world export job is running.Completed

The world export job completed.Failed

The world export job failed. See failureCode for more information.Canceled

The world export job was cancelled.Canceling

The world export job is being cancelled.

Type: String

Valid Values: Pending | Running | Completed | Failed | Canceling | Canceledtags (p. 232)

A map that contains tag keys and tag values that are attached to the world export job.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

IdempotentParameterMismatchException

The request uses the same client token as a previous, but non-identical request. Do not reuse a clienttoken with different requests, unless the requests are identical.

HTTP Status Code: 400InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

234

Page 243: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateWorldExportJob

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ServiceUnavailableException

The request has failed due to a temporary failure of the server.

HTTP Status Code: 503ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

235

Page 244: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateWorldGenerationJob

CreateWorldGenerationJobCreates worlds using the specified template.

Request Syntax

POST /createWorldGenerationJob HTTP/1.1Content-type: application/json

{ "clientRequestToken": "string", "tags": { "string" : "string" }, "template": "string", "worldCount": { "floorplanCount": number, "interiorCountPerFloorplan": number }, "worldTags": { "string" : "string" }}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

clientRequestToken (p. 236)

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-zA-Z0-9_\-=]*

Required: Notags (p. 236)

A map that contains tag keys and tag values that are attached to the world generator job.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

236

Page 245: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateWorldGenerationJob

Required: Notemplate (p. 236)

The Amazon Resource Name (arn) of the world template describing the worlds you want to create.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: YesworldCount (p. 236)

Information about the world count.

Type: WorldCount (p. 443) object

Required: YesworldTags (p. 236)

A map that contains tag keys and tag values that are attached to the generated worlds.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Required: No

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "arn": "string", "clientRequestToken": "string", "createdAt": number, "failureCode": "string", "status": "string", "tags": { "string" : "string" }, "template": "string", "worldCount": { "floorplanCount": number, "interiorCountPerFloorplan": number }, "worldTags": { "string" : "string" }}

237

Page 246: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateWorldGenerationJob

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

arn (p. 237)

The Amazon Resource Name (ARN) of the world generator job.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*clientRequestToken (p. 237)

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-zA-Z0-9_\-=]*createdAt (p. 237)

The time, in milliseconds since the epoch, when the world generator job was created.

Type: TimestampfailureCode (p. 237)

The failure code of the world generator job if it failed:InternalServiceError

Internal service error.LimitExceeded

The requested resource exceeds the maximum number allowed, or the number of concurrentstream requests exceeds the maximum number allowed.

ResourceNotFound

The specified resource could not be found.RequestThrottled

The request was throttled.InvalidInput

An input parameter in the request is not valid.

Type: String

Valid Values: InternalServiceError | LimitExceeded | ResourceNotFound |RequestThrottled | InvalidInput | AllWorldGenerationFailed

status (p. 237)

The status of the world generator job.Pending

The world generator job request is pending.

238

Page 247: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateWorldGenerationJob

Running

The world generator job is running.Completed

The world generator job completed.Failed

The world generator job failed. See failureCode for more information.PartialFailed

Some worlds did not generate.Canceled

The world generator job was cancelled.Canceling

The world generator job is being cancelled.

Type: String

Valid Values: Pending | Running | Completed | Failed | PartialFailed |Canceling | Canceled

tags (p. 237)

A map that contains tag keys and tag values that are attached to the world generator job.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*template (p. 237)

The Amazon Resource Name (arn) of the world template.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*worldCount (p. 237)

Information about the world count.

Type: WorldCount (p. 443) objectworldTags (p. 237)

A map that contains tag keys and tag values that are attached to the generated worlds.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

239

Page 248: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateWorldGenerationJob

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

IdempotentParameterMismatchException

The request uses the same client token as a previous, but non-identical request. Do not reuse a clienttoken with different requests, unless the requests are identical.

HTTP Status Code: 400InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400LimitExceededException

The requested resource exceeds the maximum number allowed, or the number of concurrent streamrequests exceeds the maximum number allowed.

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ServiceUnavailableException

The request has failed due to a temporary failure of the server.

HTTP Status Code: 503ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET

240

Page 250: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateWorldTemplate

CreateWorldTemplateCreates a world template.

Request SyntaxPOST /createWorldTemplate HTTP/1.1Content-type: application/json

{ "clientRequestToken": "string", "name": "string", "tags": { "string" : "string" }, "templateBody": "string", "templateLocation": { "s3Bucket": "string", "s3Key": "string" }}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

clientRequestToken (p. 242)

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-zA-Z0-9_\-=]*

Required: Noname (p. 242)

The name of the world template.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 255.

Pattern: .*

Required: Notags (p. 242)

A map that contains tag keys and tag values that are attached to the world template.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

242

Page 251: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateWorldTemplate

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Required: NotemplateBody (p. 242)

The world template body.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 262144.

Pattern: [\S\s]+

Required: NotemplateLocation (p. 242)

The location of the world template.

Type: TemplateLocation (p. 437) object

Required: No

Response Syntax

HTTP/1.1 200Content-type: application/json

{ "arn": "string", "clientRequestToken": "string", "createdAt": number, "name": "string", "tags": { "string" : "string" }}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

arn (p. 243)

The Amazon Resource Name (ARN) of the world template.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

243

Page 252: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateWorldTemplate

clientRequestToken (p. 243)

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-zA-Z0-9_\-=]*createdAt (p. 243)

The time, in milliseconds since the epoch, when the world template was created.

Type: Timestampname (p. 243)

The name of the world template.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 255.

Pattern: .*tags (p. 243)

A map that contains tag keys and tag values that are attached to the world template.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400LimitExceededException

The requested resource exceeds the maximum number allowed, or the number of concurrent streamrequests exceeds the maximum number allowed.

244

Page 253: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南CreateWorldTemplate

HTTP Status Code: 400ResourceAlreadyExistsException

The specified resource already exists.

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

245

Page 254: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DeleteFleet

DeleteFleetDeletes a fleet.

Request SyntaxPOST /deleteFleet HTTP/1.1Content-type: application/json

{ "fleet": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

fleet (p. 246)

The Amazon Resource Name (ARN) of the fleet.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: Yes

Response SyntaxHTTP/1.1 200

Response ElementsIf the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

246

Page 255: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DeleteFleet

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

247

Page 256: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DeleteRobot

DeleteRobotDeletes a robot.

Request SyntaxPOST /deleteRobot HTTP/1.1Content-type: application/json

{ "robot": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

robot (p. 248)

The Amazon Resource Name (ARN) of the robot.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: Yes

Response SyntaxHTTP/1.1 200

Response ElementsIf the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

248

Page 257: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DeleteRobot

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

249

Page 258: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DeleteRobotApplication

DeleteRobotApplicationDeletes a robot application.

Request SyntaxPOST /deleteRobotApplication HTTP/1.1Content-type: application/json

{ "application": "string", "applicationVersion": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

application (p. 250)

The Amazon Resource Name (ARN) of the the robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: YesapplicationVersion (p. 250)

The version of the robot application to delete.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: (\$LATEST)|[0-9]*

Required: No

Response SyntaxHTTP/1.1 200

Response ElementsIf the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

250

Page 259: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DeleteRobotApplication

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

251

Page 260: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DeleteSimulationApplication

DeleteSimulationApplicationDeletes a simulation application.

Request SyntaxPOST /deleteSimulationApplication HTTP/1.1Content-type: application/json

{ "application": "string", "applicationVersion": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

application (p. 252)

The application information for the simulation application to delete.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: YesapplicationVersion (p. 252)

The version of the simulation application to delete.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: (\$LATEST)|[0-9]*

Required: No

Response SyntaxHTTP/1.1 200

Response ElementsIf the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

252

Page 261: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DeleteSimulationApplication

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

253

Page 262: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DeleteWorldTemplate

DeleteWorldTemplateDeletes a world template.

Request SyntaxPOST /deleteWorldTemplate HTTP/1.1Content-type: application/json

{ "template": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

template (p. 254)

The Amazon Resource Name (arn) of the world template you want to delete.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: Yes

Response SyntaxHTTP/1.1 200

Response ElementsIf the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

254

Page 263: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DeleteWorldTemplate

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

255

Page 264: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DeregisterRobot

DeregisterRobotDeregisters a robot.

Request Syntax

POST /deregisterRobot HTTP/1.1Content-type: application/json

{ "fleet": "string", "robot": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

fleet (p. 256)

The Amazon Resource Name (ARN) of the fleet.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: Yesrobot (p. 256)

The Amazon Resource Name (ARN) of the robot.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: Yes

Response Syntax

HTTP/1.1 200Content-type: application/json

{ "fleet": "string", "robot": "string"}

256

Page 265: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DeregisterRobot

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

fleet (p. 256)

The Amazon Resource Name (ARN) of the fleet.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*robot (p. 256)

The Amazon Resource Name (ARN) of the robot.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET

257

Page 267: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeDeploymentJob

DescribeDeploymentJobDescribes a deployment job.

Request SyntaxPOST /describeDeploymentJob HTTP/1.1Content-type: application/json

{ "job": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

job (p. 259)

The Amazon Resource Name (ARN) of the deployment job.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: Yes

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "arn": "string", "createdAt": number, "deploymentApplicationConfigs": [ { "application": "string", "applicationVersion": "string", "launchConfig": { "environmentVariables": { "string" : "string" }, "launchFile": "string", "packageName": "string", "postLaunchFile": "string", "preLaunchFile": "string" } } ], "deploymentConfig": { "concurrentDeploymentPercentage": number,

259

Page 268: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeDeploymentJob

"downloadConditionFile": { "bucket": "string", "etag": "string", "key": "string" }, "failureThresholdPercentage": number, "robotDeploymentTimeoutInSeconds": number }, "failureCode": "string", "failureReason": "string", "fleet": "string", "robotDeploymentSummary": [ { "arn": "string", "deploymentFinishTime": number, "deploymentStartTime": number, "failureCode": "string", "failureReason": "string", "progressDetail": { "currentProgress": "string", "estimatedTimeRemainingSeconds": number, "percentDone": number, "targetResource": "string" }, "status": "string" } ], "status": "string", "tags": { "string" : "string" }}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

arn (p. 259)

The Amazon Resource Name (ARN) of the deployment job.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*createdAt (p. 259)

The time, in milliseconds since the epoch, when the deployment job was created.

Type: TimestampdeploymentApplicationConfigs (p. 259)

The deployment application configuration.

Type: Array of DeploymentApplicationConfig (p. 387) objects

Array Members: Fixed number of 1 item.deploymentConfig (p. 259)

The deployment configuration.

260

Page 269: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeDeploymentJob

Type: DeploymentConfig (p. 388) objectfailureCode (p. 259)

The deployment job failure code.

Type: String

Valid Values: ResourceNotFound | EnvironmentSetupError |EtagMismatch | FailureThresholdBreached | RobotDeploymentAborted| RobotDeploymentNoResponse | RobotAgentConnectionTimeout| GreengrassDeploymentFailed | InvalidGreengrassGroup |MissingRobotArchitecture | MissingRobotApplicationArchitecture |MissingRobotDeploymentResource | GreengrassGroupVersionDoesNotExist| LambdaDeleted | ExtractingBundleFailure | PreLaunchFileFailure |PostLaunchFileFailure | BadPermissionError | DownloadConditionFailed |InternalServerError

failureReason (p. 259)

A short description of the reason why the deployment job failed.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1024.

Pattern: .*fleet (p. 259)

The Amazon Resource Name (ARN) of the fleet.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*robotDeploymentSummary (p. 259)

A list of robot deployment summaries.

Type: Array of RobotDeployment (p. 415) objectsstatus (p. 259)

The status of the deployment job.

Type: String

Valid Values: Pending | Preparing | InProgress | Failed | Succeeded | Canceledtags (p. 259)

The list of all tags added to the specified deployment job.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

261

Page 270: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeDeploymentJob

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

262

Page 271: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeFleet

DescribeFleetDescribes a fleet.

Request SyntaxPOST /describeFleet HTTP/1.1Content-type: application/json

{ "fleet": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

fleet (p. 263)

The Amazon Resource Name (ARN) of the fleet.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: Yes

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "arn": "string", "createdAt": number, "lastDeploymentJob": "string", "lastDeploymentStatus": "string", "lastDeploymentTime": number, "name": "string", "robots": [ { "architecture": "string", "arn": "string", "createdAt": number, "fleetArn": "string", "greenGrassGroupId": "string", "lastDeploymentJob": "string", "lastDeploymentTime": number, "name": "string", "status": "string" } ],

263

Page 272: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeFleet

"tags": { "string" : "string" }}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

arn (p. 263)

The Amazon Resource Name (ARN) of the fleet.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*createdAt (p. 263)

The time, in milliseconds since the epoch, when the fleet was created.

Type: TimestamplastDeploymentJob (p. 263)

The Amazon Resource Name (ARN) of the last deployment job.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*lastDeploymentStatus (p. 263)

The status of the last deployment.

Type: String

Valid Values: Pending | Preparing | InProgress | Failed | Succeeded | CanceledlastDeploymentTime (p. 263)

The time of the last deployment.

Type: Timestampname (p. 263)

The name of the fleet.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*robots (p. 263)

A list of robots.

Type: Array of Robot (p. 410) objects

264

Page 273: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeFleet

Array Members: Minimum number of 0 items. Maximum number of 1000 items.tags (p. 263)

The list of all tags added to the specified fleet.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python

265

Page 274: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeFleet

• AWS SDK for Ruby V3

266

Page 275: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeRobot

DescribeRobotDescribes a robot.

Request SyntaxPOST /describeRobot HTTP/1.1Content-type: application/json

{ "robot": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

robot (p. 267)

The Amazon Resource Name (ARN) of the robot to be described.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: Yes

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "architecture": "string", "arn": "string", "createdAt": number, "fleetArn": "string", "greengrassGroupId": "string", "lastDeploymentJob": "string", "lastDeploymentTime": number, "name": "string", "status": "string", "tags": { "string" : "string" }}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

267

Page 276: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeRobot

The following data is returned in JSON format by the service.

architecture (p. 267)

The target architecture of the robot application.

Type: String

Valid Values: X86_64 | ARM64 | ARMHFarn (p. 267)

The Amazon Resource Name (ARN) of the robot.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*createdAt (p. 267)

The time, in milliseconds since the epoch, when the robot was created.

Type: TimestampfleetArn (p. 267)

The Amazon Resource Name (ARN) of the fleet.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*greengrassGroupId (p. 267)

The Greengrass group id.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: .*lastDeploymentJob (p. 267)

The Amazon Resource Name (ARN) of the last deployment job.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*lastDeploymentTime (p. 267)

The time of the last deployment job.

Type: Timestampname (p. 267)

The name of the robot.

Type: String

268

Page 277: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeRobot

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*status (p. 267)

The status of the fleet.

Type: String

Valid Values: Available | Registered | PendingNewDeployment | Deploying |Failed | InSync | NoResponse

tags (p. 267)

The list of all tags added to the specified robot.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

269

Page 279: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeRobotApplication

DescribeRobotApplicationDescribes a robot application.

Request SyntaxPOST /describeRobotApplication HTTP/1.1Content-type: application/json

{ "application": "string", "applicationVersion": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

application (p. 271)

The Amazon Resource Name (ARN) of the robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: YesapplicationVersion (p. 271)

The version of the robot application to describe.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: (\$LATEST)|[0-9]*

Required: No

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "arn": "string", "lastUpdatedAt": number, "name": "string", "revisionId": "string", "robotSoftwareSuite": { "name": "string", "version": "string"

271

Page 280: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeRobotApplication

}, "sources": [ { "architecture": "string", "etag": "string", "s3Bucket": "string", "s3Key": "string" } ], "tags": { "string" : "string" }, "version": "string"}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

arn (p. 271)

The Amazon Resource Name (ARN) of the robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*lastUpdatedAt (p. 271)

The time, in milliseconds since the epoch, when the robot application was last updated.

Type: Timestampname (p. 271)

The name of the robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*revisionId (p. 271)

The revision id of the robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 40.

Pattern: [a-zA-Z0-9_.\-]*robotSoftwareSuite (p. 271)

The robot software suite (ROS distribution) used by the robot application.

Type: RobotSoftwareSuite (p. 417) objectsources (p. 271)

The sources of the robot application.

272

Page 281: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeRobotApplication

Type: Array of Source (p. 435) objectstags (p. 271)

The list of all tags added to the specified robot application.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*version (p. 271)

The version of the robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: (\$LATEST)|[0-9]*

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

273

Page 283: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeSimulationApplication

DescribeSimulationApplicationDescribes a simulation application.

Request SyntaxPOST /describeSimulationApplication HTTP/1.1Content-type: application/json

{ "application": "string", "applicationVersion": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

application (p. 275)

The application information for the simulation application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: YesapplicationVersion (p. 275)

The version of the simulation application to describe.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: (\$LATEST)|[0-9]*

Required: No

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "arn": "string", "lastUpdatedAt": number, "name": "string", "renderingEngine": { "name": "string", "version": "string"

275

Page 284: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeSimulationApplication

}, "revisionId": "string", "robotSoftwareSuite": { "name": "string", "version": "string" }, "simulationSoftwareSuite": { "name": "string", "version": "string" }, "sources": [ { "architecture": "string", "etag": "string", "s3Bucket": "string", "s3Key": "string" } ], "tags": { "string" : "string" }, "version": "string"}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

arn (p. 275)

The Amazon Resource Name (ARN) of the robot simulation application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*lastUpdatedAt (p. 275)

The time, in milliseconds since the epoch, when the simulation application was last updated.

Type: Timestampname (p. 275)

The name of the simulation application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*renderingEngine (p. 275)

The rendering engine for the simulation application.

Type: RenderingEngine (p. 409) objectrevisionId (p. 275)

The revision id of the simulation application.

276

Page 285: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeSimulationApplication

Type: String

Length Constraints: Minimum length of 1. Maximum length of 40.

Pattern: [a-zA-Z0-9_.\-]*robotSoftwareSuite (p. 275)

Information about the robot software suite (ROS distribution).

Type: RobotSoftwareSuite (p. 417) objectsimulationSoftwareSuite (p. 275)

The simulation software suite used by the simulation application.

Type: SimulationSoftwareSuite (p. 434) objectsources (p. 275)

The sources of the simulation application.

Type: Array of Source (p. 435) objectstags (p. 275)

The list of all tags added to the specified simulation application.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*version (p. 275)

The version of the simulation application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: (\$LATEST)|[0-9]*

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

277

Page 286: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeSimulationApplication

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

278

Page 287: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeSimulationJob

DescribeSimulationJobDescribes a simulation job.

Request SyntaxPOST /describeSimulationJob HTTP/1.1Content-type: application/json

{ "job": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

job (p. 279)

The Amazon Resource Name (ARN) of the simulation job to be described.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: Yes

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "arn": "string", "clientRequestToken": "string", "compute": { "simulationUnitLimit": number }, "dataSources": [ { "name": "string", "s3Bucket": "string", "s3Keys": [ { "etag": "string", "s3Key": "string" } ] } ], "failureBehavior": "string", "failureCode": "string",

279

Page 288: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeSimulationJob

"failureReason": "string", "iamRole": "string", "lastStartedAt": number, "lastUpdatedAt": number, "loggingConfig": { "recordAllRosTopics": boolean }, "maxJobDurationInSeconds": number, "name": "string", "networkInterface": { "networkInterfaceId": "string", "privateIpAddress": "string", "publicIpAddress": "string" }, "outputLocation": { "s3Bucket": "string", "s3Prefix": "string" }, "robotApplications": [ { "application": "string", "applicationVersion": "string", "launchConfig": { "environmentVariables": { "string" : "string" }, "launchFile": "string", "packageName": "string", "portForwardingConfig": { "portMappings": [ { "applicationPort": number, "enableOnPublicIp": boolean, "jobPort": number } ] }, "streamUI": boolean } } ], "simulationApplications": [ { "application": "string", "applicationVersion": "string", "launchConfig": { "environmentVariables": { "string" : "string" }, "launchFile": "string", "packageName": "string", "portForwardingConfig": { "portMappings": [ { "applicationPort": number, "enableOnPublicIp": boolean, "jobPort": number } ] }, "streamUI": boolean }, "worldConfigs": [ { "world": "string" }

280

Page 289: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeSimulationJob

] } ], "simulationTimeMillis": number, "status": "string", "tags": { "string" : "string" }, "vpcConfig": { "assignPublicIp": boolean, "securityGroups": [ "string" ], "subnets": [ "string" ], "vpcId": "string" }}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

arn (p. 279)

The Amazon Resource Name (ARN) of the simulation job.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*clientRequestToken (p. 279)

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-zA-Z0-9_\-=]*compute (p. 279)

Compute information for the simulation job.

Type: ComputeResponse (p. 384) objectdataSources (p. 279)

The data sources for the simulation job.

Type: Array of DataSource (p. 385) objectsfailureBehavior (p. 279)

The failure behavior for the simulation job.

Type: String

Valid Values: Fail | ContinuefailureCode (p. 279)

The failure code of the simulation job if it failed:

281

Page 290: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeSimulationJob

InternalServiceError

Internal service error.RobotApplicationCrash

Robot application exited abnormally.SimulationApplicationCrash

Simulation application exited abnormally.BadPermissionsRobotApplication

Robot application bundle could not be downloaded.BadPermissionsSimulationApplication

Simulation application bundle could not be downloaded.BadPermissionsS3Output

Unable to publish outputs to customer-provided S3 bucket.BadPermissionsCloudwatchLogs

Unable to publish logs to customer-provided CloudWatch Logs resource.SubnetIpLimitExceeded

Subnet IP limit exceeded.ENILimitExceeded

ENI limit exceeded.BadPermissionsUserCredentials

Unable to use the Role provided.InvalidBundleRobotApplication

Robot bundle cannot be extracted (invalid format, bundling error, or other issue).InvalidBundleSimulationApplication

Simulation bundle cannot be extracted (invalid format, bundling error, or other issue).RobotApplicationVersionMismatchedEtag

Etag for RobotApplication does not match value during version creation.SimulationApplicationVersionMismatchedEtag

Etag for SimulationApplication does not match value during version creation.

Type: String

Valid Values: InternalServiceError | RobotApplicationCrash |SimulationApplicationCrash | BadPermissionsRobotApplication |BadPermissionsSimulationApplication | BadPermissionsS3Object| BadPermissionsS3Output | BadPermissionsCloudwatchLogs| SubnetIpLimitExceeded | ENILimitExceeded |BadPermissionsUserCredentials | InvalidBundleRobotApplication |InvalidBundleSimulationApplication | InvalidS3Resource | LimitExceeded| MismatchedEtag | RobotApplicationVersionMismatchedEtag |SimulationApplicationVersionMismatchedEtag | ResourceNotFound |RequestThrottled | BatchTimedOut | BatchCanceled | InvalidInput |

282

Page 291: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeSimulationJob

WrongRegionS3Bucket | WrongRegionS3Output | WrongRegionRobotApplication |WrongRegionSimulationApplication

failureReason (p. 279)

Details about why the simulation job failed. For more information about troubleshooting, seeTroubleshooting.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1024.

Pattern: .*iamRole (p. 279)

The IAM role that allows the simulation instance to call the AWS APIs that are specified in itsassociated policies on your behalf.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: arn:aws:iam::\w+:role/.*lastStartedAt (p. 279)

The time, in milliseconds since the epoch, when the simulation job was last started.

Type: TimestamplastUpdatedAt (p. 279)

The time, in milliseconds since the epoch, when the simulation job was last updated.

Type: TimestamploggingConfig (p. 279)

The logging configuration.

Type: LoggingConfig (p. 402) objectmaxJobDurationInSeconds (p. 279)

The maximum job duration in seconds. The value must be 8 days (691,200 seconds) or less.

Type: Longname (p. 279)

The name of the simulation job.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*networkInterface (p. 279)

The network interface information for the simulation job.

Type: NetworkInterface (p. 403) objectoutputLocation (p. 279)

Location for output files generated by the simulation job.

283

Page 292: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeSimulationJob

Type: OutputLocation (p. 404) objectrobotApplications (p. 279)

A list of robot applications.

Type: Array of RobotApplicationConfig (p. 412) objects

Array Members: Fixed number of 1 item.simulationApplications (p. 279)

A list of simulation applications.

Type: Array of SimulationApplicationConfig (p. 420) objects

Array Members: Fixed number of 1 item.simulationTimeMillis (p. 279)

The simulation job execution duration in milliseconds.

Type: Longstatus (p. 279)

The status of the simulation job.

Type: String

Valid Values: Pending | Preparing | Running | Restarting | Completed | Failed |RunningFailed | Terminating | Terminated | Canceled

tags (p. 279)

The list of all tags added to the specified simulation job.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*vpcConfig (p. 279)

The VPC configuration.

Type: VPCConfigResponse (p. 440) object

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500

284

Page 293: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeSimulationJob

InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

285

Page 294: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeSimulationJobBatch

DescribeSimulationJobBatchDescribes a simulation job batch.

Request SyntaxPOST /describeSimulationJobBatch HTTP/1.1Content-type: application/json

{ "batch": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

batch (p. 286)

The id of the batch to describe.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: Yes

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "arn": "string", "batchPolicy": { "maxConcurrency": number, "timeoutInSeconds": number }, "clientRequestToken": "string", "createdAt": number, "createdRequests": [ { "arn": "string", "dataSourceNames": [ "string" ], "lastUpdatedAt": number, "name": "string", "robotApplicationNames": [ "string" ], "simulationApplicationNames": [ "string" ], "status": "string" } ], "failedRequests": [

286

Page 295: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeSimulationJobBatch

{ "failedAt": number, "failureCode": "string", "failureReason": "string", "request": { "compute": { "simulationUnitLimit": number }, "dataSources": [ { "name": "string", "s3Bucket": "string", "s3Keys": [ "string" ] } ], "failureBehavior": "string", "iamRole": "string", "loggingConfig": { "recordAllRosTopics": boolean }, "maxJobDurationInSeconds": number, "outputLocation": { "s3Bucket": "string", "s3Prefix": "string" }, "robotApplications": [ { "application": "string", "applicationVersion": "string", "launchConfig": { "environmentVariables": { "string" : "string" }, "launchFile": "string", "packageName": "string", "portForwardingConfig": { "portMappings": [ { "applicationPort": number, "enableOnPublicIp": boolean, "jobPort": number } ] }, "streamUI": boolean } } ], "simulationApplications": [ { "application": "string", "applicationVersion": "string", "launchConfig": { "environmentVariables": { "string" : "string" }, "launchFile": "string", "packageName": "string", "portForwardingConfig": { "portMappings": [ { "applicationPort": number, "enableOnPublicIp": boolean, "jobPort": number } ]

287

Page 296: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeSimulationJobBatch

}, "streamUI": boolean }, "worldConfigs": [ { "world": "string" } ] } ], "tags": { "string" : "string" }, "useDefaultApplications": boolean, "vpcConfig": { "assignPublicIp": boolean, "securityGroups": [ "string" ], "subnets": [ "string" ] } } } ], "failureCode": "string", "failureReason": "string", "lastUpdatedAt": number, "pendingRequests": [ { "compute": { "simulationUnitLimit": number }, "dataSources": [ { "name": "string", "s3Bucket": "string", "s3Keys": [ "string" ] } ], "failureBehavior": "string", "iamRole": "string", "loggingConfig": { "recordAllRosTopics": boolean }, "maxJobDurationInSeconds": number, "outputLocation": { "s3Bucket": "string", "s3Prefix": "string" }, "robotApplications": [ { "application": "string", "applicationVersion": "string", "launchConfig": { "environmentVariables": { "string" : "string" }, "launchFile": "string", "packageName": "string", "portForwardingConfig": { "portMappings": [ { "applicationPort": number, "enableOnPublicIp": boolean, "jobPort": number } ] },

288

Page 297: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeSimulationJobBatch

"streamUI": boolean } } ], "simulationApplications": [ { "application": "string", "applicationVersion": "string", "launchConfig": { "environmentVariables": { "string" : "string" }, "launchFile": "string", "packageName": "string", "portForwardingConfig": { "portMappings": [ { "applicationPort": number, "enableOnPublicIp": boolean, "jobPort": number } ] }, "streamUI": boolean }, "worldConfigs": [ { "world": "string" } ] } ], "tags": { "string" : "string" }, "useDefaultApplications": boolean, "vpcConfig": { "assignPublicIp": boolean, "securityGroups": [ "string" ], "subnets": [ "string" ] } } ], "status": "string", "tags": { "string" : "string" }}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

arn (p. 286)

The Amazon Resource Name (ARN) of the batch.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

289

Page 298: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeSimulationJobBatch

batchPolicy (p. 286)

The batch policy.

Type: BatchPolicy (p. 382) objectclientRequestToken (p. 286)

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-zA-Z0-9_\-=]*createdAt (p. 286)

The time, in milliseconds since the epoch, when the simulation job batch was created.

Type: TimestampcreatedRequests (p. 286)

A list of created simulation job summaries.

Type: Array of SimulationJobSummary (p. 432) objects

Array Members: Minimum number of 0 items. Maximum number of 100 items.failedRequests (p. 286)

A list of failed create simulation job requests. The request failed to be created into a simulation job.Failed requests do not have a simulation job ID.

Type: Array of FailedCreateSimulationJobRequest (p. 393) objectsfailureCode (p. 286)

The failure code of the simulation job batch.

Type: String

Valid Values: InternalServiceErrorfailureReason (p. 286)

The reason the simulation job batch failed.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1024.

Pattern: .*lastUpdatedAt (p. 286)

The time, in milliseconds since the epoch, when the simulation job batch was last updated.

Type: TimestamppendingRequests (p. 286)

A list of pending simulation job requests. These requests have not yet been created into simulationjobs.

Type: Array of SimulationJobRequest (p. 429) objects

290

Page 299: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeSimulationJobBatch

Array Members: Minimum number of 1 item. Maximum number of 1000 items.status (p. 286)

The status of the batch.Pending

The simulation job batch request is pending.InProgress

The simulation job batch is in progress.Failed

The simulation job batch failed. One or more simulation job requests could not be completed dueto an internal failure (like InternalServiceError). See failureCode and failureReasonfor more information.

Completed

The simulation batch job completed. A batch is complete when (1) there are no pendingsimulation job requests in the batch and none of the failed simulation job requests are due toInternalServiceError and (2) when all created simulation jobs have reached a terminal state(for example, Completed or Failed).

Canceled

The simulation batch job was cancelled.Canceling

The simulation batch job is being cancelled.Completing

The simulation batch job is completing.TimingOut

The simulation job batch is timing out.

If a batch timing out, and there are pending requests that were failing due to an internal failure (likeInternalServiceError), the batch status will be Failed. If there are no such failing request,the batch status will be TimedOut.

TimedOut

The simulation batch job timed out.

Type: String

Valid Values: Pending | InProgress | Failed | Completed | Canceled | Canceling| Completing | TimingOut | TimedOut

tags (p. 286)

A map that contains tag keys and tag values that are attached to the simulation job batch.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

291

Page 300: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeSimulationJobBatch

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

292

Page 301: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeWorld

DescribeWorldDescribes a world.

Request SyntaxPOST /describeWorld HTTP/1.1Content-type: application/json

{ "world": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

world (p. 293)

The Amazon Resource Name (arn) of the world you want to describe.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: Yes

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "arn": "string", "createdAt": number, "generationJob": "string", "tags": { "string" : "string" }, "template": "string"}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

arn (p. 293)

The Amazon Resource Name (arn) of the world.

293

Page 302: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeWorld

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*createdAt (p. 293)

The time, in milliseconds since the epoch, when the world was created.

Type: TimestampgenerationJob (p. 293)

The Amazon Resource Name (arn) of the world generation job that generated the world.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*tags (p. 293)

A map that contains tag keys and tag values that are attached to the world.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*template (p. 293)

The world template.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400

294

Page 303: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeWorld

ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

295

Page 304: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeWorldExportJob

DescribeWorldExportJobDescribes a world export job.

Request Syntax

POST /describeWorldExportJob HTTP/1.1Content-type: application/json

{ "job": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

job (p. 296)

The Amazon Resource Name (arn) of the world export job to describe.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: Yes

Response Syntax

HTTP/1.1 200Content-type: application/json

{ "arn": "string", "clientRequestToken": "string", "createdAt": number, "failureCode": "string", "failureReason": "string", "iamRole": "string", "outputLocation": { "s3Bucket": "string", "s3Prefix": "string" }, "status": "string", "tags": { "string" : "string" }, "worlds": [ "string" ]}

296

Page 305: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeWorldExportJob

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

arn (p. 296)

The Amazon Resource Name (ARN) of the world export job.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*clientRequestToken (p. 296)

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-zA-Z0-9_\-=]*createdAt (p. 296)

The time, in milliseconds since the epoch, when the world export job was created.

Type: TimestampfailureCode (p. 296)

The failure code of the world export job if it failed:InternalServiceError

Internal service error.LimitExceeded

The requested resource exceeds the maximum number allowed, or the number of concurrentstream requests exceeds the maximum number allowed.

ResourceNotFound

The specified resource could not be found.RequestThrottled

The request was throttled.InvalidInput

An input parameter in the request is not valid.

Type: String

Valid Values: InternalServiceError | LimitExceeded | ResourceNotFound |RequestThrottled | InvalidInput | AccessDenied

failureReason (p. 296)

The reason why the world export job failed.

Type: String

297

Page 306: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeWorldExportJob

Length Constraints: Minimum length of 0. Maximum length of 1024.

Pattern: .*iamRole (p. 296)

The IAM role that the world export process uses to access the Amazon S3 bucket and put the export.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: arn:aws:iam::\w+:role/.*outputLocation (p. 296)

The output location.

Type: OutputLocation (p. 404) objectstatus (p. 296)

The status of the world export job.Pending

The world export job request is pending.Running

The world export job is running.Completed

The world export job completed.Failed

The world export job failed. See failureCode and failureReason for more information.Canceled

The world export job was cancelled.Canceling

The world export job is being cancelled.

Type: String

Valid Values: Pending | Running | Completed | Failed | Canceling | Canceledtags (p. 296)

A map that contains tag keys and tag values that are attached to the world export job.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

298

Page 307: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeWorldExportJob

worlds (p. 296)

A list of Amazon Resource Names (arns) that correspond to worlds to be exported.

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 100 items.

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

299

Page 308: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeWorldGenerationJob

DescribeWorldGenerationJobDescribes a world generation job.

Request SyntaxPOST /describeWorldGenerationJob HTTP/1.1Content-type: application/json

{ "job": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

job (p. 300)

The Amazon Resource Name (arn) of the world generation job to describe.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: Yes

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "arn": "string", "clientRequestToken": "string", "createdAt": number, "failureCode": "string", "failureReason": "string", "finishedWorldsSummary": { "failureSummary": { "failures": [ { "failureCode": "string", "failureCount": number, "sampleFailureReason": "string" } ], "totalFailureCount": number }, "finishedCount": number, "succeededWorlds": [ "string" ] },

300

Page 309: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeWorldGenerationJob

"status": "string", "tags": { "string" : "string" }, "template": "string", "worldCount": { "floorplanCount": number, "interiorCountPerFloorplan": number }, "worldTags": { "string" : "string" }}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

arn (p. 300)

The Amazon Resource Name (ARN) of the world generation job.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*clientRequestToken (p. 300)

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-zA-Z0-9_\-=]*createdAt (p. 300)

The time, in milliseconds since the epoch, when the world generation job was created.

Type: TimestampfailureCode (p. 300)

The failure code of the world generation job if it failed:InternalServiceError

Internal service error.LimitExceeded

The requested resource exceeds the maximum number allowed, or the number of concurrentstream requests exceeds the maximum number allowed.

ResourceNotFound

The specified resource could not be found.RequestThrottled

The request was throttled.

301

Page 310: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeWorldGenerationJob

InvalidInput

An input parameter in the request is not valid.

Type: String

Valid Values: InternalServiceError | LimitExceeded | ResourceNotFound |RequestThrottled | InvalidInput | AllWorldGenerationFailed

failureReason (p. 300)

The reason why the world generation job failed.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1024.

Pattern: .*finishedWorldsSummary (p. 300)

Summary information about finished worlds.

Type: FinishedWorldsSummary (p. 397) objectstatus (p. 300)

The status of the world generation job:Pending

The world generation job request is pending.Running

The world generation job is running.Completed

The world generation job completed.Failed

The world generation job failed. See failureCode for more information.PartialFailed

Some worlds did not generate.Canceled

The world generation job was cancelled.Canceling

The world generation job is being cancelled.

Type: String

Valid Values: Pending | Running | Completed | Failed | PartialFailed |Canceling | Canceled

tags (p. 300)

A map that contains tag keys and tag values that are attached to the world generation job.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

302

Page 311: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeWorldGenerationJob

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*template (p. 300)

The Amazon Resource Name (arn) of the world template.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*worldCount (p. 300)

Information about the world count.

Type: WorldCount (p. 443) objectworldTags (p. 300)

A map that contains tag keys and tag values that are attached to the generated worlds.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

303

Page 313: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeWorldTemplate

DescribeWorldTemplateDescribes a world template.

Request SyntaxPOST /describeWorldTemplate HTTP/1.1Content-type: application/json

{ "template": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

template (p. 305)

The Amazon Resource Name (arn) of the world template you want to describe.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: Yes

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "arn": "string", "clientRequestToken": "string", "createdAt": number, "lastUpdatedAt": number, "name": "string", "tags": { "string" : "string" }}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

arn (p. 305)

The Amazon Resource Name (ARN) of the world template.

305

Page 314: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeWorldTemplate

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*clientRequestToken (p. 305)

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-zA-Z0-9_\-=]*createdAt (p. 305)

The time, in milliseconds since the epoch, when the world template was created.

Type: TimestamplastUpdatedAt (p. 305)

The time, in milliseconds since the epoch, when the world template was last updated.

Type: Timestampname (p. 305)

The name of the world template.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 255.

Pattern: .*tags (p. 305)

A map that contains tag keys and tag values that are attached to the world template.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500

306

Page 315: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DescribeWorldTemplate

InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

307

Page 316: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南GetWorldTemplateBody

GetWorldTemplateBodyGets the world template body.

Request SyntaxPOST /getWorldTemplateBody HTTP/1.1Content-type: application/json

{ "generationJob": "string", "template": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

generationJob (p. 308)

The Amazon Resource Name (arn) of the world generator job.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: Notemplate (p. 308)

The Amazon Resource Name (arn) of the world template.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: No

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "templateBody": "string"}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

308

Page 317: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南GetWorldTemplateBody

The following data is returned in JSON format by the service.

templateBody (p. 308)

The world template body.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 262144.

Pattern: [\S\s]+

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

309

Page 318: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListDeploymentJobs

ListDeploymentJobsReturns a list of deployment jobs for a fleet. You can optionally provide filters to retrieve specificdeployment jobs.

Request SyntaxPOST /listDeploymentJobs HTTP/1.1Content-type: application/json

{ "filters": [ { "name": "string", "values": [ "string" ] } ], "maxResults": number, "nextToken": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

filters (p. 310)

Optional filters to limit results.

The filter names status and fleetName are supported. When filtering, you must use the completevalue of the filtered item. You can use up to three filters, but they must be for the same named item.For example, if you are looking for items with the status InProgress or the status Pending.

Type: Array of Filter (p. 396) objects

Array Members: Fixed number of 1 item.

Required: NomaxResults (p. 310)

When this parameter is used, ListDeploymentJobs only returns maxResults results in a singlepage along with a nextToken response element. The remaining results of the initial request can beseen by sending another ListDeploymentJobs request with the returned nextToken value. Thisvalue can be between 1 and 200. If this parameter is not used, then ListDeploymentJobs returnsup to 200 results and a nextToken value if applicable.

Type: Integer

Required: NonextToken (p. 310)

If the previous paginated request did not return all of the remaining results, the responseobject's nextToken parameter value is set to a token. To retrieve the next set of results, callListDeploymentJobs again and assign that token to the request object's nextToken parameter. Ifthere are no remaining results, the previous response object's NextToken parameter is set to null.

310

Page 319: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListDeploymentJobs

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: [a-zA-Z0-9_.\-\/+=]*

Required: No

Response Syntax

HTTP/1.1 200Content-type: application/json

{ "deploymentJobs": [ { "arn": "string", "createdAt": number, "deploymentApplicationConfigs": [ { "application": "string", "applicationVersion": "string", "launchConfig": { "environmentVariables": { "string" : "string" }, "launchFile": "string", "packageName": "string", "postLaunchFile": "string", "preLaunchFile": "string" } } ], "deploymentConfig": { "concurrentDeploymentPercentage": number, "downloadConditionFile": { "bucket": "string", "etag": "string", "key": "string" }, "failureThresholdPercentage": number, "robotDeploymentTimeoutInSeconds": number }, "failureCode": "string", "failureReason": "string", "fleet": "string", "status": "string" } ], "nextToken": "string"}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

deploymentJobs (p. 311)

A list of deployment jobs that meet the criteria of the request.

311

Page 320: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListDeploymentJobs

Type: Array of DeploymentJob (p. 389) objects

Array Members: Minimum number of 0 items. Maximum number of 200 items.nextToken (p. 311)

If the previous paginated request did not return all of the remaining results, the responseobject's nextToken parameter value is set to a token. To retrieve the next set of results, callListDeploymentJobs again and assign that token to the request object's nextToken parameter. Ifthere are no remaining results, the previous response object's NextToken parameter is set to null.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: [a-zA-Z0-9_.\-\/+=]*

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

312

Page 321: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListDeploymentJobs

313

Page 322: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListFleets

ListFleetsReturns a list of fleets. You can optionally provide filters to retrieve specific fleets.

Request Syntax

POST /listFleets HTTP/1.1Content-type: application/json

{ "filters": [ { "name": "string", "values": [ "string" ] } ], "maxResults": number, "nextToken": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

filters (p. 314)

Optional filters to limit results.

The filter name name is supported. When filtering, you must use the complete value of the filtered item.You can use up to three filters.

Type: Array of Filter (p. 396) objects

Array Members: Fixed number of 1 item.

Required: NomaxResults (p. 314)

When this parameter is used, ListFleets only returns maxResults results in a single page alongwith a nextToken response element. The remaining results of the initial request can be seen bysending another ListFleets request with the returned nextToken value. This value can be between1 and 200. If this parameter is not used, then ListFleets returns up to 200 results and a nextTokenvalue if applicable.

Type: Integer

Required: NonextToken (p. 314)

If the previous paginated request did not return all of the remaining results, the response object'snextToken parameter value is set to a token. To retrieve the next set of results, call ListFleetsagain and assign that token to the request object's nextToken parameter. If there are no remainingresults, the previous response object's NextToken parameter is set to null.

314

Page 323: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListFleets

Note

This token should be treated as an opaque identifier that is only used to retrieve the next itemsin a list and not for other programmatic purposes.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: [a-zA-Z0-9_.\-\/+=]*

Required: No

Response Syntax

HTTP/1.1 200Content-type: application/json

{ "fleetDetails": [ { "arn": "string", "createdAt": number, "lastDeploymentJob": "string", "lastDeploymentStatus": "string", "lastDeploymentTime": number, "name": "string" } ], "nextToken": "string"}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

fleetDetails (p. 315)

A list of fleet details meeting the request criteria.

Type: Array of Fleet (p. 398) objects

Array Members: Minimum number of 0 items. Maximum number of 200 items.nextToken (p. 315)

If the previous paginated request did not return all of the remaining results, the response object'snextToken parameter value is set to a token. To retrieve the next set of results, call ListFleetsagain and assign that token to the request object's nextToken parameter. If there are no remainingresults, the previous response object's NextToken parameter is set to null.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: [a-zA-Z0-9_.\-\/+=]*

315

Page 324: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListFleets

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

316

Page 325: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListRobotApplications

ListRobotApplicationsReturns a list of robot application. You can optionally provide filters to retrieve specific robot applications.

Request Syntax

POST /listRobotApplications HTTP/1.1Content-type: application/json

{ "filters": [ { "name": "string", "values": [ "string" ] } ], "maxResults": number, "nextToken": "string", "versionQualifier": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

filters (p. 317)

Optional filters to limit results.

The filter name name is supported. When filtering, you must use the complete value of the filtered item.You can use up to three filters.

Type: Array of Filter (p. 396) objects

Array Members: Fixed number of 1 item.

Required: NomaxResults (p. 317)

When this parameter is used, ListRobotApplications only returns maxResults results in a singlepage along with a nextToken response element. The remaining results of the initial request can beseen by sending another ListRobotApplications request with the returned nextToken value.This value can be between 1 and 100. If this parameter is not used, then ListRobotApplicationsreturns up to 100 results and a nextToken value if applicable.

Type: Integer

Required: NonextToken (p. 317)

If the previous paginated request did not return all of the remaining results, the responseobject's nextToken parameter value is set to a token. To retrieve the next set of results, callListRobotApplications again and assign that token to the request object's nextToken

317

Page 326: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListRobotApplications

parameter. If there are no remaining results, the previous response object's NextToken parameter isset to null.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: [a-zA-Z0-9_.\-\/+=]*

Required: NoversionQualifier (p. 317)

The version qualifier of the robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: ALL

Required: No

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "nextToken": "string", "robotApplicationSummaries": [ { "arn": "string", "lastUpdatedAt": number, "name": "string", "robotSoftwareSuite": { "name": "string", "version": "string" }, "version": "string" } ]}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

nextToken (p. 318)

If the previous paginated request did not return all of the remaining results, the responseobject's nextToken parameter value is set to a token. To retrieve the next set of results, callListRobotApplications again and assign that token to the request object's nextTokenparameter. If there are no remaining results, the previous response object's NextToken parameter isset to null.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

318

Page 327: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListRobotApplications

Pattern: [a-zA-Z0-9_.\-\/+=]*robotApplicationSummaries (p. 318)

A list of robot application summaries that meet the criteria of the request.

Type: Array of RobotApplicationSummary (p. 413) objects

Array Members: Minimum number of 0 items. Maximum number of 100 items.

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

319

Page 328: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListRobots

ListRobotsReturns a list of robots. You can optionally provide filters to retrieve specific robots.

Request SyntaxPOST /listRobots HTTP/1.1Content-type: application/json

{ "filters": [ { "name": "string", "values": [ "string" ] } ], "maxResults": number, "nextToken": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

filters (p. 320)

Optional filters to limit results.

The filter names status and fleetName are supported. When filtering, you must use the completevalue of the filtered item. You can use up to three filters, but they must be for the same named item.For example, if you are looking for items with the status Registered or the status Available.

Type: Array of Filter (p. 396) objects

Array Members: Fixed number of 1 item.

Required: NomaxResults (p. 320)

When this parameter is used, ListRobots only returns maxResults results in a single page alongwith a nextToken response element. The remaining results of the initial request can be seen bysending another ListRobots request with the returned nextToken value. This value can be between1 and 200. If this parameter is not used, then ListRobots returns up to 200 results and a nextTokenvalue if applicable.

Type: Integer

Required: NonextToken (p. 320)

If the previous paginated request did not return all of the remaining results, the response object'snextToken parameter value is set to a token. To retrieve the next set of results, call ListRobotsagain and assign that token to the request object's nextToken parameter. If there are no remainingresults, the previous response object's NextToken parameter is set to null.

320

Page 329: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListRobots

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: [a-zA-Z0-9_.\-\/+=]*

Required: No

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "nextToken": "string", "robots": [ { "architecture": "string", "arn": "string", "createdAt": number, "fleetArn": "string", "greenGrassGroupId": "string", "lastDeploymentJob": "string", "lastDeploymentTime": number, "name": "string", "status": "string" } ]}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

nextToken (p. 321)

If the previous paginated request did not return all of the remaining results, the response object'snextToken parameter value is set to a token. To retrieve the next set of results, call ListRobotsagain and assign that token to the request object's nextToken parameter. If there are no remainingresults, the previous response object's NextToken parameter is set to null.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: [a-zA-Z0-9_.\-\/+=]*robots (p. 321)

A list of robots that meet the criteria of the request.

Type: Array of Robot (p. 410) objects

Array Members: Minimum number of 0 items. Maximum number of 1000 items.

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

321

Page 330: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListRobots

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

322

Page 331: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListSimulationApplications

ListSimulationApplicationsReturns a list of simulation applications. You can optionally provide filters to retrieve specific simulationapplications.

Request SyntaxPOST /listSimulationApplications HTTP/1.1Content-type: application/json

{ "filters": [ { "name": "string", "values": [ "string" ] } ], "maxResults": number, "nextToken": "string", "versionQualifier": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

filters (p. 323)

Optional list of filters to limit results.

The filter name name is supported. When filtering, you must use the complete value of the filtered item.You can use up to three filters.

Type: Array of Filter (p. 396) objects

Array Members: Fixed number of 1 item.

Required: NomaxResults (p. 323)

When this parameter is used, ListSimulationApplications only returns maxResults resultsin a single page along with a nextToken response element. The remaining results of the initialrequest can be seen by sending another ListSimulationApplications request with thereturned nextToken value. This value can be between 1 and 100. If this parameter is not used, thenListSimulationApplications returns up to 100 results and a nextToken value if applicable.

Type: Integer

Required: NonextToken (p. 323)

If the previous paginated request did not return all of the remaining results, the responseobject's nextToken parameter value is set to a token. To retrieve the next set of results, callListSimulationApplications again and assign that token to the request object's nextToken

323

Page 332: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListSimulationApplications

parameter. If there are no remaining results, the previous response object's NextToken parameter isset to null.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: [a-zA-Z0-9_.\-\/+=]*

Required: NoversionQualifier (p. 323)

The version qualifier of the simulation application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: ALL

Required: No

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "nextToken": "string", "simulationApplicationSummaries": [ { "arn": "string", "lastUpdatedAt": number, "name": "string", "robotSoftwareSuite": { "name": "string", "version": "string" }, "simulationSoftwareSuite": { "name": "string", "version": "string" }, "version": "string" } ]}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

nextToken (p. 324)

If the previous paginated request did not return all of the remaining results, the responseobject's nextToken parameter value is set to a token. To retrieve the next set of results, callListSimulationApplications again and assign that token to the request object's nextTokenparameter. If there are no remaining results, the previous response object's NextToken parameter isset to null.

324

Page 333: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListSimulationApplications

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: [a-zA-Z0-9_.\-\/+=]*simulationApplicationSummaries (p. 324)

A list of simulation application summaries that meet the criteria of the request.

Type: Array of SimulationApplicationSummary (p. 421) objects

Array Members: Minimum number of 0 items. Maximum number of 100 items.

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

325

Page 334: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListSimulationJobBatches

ListSimulationJobBatchesReturns a list simulation job batches. You can optionally provide filters to retrieve specific simulation batchjobs.

Request Syntax

POST /listSimulationJobBatches HTTP/1.1Content-type: application/json

{ "filters": [ { "name": "string", "values": [ "string" ] } ], "maxResults": number, "nextToken": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

filters (p. 326)

Optional filters to limit results.

Type: Array of Filter (p. 396) objects

Array Members: Fixed number of 1 item.

Required: NomaxResults (p. 326)

When this parameter is used, ListSimulationJobBatches only returns maxResults results in asingle page along with a nextToken response element. The remaining results of the initial request canbe seen by sending another ListSimulationJobBatches request with the returned nextTokenvalue.

Type: Integer

Required: NonextToken (p. 326)

If the previous paginated request did not return all of the remaining results, the responseobject's nextToken parameter value is set to a token. To retrieve the next set of results, callListSimulationJobBatches again and assign that token to the request object's nextTokenparameter. If there are no remaining results, the previous response object's NextToken parameter isset to null.

Type: String

326

Page 335: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListSimulationJobBatches

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: [a-zA-Z0-9_.\-\/+=]*

Required: No

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "nextToken": "string", "simulationJobBatchSummaries": [ { "arn": "string", "createdAt": number, "createdRequestCount": number, "failedRequestCount": number, "lastUpdatedAt": number, "pendingRequestCount": number, "status": "string" } ]}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

nextToken (p. 327)

If the previous paginated request did not return all of the remaining results, the responseobject's nextToken parameter value is set to a token. To retrieve the next set of results, callListSimulationJobBatches again and assign that token to the request object's nextTokenparameter. If there are no remaining results, the previous response object's NextToken parameter isset to null.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: [a-zA-Z0-9_.\-\/+=]*simulationJobBatchSummaries (p. 327)

A list of simulation job batch summaries.

Type: Array of SimulationJobBatchSummary (p. 427) objects

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

327

Page 336: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListSimulationJobBatches

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

328

Page 337: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListSimulationJobs

ListSimulationJobsReturns a list of simulation jobs. You can optionally provide filters to retrieve specific simulation jobs.

Request SyntaxPOST /listSimulationJobs HTTP/1.1Content-type: application/json

{ "filters": [ { "name": "string", "values": [ "string" ] } ], "maxResults": number, "nextToken": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

filters (p. 329)

Optional filters to limit results.

The filter names status and simulationApplicationName and robotApplicationName aresupported. When filtering, you must use the complete value of the filtered item. You can use up to threefilters, but they must be for the same named item. For example, if you are looking for items with thestatus Preparing or the status Running.

Type: Array of Filter (p. 396) objects

Array Members: Fixed number of 1 item.

Required: NomaxResults (p. 329)

When this parameter is used, ListSimulationJobs only returns maxResults results in a singlepage along with a nextToken response element. The remaining results of the initial request can beseen by sending another ListSimulationJobs request with the returned nextToken value. Thisvalue can be between 1 and 1000. If this parameter is not used, then ListSimulationJobs returnsup to 1000 results and a nextToken value if applicable.

Type: Integer

Required: NonextToken (p. 329)

If the previous paginated request did not return all of the remaining results, the responseobject's nextToken parameter value is set to a token. To retrieve the next set of results, callListSimulationJobs again and assign that token to the request object's nextToken parameter. Ifthere are no remaining results, the previous response object's NextToken parameter is set to null.

329

Page 338: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListSimulationJobs

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: [a-zA-Z0-9_.\-\/+=]*

Required: No

Response Syntax

HTTP/1.1 200Content-type: application/json

{ "nextToken": "string", "simulationJobSummaries": [ { "arn": "string", "dataSourceNames": [ "string" ], "lastUpdatedAt": number, "name": "string", "robotApplicationNames": [ "string" ], "simulationApplicationNames": [ "string" ], "status": "string" } ]}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

nextToken (p. 330)

If the previous paginated request did not return all of the remaining results, the responseobject's nextToken parameter value is set to a token. To retrieve the next set of results, callListSimulationJobs again and assign that token to the request object's nextToken parameter. Ifthere are no remaining results, the previous response object's NextToken parameter is set to null.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: [a-zA-Z0-9_.\-\/+=]*simulationJobSummaries (p. 330)

A list of simulation job summaries that meet the criteria of the request.

Type: Array of SimulationJobSummary (p. 432) objects

Array Members: Minimum number of 0 items. Maximum number of 100 items.

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

330

Page 339: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListSimulationJobs

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

331

Page 340: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListTagsForResource

ListTagsForResourceLists all tags on a AWS RoboMaker resource.

Request SyntaxGET /tags/resourceArn HTTP/1.1

URI Request ParametersThe request uses the following URI parameters.

resourceArn (p. 332)

The AWS RoboMaker Amazon Resource Name (ARN) with tags to be listed.

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: Yes

Request BodyThe request does not have a request body.

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "tags": { "string" : "string" }}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

tags (p. 332)

The list of all tags added to the specified resource.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

332

Page 341: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListTagsForResource

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

333

Page 342: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListWorldExportJobs

ListWorldExportJobsLists world export jobs.

Request SyntaxPOST /listWorldExportJobs HTTP/1.1Content-type: application/json

{ "filters": [ { "name": "string", "values": [ "string" ] } ], "maxResults": number, "nextToken": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

filters (p. 334)

Optional filters to limit results. You can use generationJobId and templateId.

Type: Array of Filter (p. 396) objects

Array Members: Fixed number of 1 item.

Required: NomaxResults (p. 334)

When this parameter is used, ListWorldExportJobs only returns maxResults results in a singlepage along with a nextToken response element. The remaining results of the initial request can beseen by sending another ListWorldExportJobs request with the returned nextToken value. Thisvalue can be between 1 and 100. If this parameter is not used, then ListWorldExportJobs returnsup to 100 results and a nextToken value if applicable.

Type: Integer

Required: NonextToken (p. 334)

If the previous paginated request did not return all of the remaining results, the responseobject's nextToken parameter value is set to a token. To retrieve the next set of results, callListWorldExportJobs again and assign that token to the request object's nextToken parameter. Ifthere are no remaining results, the previous response object's NextToken parameter is set to null.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

334

Page 343: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListWorldExportJobs

Pattern: [a-zA-Z0-9_.\-\/+=]*

Required: No

Response Syntax

HTTP/1.1 200Content-type: application/json

{ "nextToken": "string", "worldExportJobSummaries": [ { "arn": "string", "createdAt": number, "status": "string", "worlds": [ "string" ] } ]}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

nextToken (p. 335)

If the previous paginated request did not return all of the remaining results, the responseobject's nextToken parameter value is set to a token. To retrieve the next set of results, callListWorldExportJobsRequest again and assign that token to the request object's nextTokenparameter. If there are no remaining results, the previous response object's NextToken parameter isset to null.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: [a-zA-Z0-9_.\-\/+=]*worldExportJobSummaries (p. 335)

Summary information for world export jobs.

Type: Array of WorldExportJobSummary (p. 444) objects

Array Members: Minimum number of 0 items. Maximum number of 100 items.

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500

335

Page 344: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListWorldExportJobs

InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

336

Page 345: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListWorldGenerationJobs

ListWorldGenerationJobsLists world generator jobs.

Request Syntax

POST /listWorldGenerationJobs HTTP/1.1Content-type: application/json

{ "filters": [ { "name": "string", "values": [ "string" ] } ], "maxResults": number, "nextToken": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

filters (p. 337)

Optional filters to limit results. You can use status and templateId.

Type: Array of Filter (p. 396) objects

Array Members: Fixed number of 1 item.

Required: NomaxResults (p. 337)

When this parameter is used, ListWorldGeneratorJobs only returns maxResults resultsin a single page along with a nextToken response element. The remaining results of the initialrequest can be seen by sending another ListWorldGeneratorJobs request with the returnednextToken value. This value can be between 1 and 100. If this parameter is not used, thenListWorldGeneratorJobs returns up to 100 results and a nextToken value if applicable.

Type: Integer

Required: NonextToken (p. 337)

If the previous paginated request did not return all of the remaining results, the responseobject's nextToken parameter value is set to a token. To retrieve the next set of results, callListWorldGenerationJobsRequest again and assign that token to the request object'snextToken parameter. If there are no remaining results, the previous response object's NextTokenparameter is set to null.

Type: String

337

Page 346: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListWorldGenerationJobs

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: [a-zA-Z0-9_.\-\/+=]*

Required: No

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "nextToken": "string", "worldGenerationJobSummaries": [ { "arn": "string", "createdAt": number, "failedWorldCount": number, "status": "string", "succeededWorldCount": number, "template": "string", "worldCount": { "floorplanCount": number, "interiorCountPerFloorplan": number } } ]}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

nextToken (p. 338)

If the previous paginated request did not return all of the remaining results, the responseobject's nextToken parameter value is set to a token. To retrieve the next set of results, callListWorldGeneratorJobsRequest again and assign that token to the request object's nextTokenparameter. If there are no remaining results, the previous response object's NextToken parameter isset to null.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: [a-zA-Z0-9_.\-\/+=]*worldGenerationJobSummaries (p. 338)

Summary information for world generator jobs.

Type: Array of WorldGenerationJobSummary (p. 448) objects

Array Members: Minimum number of 0 items. Maximum number of 100 items.

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

338

Page 347: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListWorldGenerationJobs

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

339

Page 348: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListWorlds

ListWorldsLists worlds.

Request SyntaxPOST /listWorlds HTTP/1.1Content-type: application/json

{ "filters": [ { "name": "string", "values": [ "string" ] } ], "maxResults": number, "nextToken": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

filters (p. 340)

Optional filters to limit results. You can use status.

Type: Array of Filter (p. 396) objects

Array Members: Fixed number of 1 item.

Required: NomaxResults (p. 340)

When this parameter is used, ListWorlds only returns maxResults results in a single page alongwith a nextToken response element. The remaining results of the initial request can be seen bysending another ListWorlds request with the returned nextToken value. This value can be between1 and 100. If this parameter is not used, then ListWorlds returns up to 100 results and a nextTokenvalue if applicable.

Type: Integer

Required: NonextToken (p. 340)

If the previous paginated request did not return all of the remaining results, the response object'snextToken parameter value is set to a token. To retrieve the next set of results, call ListWorldsagain and assign that token to the request object's nextToken parameter. If there are no remainingresults, the previous response object's NextToken parameter is set to null.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

340

Page 349: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListWorlds

Pattern: [a-zA-Z0-9_.\-\/+=]*

Required: No

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "nextToken": "string", "worldSummaries": [ { "arn": "string", "createdAt": number, "generationJob": "string", "template": "string" } ]}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

nextToken (p. 341)

If the previous paginated request did not return all of the remaining results, the response object'snextToken parameter value is set to a token. To retrieve the next set of results, call ListWorldsagain and assign that token to the request object's nextToken parameter. If there are no remainingresults, the previous response object's NextToken parameter is set to null.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: [a-zA-Z0-9_.\-\/+=]*worldSummaries (p. 341)

Summary information for worlds.

Type: Array of WorldSummary (p. 450) objects

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

341

Page 350: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListWorlds

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

342

Page 351: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListWorldTemplates

ListWorldTemplatesLists world templates.

Request SyntaxPOST /listWorldTemplates HTTP/1.1Content-type: application/json

{ "maxResults": number, "nextToken": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

maxResults (p. 343)

When this parameter is used, ListWorldTemplates only returns maxResults results in a singlepage along with a nextToken response element. The remaining results of the initial request can beseen by sending another ListWorldTemplates request with the returned nextToken value. Thisvalue can be between 1 and 100. If this parameter is not used, then ListWorldTemplates returnsup to 100 results and a nextToken value if applicable.

Type: Integer

Required: NonextToken (p. 343)

If the previous paginated request did not return all of the remaining results, the responseobject's nextToken parameter value is set to a token. To retrieve the next set of results, callListWorldTemplates again and assign that token to the request object's nextToken parameter. Ifthere are no remaining results, the previous response object's NextToken parameter is set to null.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: [a-zA-Z0-9_.\-\/+=]*

Required: No

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "nextToken": "string", "templateSummaries": [

343

Page 352: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ListWorldTemplates

{ "arn": "string", "createdAt": number, "lastUpdatedAt": number, "name": "string" } ]}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

nextToken (p. 343)

If the previous paginated request did not return all of the remaining results, the responseobject's nextToken parameter value is set to a token. To retrieve the next set of results, callListWorldTemplates again and assign that token to the request object's nextToken parameter. Ifthere are no remaining results, the previous response object's NextToken parameter is set to null.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: [a-zA-Z0-9_.\-\/+=]*templateSummaries (p. 343)

Summary information for templates.

Type: Array of TemplateSummary (p. 438) objects

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

344

Page 354: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南RegisterRobot

RegisterRobotRegisters a robot with a fleet.

Request Syntax

POST /registerRobot HTTP/1.1Content-type: application/json

{ "fleet": "string", "robot": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

fleet (p. 346)

The Amazon Resource Name (ARN) of the fleet.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: Yesrobot (p. 346)

The Amazon Resource Name (ARN) of the robot.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: Yes

Response Syntax

HTTP/1.1 200Content-type: application/json

{ "fleet": "string", "robot": "string"}

346

Page 355: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南RegisterRobot

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

fleet (p. 346)

The Amazon Resource Name (ARN) of the fleet that the robot will join.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*robot (p. 346)

Information about the robot registration.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400LimitExceededException

The requested resource exceeds the maximum number allowed, or the number of concurrent streamrequests exceeds the maximum number allowed.

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

347

Page 357: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南RestartSimulationJob

RestartSimulationJobRestarts a running simulation job.

Request SyntaxPOST /restartSimulationJob HTTP/1.1Content-type: application/json

{ "job": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

job (p. 349)

The Amazon Resource Name (ARN) of the simulation job.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: Yes

Response SyntaxHTTP/1.1 200

Response ElementsIf the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

349

Page 358: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南RestartSimulationJob

HTTP Status Code: 400LimitExceededException

The requested resource exceeds the maximum number allowed, or the number of concurrent streamrequests exceeds the maximum number allowed.

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

350

Page 359: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南StartSimulationJobBatch

StartSimulationJobBatchStarts a new simulation job batch. The batch is defined using one or more SimulationJobRequestobjects.

Request Syntax

POST /startSimulationJobBatch HTTP/1.1Content-type: application/json

{ "batchPolicy": { "maxConcurrency": number, "timeoutInSeconds": number }, "clientRequestToken": "string", "createSimulationJobRequests": [ { "compute": { "simulationUnitLimit": number }, "dataSources": [ { "name": "string", "s3Bucket": "string", "s3Keys": [ "string" ] } ], "failureBehavior": "string", "iamRole": "string", "loggingConfig": { "recordAllRosTopics": boolean }, "maxJobDurationInSeconds": number, "outputLocation": { "s3Bucket": "string", "s3Prefix": "string" }, "robotApplications": [ { "application": "string", "applicationVersion": "string", "launchConfig": { "environmentVariables": { "string" : "string" }, "launchFile": "string", "packageName": "string", "portForwardingConfig": { "portMappings": [ { "applicationPort": number, "enableOnPublicIp": boolean, "jobPort": number } ] }, "streamUI": boolean } } ], "simulationApplications": [ {

351

Page 360: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南StartSimulationJobBatch

"application": "string", "applicationVersion": "string", "launchConfig": { "environmentVariables": { "string" : "string" }, "launchFile": "string", "packageName": "string", "portForwardingConfig": { "portMappings": [ { "applicationPort": number, "enableOnPublicIp": boolean, "jobPort": number } ] }, "streamUI": boolean }, "worldConfigs": [ { "world": "string" } ] } ], "tags": { "string" : "string" }, "useDefaultApplications": boolean, "vpcConfig": { "assignPublicIp": boolean, "securityGroups": [ "string" ], "subnets": [ "string" ] } } ], "tags": { "string" : "string" }}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

batchPolicy (p. 351)

The batch policy.

Type: BatchPolicy (p. 382) object

Required: NoclientRequestToken (p. 351)

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Type: String

352

Page 361: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南StartSimulationJobBatch

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-zA-Z0-9_\-=]*

Required: NocreateSimulationJobRequests (p. 351)

A list of simulation job requests to create in the batch.

Type: Array of SimulationJobRequest (p. 429) objects

Array Members: Minimum number of 1 item. Maximum number of 1000 items.

Required: Yestags (p. 351)

A map that contains tag keys and tag values that are attached to the deployment job batch.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Required: No

Response Syntax

HTTP/1.1 200Content-type: application/json

{ "arn": "string", "batchPolicy": { "maxConcurrency": number, "timeoutInSeconds": number }, "clientRequestToken": "string", "createdAt": number, "createdRequests": [ { "arn": "string", "dataSourceNames": [ "string" ], "lastUpdatedAt": number, "name": "string", "robotApplicationNames": [ "string" ], "simulationApplicationNames": [ "string" ], "status": "string" } ], "failedRequests": [ { "failedAt": number, "failureCode": "string",

353

Page 362: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南StartSimulationJobBatch

"failureReason": "string", "request": { "compute": { "simulationUnitLimit": number }, "dataSources": [ { "name": "string", "s3Bucket": "string", "s3Keys": [ "string" ] } ], "failureBehavior": "string", "iamRole": "string", "loggingConfig": { "recordAllRosTopics": boolean }, "maxJobDurationInSeconds": number, "outputLocation": { "s3Bucket": "string", "s3Prefix": "string" }, "robotApplications": [ { "application": "string", "applicationVersion": "string", "launchConfig": { "environmentVariables": { "string" : "string" }, "launchFile": "string", "packageName": "string", "portForwardingConfig": { "portMappings": [ { "applicationPort": number, "enableOnPublicIp": boolean, "jobPort": number } ] }, "streamUI": boolean } } ], "simulationApplications": [ { "application": "string", "applicationVersion": "string", "launchConfig": { "environmentVariables": { "string" : "string" }, "launchFile": "string", "packageName": "string", "portForwardingConfig": { "portMappings": [ { "applicationPort": number, "enableOnPublicIp": boolean, "jobPort": number } ] }, "streamUI": boolean },

354

Page 363: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南StartSimulationJobBatch

"worldConfigs": [ { "world": "string" } ] } ], "tags": { "string" : "string" }, "useDefaultApplications": boolean, "vpcConfig": { "assignPublicIp": boolean, "securityGroups": [ "string" ], "subnets": [ "string" ] } } } ], "failureCode": "string", "failureReason": "string", "pendingRequests": [ { "compute": { "simulationUnitLimit": number }, "dataSources": [ { "name": "string", "s3Bucket": "string", "s3Keys": [ "string" ] } ], "failureBehavior": "string", "iamRole": "string", "loggingConfig": { "recordAllRosTopics": boolean }, "maxJobDurationInSeconds": number, "outputLocation": { "s3Bucket": "string", "s3Prefix": "string" }, "robotApplications": [ { "application": "string", "applicationVersion": "string", "launchConfig": { "environmentVariables": { "string" : "string" }, "launchFile": "string", "packageName": "string", "portForwardingConfig": { "portMappings": [ { "applicationPort": number, "enableOnPublicIp": boolean, "jobPort": number } ] }, "streamUI": boolean } } ],

355

Page 364: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南StartSimulationJobBatch

"simulationApplications": [ { "application": "string", "applicationVersion": "string", "launchConfig": { "environmentVariables": { "string" : "string" }, "launchFile": "string", "packageName": "string", "portForwardingConfig": { "portMappings": [ { "applicationPort": number, "enableOnPublicIp": boolean, "jobPort": number } ] }, "streamUI": boolean }, "worldConfigs": [ { "world": "string" } ] } ], "tags": { "string" : "string" }, "useDefaultApplications": boolean, "vpcConfig": { "assignPublicIp": boolean, "securityGroups": [ "string" ], "subnets": [ "string" ] } } ], "status": "string", "tags": { "string" : "string" }}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

arn (p. 353)

The Amazon Resource Name (arn) of the batch.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*batchPolicy (p. 353)

The batch policy.

356

Page 365: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南StartSimulationJobBatch

Type: BatchPolicy (p. 382) objectclientRequestToken (p. 353)

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-zA-Z0-9_\-=]*createdAt (p. 353)

The time, in milliseconds since the epoch, when the simulation job batch was created.

Type: TimestampcreatedRequests (p. 353)

A list of created simulation job request summaries.

Type: Array of SimulationJobSummary (p. 432) objects

Array Members: Minimum number of 0 items. Maximum number of 100 items.failedRequests (p. 353)

A list of failed simulation job requests. The request failed to be created into a simulation job. Failedrequests do not have a simulation job ID.

Type: Array of FailedCreateSimulationJobRequest (p. 393) objectsfailureCode (p. 353)

The failure code if the simulation job batch failed.

Type: String

Valid Values: InternalServiceErrorfailureReason (p. 353)

The reason the simulation job batch failed.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1024.

Pattern: .*pendingRequests (p. 353)

A list of pending simulation job requests. These requests have not yet been created into simulationjobs.

Type: Array of SimulationJobRequest (p. 429) objects

Array Members: Minimum number of 1 item. Maximum number of 1000 items.status (p. 353)

The status of the simulation job batch.Pending

The simulation job batch request is pending.

357

Page 366: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南StartSimulationJobBatch

InProgress

The simulation job batch is in progress.Failed

The simulation job batch failed. One or more simulation job requests could not be completed dueto an internal failure (like InternalServiceError). See failureCode and failureReasonfor more information.

Completed

The simulation batch job completed. A batch is complete when (1) there are no pendingsimulation job requests in the batch and none of the failed simulation job requests are due toInternalServiceError and (2) when all created simulation jobs have reached a terminal state(for example, Completed or Failed).

Canceled

The simulation batch job was cancelled.Canceling

The simulation batch job is being cancelled.Completing

The simulation batch job is completing.TimingOut

The simulation job batch is timing out.

If a batch timing out, and there are pending requests that were failing due to an internal failure (likeInternalServiceError), the batch status will be Failed. If there are no such failing request,the batch status will be TimedOut.

TimedOut

The simulation batch job timed out.

Type: String

Valid Values: Pending | InProgress | Failed | Completed | Canceled | Canceling| Completing | TimingOut | TimedOut

tags (p. 353)

A map that contains tag keys and tag values that are attached to the deployment job batch.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

358

Page 367: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南StartSimulationJobBatch

IdempotentParameterMismatchException

The request uses the same client token as a previous, but non-identical request. Do not reuse a clienttoken with different requests, unless the requests are identical.

HTTP Status Code: 400InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400LimitExceededException

The requested resource exceeds the maximum number allowed, or the number of concurrent streamrequests exceeds the maximum number allowed.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

359

Page 368: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南SyncDeploymentJob

SyncDeploymentJobSyncrhonizes robots in a fleet to the latest deployment. This is helpful if robots were added after adeployment.

Request Syntax

POST /syncDeploymentJob HTTP/1.1Content-type: application/json

{ "clientRequestToken": "string", "fleet": "string"}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

clientRequestToken (p. 360)

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-zA-Z0-9_\-=]*

Required: Yesfleet (p. 360)

The target fleet for the synchronization.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: Yes

Response Syntax

HTTP/1.1 200Content-type: application/json

{ "arn": "string", "createdAt": number, "deploymentApplicationConfigs": [ {

360

Page 369: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南SyncDeploymentJob

"application": "string", "applicationVersion": "string", "launchConfig": { "environmentVariables": { "string" : "string" }, "launchFile": "string", "packageName": "string", "postLaunchFile": "string", "preLaunchFile": "string" } } ], "deploymentConfig": { "concurrentDeploymentPercentage": number, "downloadConditionFile": { "bucket": "string", "etag": "string", "key": "string" }, "failureThresholdPercentage": number, "robotDeploymentTimeoutInSeconds": number }, "failureCode": "string", "failureReason": "string", "fleet": "string", "status": "string"}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

arn (p. 360)

The Amazon Resource Name (ARN) of the synchronization request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*createdAt (p. 360)

The time, in milliseconds since the epoch, when the fleet was created.

Type: TimestampdeploymentApplicationConfigs (p. 360)

Information about the deployment application configurations.

Type: Array of DeploymentApplicationConfig (p. 387) objects

Array Members: Fixed number of 1 item.deploymentConfig (p. 360)

Information about the deployment configuration.

Type: DeploymentConfig (p. 388) object

361

Page 370: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南SyncDeploymentJob

failureCode (p. 360)

The failure code if the job fails:InternalServiceError

Internal service error.RobotApplicationCrash

Robot application exited abnormally.SimulationApplicationCrash

Simulation application exited abnormally.BadPermissionsRobotApplication

Robot application bundle could not be downloaded.BadPermissionsSimulationApplication

Simulation application bundle could not be downloaded.BadPermissionsS3Output

Unable to publish outputs to customer-provided S3 bucket.BadPermissionsCloudwatchLogs

Unable to publish logs to customer-provided CloudWatch Logs resource.SubnetIpLimitExceeded

Subnet IP limit exceeded.ENILimitExceeded

ENI limit exceeded.BadPermissionsUserCredentials

Unable to use the Role provided.InvalidBundleRobotApplication

Robot bundle cannot be extracted (invalid format, bundling error, or other issue).InvalidBundleSimulationApplication

Simulation bundle cannot be extracted (invalid format, bundling error, or other issue).RobotApplicationVersionMismatchedEtag

Etag for RobotApplication does not match value during version creation.SimulationApplicationVersionMismatchedEtag

Etag for SimulationApplication does not match value during version creation.

Type: String

Valid Values: ResourceNotFound | EnvironmentSetupError |EtagMismatch | FailureThresholdBreached | RobotDeploymentAborted| RobotDeploymentNoResponse | RobotAgentConnectionTimeout| GreengrassDeploymentFailed | InvalidGreengrassGroup |MissingRobotArchitecture | MissingRobotApplicationArchitecture |MissingRobotDeploymentResource | GreengrassGroupVersionDoesNotExist| LambdaDeleted | ExtractingBundleFailure | PreLaunchFileFailure |PostLaunchFileFailure | BadPermissionError | DownloadConditionFailed |InternalServerError

362

Page 371: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南SyncDeploymentJob

failureReason (p. 360)

The failure reason if the job fails.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1024.

Pattern: .*fleet (p. 360)

The Amazon Resource Name (ARN) of the fleet.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*status (p. 360)

The status of the synchronization job.

Type: String

Valid Values: Pending | Preparing | InProgress | Failed | Succeeded | Canceled

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

ConcurrentDeploymentException

The failure percentage threshold percentage was met.

HTTP Status Code: 400IdempotentParameterMismatchException

The request uses the same client token as a previous, but non-identical request. Do not reuse a clienttoken with different requests, unless the requests are identical.

HTTP Status Code: 400InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400LimitExceededException

The requested resource exceeds the maximum number allowed, or the number of concurrent streamrequests exceeds the maximum number allowed.

HTTP Status Code: 400

363

Page 372: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南SyncDeploymentJob

ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

364

Page 373: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南TagResource

TagResourceAdds or edits tags for a AWS RoboMaker resource.

Each tag consists of a tag key and a tag value. Tag keys and tag values are both required, but tag valuescan be empty strings.

For information about the rules that apply to tag keys and tag values, see User-Defined Tag Restrictions inthe AWS Billing and Cost Management User Guide.

Request Syntax

POST /tags/resourceArn HTTP/1.1Content-type: application/json

{ "tags": { "string" : "string" }}

URI Request ParametersThe request uses the following URI parameters.

resourceArn (p. 365)

The Amazon Resource Name (ARN) of the AWS RoboMaker resource you are tagging.

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: Yes

Request BodyThe request accepts the following data in JSON format.

tags (p. 365)

A map that contains tag keys and tag values that are attached to the resource.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Required: Yes

365

Page 374: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南TagResource

Response SyntaxHTTP/1.1 200

Response ElementsIf the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

366

Page 375: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南UntagResource

UntagResourceRemoves the specified tags from the specified AWS RoboMaker resource.

To remove a tag, specify the tag key. To change the tag value of an existing tag key, use TagResource .

Request SyntaxDELETE /tags/resourceArn?tagKeys=tagKeys HTTP/1.1

URI Request ParametersThe request uses the following URI parameters.

resourceArn (p. 367)

The Amazon Resource Name (ARN) of the AWS RoboMaker resource you are removing tags.

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: YestagKeys (p. 367)

A map that contains tag keys and tag values that will be unattached from the resource.

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Required: Yes

Request BodyThe request does not have a request body.

Response SyntaxHTTP/1.1 200

Response ElementsIf the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500

367

Page 376: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南UntagResource

InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

368

Page 377: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南UpdateRobotApplication

UpdateRobotApplicationUpdates a robot application.

Request Syntax

POST /updateRobotApplication HTTP/1.1Content-type: application/json

{ "application": "string", "currentRevisionId": "string", "robotSoftwareSuite": { "name": "string", "version": "string" }, "sources": [ { "architecture": "string", "s3Bucket": "string", "s3Key": "string" } ]}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

application (p. 369)

The application information for the robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: YescurrentRevisionId (p. 369)

The revision id for the robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 40.

Pattern: [a-zA-Z0-9_.\-]*

Required: NorobotSoftwareSuite (p. 369)

The robot software suite (ROS distribution) used by the robot application.

369

Page 378: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南UpdateRobotApplication

Type: RobotSoftwareSuite (p. 417) object

Required: Yessources (p. 369)

The sources of the robot application.

Type: Array of SourceConfig (p. 436) objects

Required: Yes

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "arn": "string", "lastUpdatedAt": number, "name": "string", "revisionId": "string", "robotSoftwareSuite": { "name": "string", "version": "string" }, "sources": [ { "architecture": "string", "etag": "string", "s3Bucket": "string", "s3Key": "string" } ], "version": "string"}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

arn (p. 370)

The Amazon Resource Name (ARN) of the updated robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*lastUpdatedAt (p. 370)

The time, in milliseconds since the epoch, when the robot application was last updated.

Type: Timestampname (p. 370)

The name of the robot application.

370

Page 379: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南UpdateRobotApplication

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*revisionId (p. 370)

The revision id of the robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 40.

Pattern: [a-zA-Z0-9_.\-]*robotSoftwareSuite (p. 370)

The robot software suite (ROS distribution) used by the robot application.

Type: RobotSoftwareSuite (p. 417) objectsources (p. 370)

The sources of the robot application.

Type: Array of Source (p. 435) objectsversion (p. 370)

The version of the robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: (\$LATEST)|[0-9]*

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400LimitExceededException

The requested resource exceeds the maximum number allowed, or the number of concurrent streamrequests exceeds the maximum number allowed.

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

371

Page 380: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南UpdateRobotApplication

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

372

Page 381: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南UpdateSimulationApplication

UpdateSimulationApplicationUpdates a simulation application.

Request SyntaxPOST /updateSimulationApplication HTTP/1.1Content-type: application/json

{ "application": "string", "currentRevisionId": "string", "renderingEngine": { "name": "string", "version": "string" }, "robotSoftwareSuite": { "name": "string", "version": "string" }, "simulationSoftwareSuite": { "name": "string", "version": "string" }, "sources": [ { "architecture": "string", "s3Bucket": "string", "s3Key": "string" } ]}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

application (p. 373)

The application information for the simulation application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: YescurrentRevisionId (p. 373)

The revision id for the robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 40.

373

Page 382: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南UpdateSimulationApplication

Pattern: [a-zA-Z0-9_.\-]*

Required: NorenderingEngine (p. 373)

The rendering engine for the simulation application.

Type: RenderingEngine (p. 409) object

Required: NorobotSoftwareSuite (p. 373)

Information about the robot software suite (ROS distribution).

Type: RobotSoftwareSuite (p. 417) object

Required: YessimulationSoftwareSuite (p. 373)

The simulation software suite used by the simulation application.

Type: SimulationSoftwareSuite (p. 434) object

Required: Yessources (p. 373)

The sources of the simulation application.

Type: Array of SourceConfig (p. 436) objects

Required: Yes

Response Syntax

HTTP/1.1 200Content-type: application/json

{ "arn": "string", "lastUpdatedAt": number, "name": "string", "renderingEngine": { "name": "string", "version": "string" }, "revisionId": "string", "robotSoftwareSuite": { "name": "string", "version": "string" }, "simulationSoftwareSuite": { "name": "string", "version": "string" }, "sources": [ { "architecture": "string", "etag": "string", "s3Bucket": "string", "s3Key": "string"

374

Page 383: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南UpdateSimulationApplication

} ], "version": "string"}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

arn (p. 374)

The Amazon Resource Name (ARN) of the updated simulation application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*lastUpdatedAt (p. 374)

The time, in milliseconds since the epoch, when the simulation application was last updated.

Type: Timestampname (p. 374)

The name of the simulation application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*renderingEngine (p. 374)

The rendering engine for the simulation application.

Type: RenderingEngine (p. 409) objectrevisionId (p. 374)

The revision id of the simulation application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 40.

Pattern: [a-zA-Z0-9_.\-]*robotSoftwareSuite (p. 374)

Information about the robot software suite (ROS distribution).

Type: RobotSoftwareSuite (p. 417) objectsimulationSoftwareSuite (p. 374)

The simulation software suite used by the simulation application.

Type: SimulationSoftwareSuite (p. 434) object

375

Page 384: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南UpdateSimulationApplication

sources (p. 374)

The sources of the simulation application.

Type: Array of Source (p. 435) objectsversion (p. 374)

The version of the robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: (\$LATEST)|[0-9]*

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400LimitExceededException

The requested resource exceeds the maximum number allowed, or the number of concurrent streamrequests exceeds the maximum number allowed.

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2

376

Page 386: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南UpdateWorldTemplate

UpdateWorldTemplateUpdates a world template.

Request SyntaxPOST /updateWorldTemplate HTTP/1.1Content-type: application/json

{ "name": "string", "template": "string", "templateBody": "string", "templateLocation": { "s3Bucket": "string", "s3Key": "string" }}

URI Request ParametersThe request does not use any URI parameters.

Request BodyThe request accepts the following data in JSON format.

name (p. 378)

The name of the template.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 255.

Pattern: .*

Required: Notemplate (p. 378)

The Amazon Resource Name (arn) of the world template to update.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: YestemplateBody (p. 378)

The world template body.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 262144.

Pattern: [\S\s]+

Required: No

378

Page 387: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南UpdateWorldTemplate

templateLocation (p. 378)

The location of the world template.

Type: TemplateLocation (p. 437) object

Required: No

Response SyntaxHTTP/1.1 200Content-type: application/json

{ "arn": "string", "createdAt": number, "lastUpdatedAt": number, "name": "string"}

Response ElementsIf the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

arn (p. 379)

The Amazon Resource Name (arn) of the world template.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*createdAt (p. 379)

The time, in milliseconds since the epoch, when the world template was created.

Type: TimestamplastUpdatedAt (p. 379)

The time, in milliseconds since the epoch, when the world template was last updated.

Type: Timestampname (p. 379)

The name of the world template.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 255.

Pattern: .*

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 451).

379

Page 388: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南Data Types

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returnedmessage provides an explanation of the error value.

HTTP Status Code: 400ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

Data TypesThe following data types are supported:

• BatchPolicy (p. 382)• Compute (p. 383)• ComputeResponse (p. 384)• DataSource (p. 385)• DataSourceConfig (p. 386)• DeploymentApplicationConfig (p. 387)• DeploymentConfig (p. 388)• DeploymentJob (p. 389)• DeploymentLaunchConfig (p. 391)• FailedCreateSimulationJobRequest (p. 393)• FailureSummary (p. 395)

380

Page 389: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南Data Types

• Filter (p. 396)• FinishedWorldsSummary (p. 397)• Fleet (p. 398)• LaunchConfig (p. 400)• LoggingConfig (p. 402)• NetworkInterface (p. 403)• OutputLocation (p. 404)• PortForwardingConfig (p. 405)• PortMapping (p. 406)• ProgressDetail (p. 407)• RenderingEngine (p. 409)• Robot (p. 410)• RobotApplicationConfig (p. 412)• RobotApplicationSummary (p. 413)• RobotDeployment (p. 415)• RobotSoftwareSuite (p. 417)• S3KeyOutput (p. 418)• S3Object (p. 419)• SimulationApplicationConfig (p. 420)• SimulationApplicationSummary (p. 421)• SimulationJob (p. 423)• SimulationJobBatchSummary (p. 427)• SimulationJobRequest (p. 429)• SimulationJobSummary (p. 432)• SimulationSoftwareSuite (p. 434)• Source (p. 435)• SourceConfig (p. 436)• TemplateLocation (p. 437)• TemplateSummary (p. 438)• VPCConfig (p. 439)• VPCConfigResponse (p. 440)• WorldConfig (p. 442)• WorldCount (p. 443)• WorldExportJobSummary (p. 444)• WorldFailure (p. 446)• WorldGenerationJobSummary (p. 448)• WorldSummary (p. 450)

381

Page 390: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南BatchPolicy

BatchPolicyInformation about the batch policy.

ContentsmaxConcurrency

The number of active simulation jobs create as part of the batch that can be in an active state at thesame time.

Active states include: Pending,Preparing, Running, Restarting, RunningFailed andTerminating. All other states are terminal states.

Type: Integer

Required: NotimeoutInSeconds

The amount of time, in seconds, to wait for the batch to complete.

If a batch times out, and there are pending requests that were failing due to an internal failure (likeInternalServiceError), they will be moved to the failed list and the batch status will be Failed. Ifthe pending requests were failing for any other reason, the failed pending requests will be moved to thefailed list and the batch status will be TimedOut.

Type: Long

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

382

Page 391: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南Compute

ComputeCompute information for the simulation job.

ContentssimulationUnitLimit

The simulation unit limit. Your simulation is allocated CPU and memory proportional to the suppliedsimulation unit limit. A simulation unit is 1 vcpu and 2GB of memory. You are only billed for the SUutilization you consume up to the maximim value provided. The default is 15.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 15.

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

383

Page 392: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ComputeResponse

ComputeResponseCompute information for the simulation job

ContentssimulationUnitLimit

The simulation unit limit. Your simulation is allocated CPU and memory proportional to the suppliedsimulation unit limit. A simulation unit is 1 vcpu and 2GB of memory. You are only billed for the SUutilization you consume up to the maximim value provided. The default is 15.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 15.

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

384

Page 393: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DataSource

DataSourceInformation about a data source.

Contentsname

The name of the data source.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*

Required: Nos3Bucket

The S3 bucket where the data files are located.

Type: String

Length Constraints: Minimum length of 3. Maximum length of 63.

Pattern: [a-z0-9][a-z0-9.\-]*[a-z0-9]

Required: Nos3Keys

The list of S3 keys identifying the data source files.

Type: Array of S3KeyOutput (p. 418) objects

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

385

Page 394: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DataSourceConfig

DataSourceConfigInformation about a data source.

Contentsname

The name of the data source.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*

Required: Yess3Bucket

The S3 bucket where the data files are located.

Type: String

Length Constraints: Minimum length of 3. Maximum length of 63.

Pattern: [a-z0-9][a-z0-9.\-]*[a-z0-9]

Required: Yess3Keys

The list of S3 keys identifying the data source files.

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 100 items.

Length Constraints: Minimum length of 1. Maximum length of 1024.

Pattern: .*

Required: Yes

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

386

Page 395: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DeploymentApplicationConfig

DeploymentApplicationConfigInformation about a deployment application configuration.

Contentsapplication

The Amazon Resource Name (ARN) of the robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: YesapplicationVersion

The version of the application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [0-9]*

Required: YeslaunchConfig

The launch configuration.

Type: DeploymentLaunchConfig (p. 391) object

Required: Yes

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

387

Page 396: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DeploymentConfig

DeploymentConfigInformation about a deployment configuration.

ContentsconcurrentDeploymentPercentage

The percentage of robots receiving the deployment at the same time.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 100.

Required: NodownloadConditionFile

The download condition file.

Type: S3Object (p. 419) object

Required: NofailureThresholdPercentage

The percentage of deployments that need to fail before stopping deployment.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 100.

Required: NorobotDeploymentTimeoutInSeconds

The amount of time, in seconds, to wait for deployment to a single robot to complete. Choose a timebetween 1 minute and 7 days. The default is 5 hours.

Type: Long

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

388

Page 397: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DeploymentJob

DeploymentJobInformation about a deployment job.

Contentsarn

The Amazon Resource Name (ARN) of the deployment job.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: NocreatedAt

The time, in milliseconds since the epoch, when the deployment job was created.

Type: Timestamp

Required: NodeploymentApplicationConfigs

The deployment application configuration.

Type: Array of DeploymentApplicationConfig (p. 387) objects

Array Members: Fixed number of 1 item.

Required: NodeploymentConfig

The deployment configuration.

Type: DeploymentConfig (p. 388) object

Required: NofailureCode

The deployment job failure code.

Type: String

Valid Values: ResourceNotFound | EnvironmentSetupError |EtagMismatch | FailureThresholdBreached | RobotDeploymentAborted| RobotDeploymentNoResponse | RobotAgentConnectionTimeout| GreengrassDeploymentFailed | InvalidGreengrassGroup |MissingRobotArchitecture | MissingRobotApplicationArchitecture |MissingRobotDeploymentResource | GreengrassGroupVersionDoesNotExist| LambdaDeleted | ExtractingBundleFailure | PreLaunchFileFailure |PostLaunchFileFailure | BadPermissionError | DownloadConditionFailed |InternalServerError

Required: No

389

Page 398: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DeploymentJob

failureReason

A short description of the reason why the deployment job failed.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1024.

Pattern: .*

Required: Nofleet

The Amazon Resource Name (ARN) of the fleet.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: Nostatus

The status of the deployment job.

Type: String

Valid Values: Pending | Preparing | InProgress | Failed | Succeeded | Canceled

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

390

Page 399: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DeploymentLaunchConfig

DeploymentLaunchConfigConfiguration information for a deployment launch.

ContentsenvironmentVariables

An array of key/value pairs specifying environment variables for the robot application

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 16 items.

Key Length Constraints: Minimum length of 1. Maximum length of 1024.

Key Pattern: [A-Z_][A-Z0-9_]*

Value Length Constraints: Minimum length of 1. Maximum length of 1024.

Value Pattern: .*

Required: NolaunchFile

The launch file name.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Pattern: [a-zA-Z0-9_.\-]*

Required: YespackageName

The package name.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Pattern: [a-zA-Z0-9_.\-]*

Required: YespostLaunchFile

The deployment post-launch file. This file will be executed after the launch file.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Pattern: .*

Required: NopreLaunchFile

The deployment pre-launch file. This file will be executed prior to the launch file.

391

Page 400: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南DeploymentLaunchConfig

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Pattern: .*

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

392

Page 401: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南FailedCreateSimulationJobRequest

FailedCreateSimulationJobRequestInformation about a failed create simulation job request.

ContentsfailedAt

The time, in milliseconds since the epoch, when the simulation job batch failed.

Type: Timestamp

Required: NofailureCode

The failure code.

Type: String

Valid Values: InternalServiceError | RobotApplicationCrash |SimulationApplicationCrash | BadPermissionsRobotApplication |BadPermissionsSimulationApplication | BadPermissionsS3Object| BadPermissionsS3Output | BadPermissionsCloudwatchLogs| SubnetIpLimitExceeded | ENILimitExceeded |BadPermissionsUserCredentials | InvalidBundleRobotApplication |InvalidBundleSimulationApplication | InvalidS3Resource | LimitExceeded| MismatchedEtag | RobotApplicationVersionMismatchedEtag |SimulationApplicationVersionMismatchedEtag | ResourceNotFound |RequestThrottled | BatchTimedOut | BatchCanceled | InvalidInput |WrongRegionS3Bucket | WrongRegionS3Output | WrongRegionRobotApplication |WrongRegionSimulationApplication

Required: NofailureReason

The failure reason of the simulation job request.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1024.

Pattern: .*

Required: Norequest

The simulation job request.

Type: SimulationJobRequest (p. 429) object

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++

393

Page 403: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南FailureSummary

FailureSummaryInformation about worlds that failed.

Contentsfailures

The worlds that failed.

Type: Array of WorldFailure (p. 446) objects

Array Members: Minimum number of 0 items. Maximum number of 100 items.

Required: NototalFailureCount

The total number of failures.

Type: Integer

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

395

Page 404: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南Filter

FilterInformation about a filter.

Contentsname

The name of the filter.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*

Required: Novalues

A list of values.

Type: Array of strings

Array Members: Fixed number of 1 item.

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

396

Page 405: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南FinishedWorldsSummary

FinishedWorldsSummaryInformation about worlds that finished.

ContentsfailureSummary

Information about worlds that failed.

Type: FailureSummary (p. 395) object

Required: NofinishedCount

The total number of finished worlds.

Type: Integer

Required: NosucceededWorlds

A list of worlds that succeeded.

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 100 items.

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

397

Page 406: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南Fleet

FleetInformation about a fleet.

Contentsarn

The Amazon Resource Name (ARN) of the fleet.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: NocreatedAt

The time, in milliseconds since the epoch, when the fleet was created.

Type: Timestamp

Required: NolastDeploymentJob

The Amazon Resource Name (ARN) of the last deployment job.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: NolastDeploymentStatus

The status of the last fleet deployment.

Type: String

Valid Values: Pending | Preparing | InProgress | Failed | Succeeded | Canceled

Required: NolastDeploymentTime

The time of the last deployment.

Type: Timestamp

Required: Noname

The name of the fleet.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

398

Page 407: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南Fleet

Pattern: [a-zA-Z0-9_\-]*

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

399

Page 408: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南LaunchConfig

LaunchConfigInformation about a launch configuration.

ContentsenvironmentVariables

The environment variables for the application launch.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 16 items.

Key Length Constraints: Minimum length of 1. Maximum length of 1024.

Key Pattern: [A-Z_][A-Z0-9_]*

Value Length Constraints: Minimum length of 1. Maximum length of 1024.

Value Pattern: .*

Required: NolaunchFile

The launch file name.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Pattern: [a-zA-Z0-9_.\-]*

Required: YespackageName

The package name.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Pattern: [a-zA-Z0-9_.\-]*

Required: YesportForwardingConfig

The port forwarding configuration.

Type: PortForwardingConfig (p. 405) object

Required: NostreamUI

Boolean indicating whether a streaming session will be configured for the application. If True, AWSRoboMaker will configure a connection so you can interact with your application as it is running in thesimulation. You must configure and luanch the component. It must have a graphical user interface.

Type: Boolean

400

Page 409: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南LaunchConfig

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

401

Page 410: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南LoggingConfig

LoggingConfigThe logging configuration.

ContentsrecordAllRosTopics

A boolean indicating whether to record all ROS topics.

Type: Boolean

Required: Yes

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

402

Page 411: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南NetworkInterface

NetworkInterfaceDescribes a network interface.

ContentsnetworkInterfaceId

The ID of the network interface.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1024.

Pattern: .*

Required: NoprivateIpAddress

The IPv4 address of the network interface within the subnet.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1024.

Pattern: .*

Required: NopublicIpAddress

The IPv4 public address of the network interface.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1024.

Pattern: .*

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

403

Page 412: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南OutputLocation

OutputLocationThe output location.

Contentss3Bucket

The S3 bucket for output.

Type: String

Length Constraints: Minimum length of 3. Maximum length of 63.

Pattern: [a-z0-9][a-z0-9.\-]*[a-z0-9]

Required: Nos3Prefix

The S3 folder in the s3Bucket where output files will be placed.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Pattern: .*

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

404

Page 413: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南PortForwardingConfig

PortForwardingConfigConfiguration information for port forwarding.

ContentsportMappings

The port mappings for the configuration.

Type: Array of PortMapping (p. 406) objects

Array Members: Minimum number of 0 items. Maximum number of 10 items.

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

405

Page 414: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南PortMapping

PortMappingAn object representing a port mapping.

ContentsapplicationPort

The port number on the application.

Type: Integer

Valid Range: Minimum value of 1024. Maximum value of 65535.

Required: YesenableOnPublicIp

A Boolean indicating whether to enable this port mapping on public IP.

Type: Boolean

Required: NojobPort

The port number on the simulation job instance to use as a remote connection point.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 65535.

Required: Yes

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

406

Page 415: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ProgressDetail

ProgressDetailInformation about the progress of a deployment job.

ContentscurrentProgress

The current progress status.Validating

Validating the deployment.DownloadingExtracting

Downloading and extracting the bundle on the robot.ExecutingPreLaunch

Executing pre-launch script(s) if provided.Launching

Launching the robot application.ExecutingPostLaunch

Executing post-launch script(s) if provided.Finished

Deployment is complete.

Type: String

Valid Values: Validating | DownloadingExtracting | ExecutingDownloadCondition |ExecutingPreLaunch | Launching | ExecutingPostLaunch | Finished

Required: NoestimatedTimeRemainingSeconds

Estimated amount of time in seconds remaining in the step. This currently only applies to theDownloading/Extracting step of the deployment. It is empty for other steps.

Type: Integer

Required: NopercentDone

Precentage of the step that is done. This currently only applies to the Downloading/Extractingstep of the deployment. It is empty for other steps.

Type: Float

Valid Range: Minimum value of 0.0. Maximum value of 100.0.

Required: NotargetResource

The Amazon Resource Name (ARN) of the deployment job.

Type: String

407

Page 416: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南ProgressDetail

Length Constraints: Minimum length of 0. Maximum length of 1024.

Pattern: .*

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

408

Page 417: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南RenderingEngine

RenderingEngineInformation about a rendering engine.

Contentsname

The name of the rendering engine.

Type: String

Valid Values: OGRE

Required: Noversion

The version of the rendering engine.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 4.

Pattern: 1.x

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

409

Page 418: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南Robot

RobotInformation about a robot.

Contentsarchitecture

The architecture of the robot.

Type: String

Valid Values: X86_64 | ARM64 | ARMHF

Required: Noarn

The Amazon Resource Name (ARN) of the robot.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: NocreatedAt

The time, in milliseconds since the epoch, when the robot was created.

Type: Timestamp

Required: NofleetArn

The Amazon Resource Name (ARN) of the fleet.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: NogreenGrassGroupId

The Greengrass group associated with the robot.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: .*

Required: NolastDeploymentJob

The Amazon Resource Name (ARN) of the last deployment job.

410

Page 419: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南Robot

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: NolastDeploymentTime

The time of the last deployment.

Type: Timestamp

Required: Noname

The name of the robot.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*

Required: Nostatus

The status of the robot.

Type: String

Valid Values: Available | Registered | PendingNewDeployment | Deploying |Failed | InSync | NoResponse

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

411

Page 420: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南RobotApplicationConfig

RobotApplicationConfigApplication configuration information for a robot.

Contentsapplication

The application information for the robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: YesapplicationVersion

The version of the robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: (\$LATEST)|[0-9]*

Required: NolaunchConfig

The launch configuration for the robot application.

Type: LaunchConfig (p. 400) object

Required: Yes

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

412

Page 421: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南RobotApplicationSummary

RobotApplicationSummarySummary information for a robot application.

Contentsarn

The Amazon Resource Name (ARN) of the robot.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: NolastUpdatedAt

The time, in milliseconds since the epoch, when the robot application was last updated.

Type: Timestamp

Required: Noname

The name of the robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*

Required: NorobotSoftwareSuite

Information about a robot software suite (ROS distribution).

Type: RobotSoftwareSuite (p. 417) object

Required: Noversion

The version of the robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: (\$LATEST)|[0-9]*

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

413

Page 423: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南RobotDeployment

RobotDeploymentInformation about a robot deployment.

Contentsarn

The robot deployment Amazon Resource Name (ARN).

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: NodeploymentFinishTime

The time, in milliseconds since the epoch, when the deployment finished.

Type: Timestamp

Required: NodeploymentStartTime

The time, in milliseconds since the epoch, when the deployment was started.

Type: Timestamp

Required: NofailureCode

The robot deployment failure code.

Type: String

Valid Values: ResourceNotFound | EnvironmentSetupError |EtagMismatch | FailureThresholdBreached | RobotDeploymentAborted| RobotDeploymentNoResponse | RobotAgentConnectionTimeout| GreengrassDeploymentFailed | InvalidGreengrassGroup |MissingRobotArchitecture | MissingRobotApplicationArchitecture |MissingRobotDeploymentResource | GreengrassGroupVersionDoesNotExist| LambdaDeleted | ExtractingBundleFailure | PreLaunchFileFailure |PostLaunchFileFailure | BadPermissionError | DownloadConditionFailed |InternalServerError

Required: NofailureReason

A short description of the reason why the robot deployment failed.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1024.

Pattern: .*

Required: No

415

Page 424: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南RobotDeployment

progressDetail

Information about how the deployment is progressing.

Type: ProgressDetail (p. 407) object

Required: Nostatus

The status of the robot deployment.

Type: String

Valid Values: Available | Registered | PendingNewDeployment | Deploying |Failed | InSync | NoResponse

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

416

Page 425: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南RobotSoftwareSuite

RobotSoftwareSuiteInformation about a robot software suite (ROS distribution).

Contentsname

The name of the robot software suite (ROS distribution).

Type: String

Valid Values: ROS | ROS2

Required: Noversion

The version of the robot software suite (ROS distribution).

Type: String

Valid Values: Kinetic | Melodic | Dashing

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

417

Page 426: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南S3KeyOutput

S3KeyOutputInformation about S3 keys.

Contentsetag

The etag for the object.

Type: String

Required: Nos3Key

The S3 key.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Pattern: .*

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

418

Page 427: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南S3Object

S3ObjectInformation about an S3 object.

Contentsbucket

The bucket containing the object.

Type: String

Length Constraints: Minimum length of 3. Maximum length of 63.

Pattern: [a-z0-9][a-z0-9.\-]*[a-z0-9]

Required: Yesetag

The etag of the object.

Type: String

Required: Nokey

The key of the object.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Pattern: .*

Required: Yes

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

419

Page 428: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南SimulationApplicationConfig

SimulationApplicationConfigInformation about a simulation application configuration.

Contentsapplication

The application information for the simulation application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: YesapplicationVersion

The version of the simulation application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: (\$LATEST)|[0-9]*

Required: NolaunchConfig

The launch configuration for the simulation application.

Type: LaunchConfig (p. 400) object

Required: YesworldConfigs

A list of world configurations.

Type: Array of WorldConfig (p. 442) objects

Array Members: Minimum number of 0 items. Maximum number of 1 item.

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

420

Page 429: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南SimulationApplicationSummary

SimulationApplicationSummarySummary information for a simulation application.

Contentsarn

The Amazon Resource Name (ARN) of the simulation application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: NolastUpdatedAt

The time, in milliseconds since the epoch, when the simulation application was last updated.

Type: Timestamp

Required: Noname

The name of the simulation application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*

Required: NorobotSoftwareSuite

Information about a robot software suite (ROS distribution).

Type: RobotSoftwareSuite (p. 417) object

Required: NosimulationSoftwareSuite

Information about a simulation software suite.

Type: SimulationSoftwareSuite (p. 434) object

Required: Noversion

The version of the simulation application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: (\$LATEST)|[0-9]*

421

Page 430: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南SimulationApplicationSummary

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

422

Page 431: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南SimulationJob

SimulationJobInformation about a simulation job.

Contentsarn

The Amazon Resource Name (ARN) of the simulation job.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: NoclientRequestToken

A unique identifier for this SimulationJob request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-zA-Z0-9_\-=]*

Required: Nocompute

Compute information for the simulation job

Type: ComputeResponse (p. 384) object

Required: NodataSources

The data sources for the simulation job.

Type: Array of DataSource (p. 385) objects

Required: NofailureBehavior

The failure behavior the simulation job.Continue

Restart the simulation job in the same host instance.Fail

Stop the simulation job and terminate the instance.

Type: String

Valid Values: Fail | Continue

Required: No

423

Page 432: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南SimulationJob

failureCode

The failure code of the simulation job if it failed.

Type: String

Valid Values: InternalServiceError | RobotApplicationCrash |SimulationApplicationCrash | BadPermissionsRobotApplication |BadPermissionsSimulationApplication | BadPermissionsS3Object| BadPermissionsS3Output | BadPermissionsCloudwatchLogs| SubnetIpLimitExceeded | ENILimitExceeded |BadPermissionsUserCredentials | InvalidBundleRobotApplication |InvalidBundleSimulationApplication | InvalidS3Resource | LimitExceeded| MismatchedEtag | RobotApplicationVersionMismatchedEtag |SimulationApplicationVersionMismatchedEtag | ResourceNotFound |RequestThrottled | BatchTimedOut | BatchCanceled | InvalidInput |WrongRegionS3Bucket | WrongRegionS3Output | WrongRegionRobotApplication |WrongRegionSimulationApplication

Required: NofailureReason

The reason why the simulation job failed.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1024.

Pattern: .*

Required: NoiamRole

The IAM role that allows the simulation instance to call the AWS APIs that are specified in itsassociated policies on your behalf. This is how credentials are passed in to your simulation job.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: arn:aws:iam::\w+:role/.*

Required: NolastStartedAt

The time, in milliseconds since the epoch, when the simulation job was last started.

Type: Timestamp

Required: NolastUpdatedAt

The time, in milliseconds since the epoch, when the simulation job was last updated.

Type: Timestamp

Required: NologgingConfig

The logging configuration.

424

Page 433: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南SimulationJob

Type: LoggingConfig (p. 402) object

Required: NomaxJobDurationInSeconds

The maximum simulation job duration in seconds. The value must be 8 days (691,200 seconds) orless.

Type: Long

Required: Noname

The name of the simulation job.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*

Required: NonetworkInterface

Information about a network interface.

Type: NetworkInterface (p. 403) object

Required: NooutputLocation

Location for output files generated by the simulation job.

Type: OutputLocation (p. 404) object

Required: NorobotApplications

A list of robot applications.

Type: Array of RobotApplicationConfig (p. 412) objects

Array Members: Fixed number of 1 item.

Required: NosimulationApplications

A list of simulation applications.

Type: Array of SimulationApplicationConfig (p. 420) objects

Array Members: Fixed number of 1 item.

Required: NosimulationTimeMillis

The simulation job execution duration in milliseconds.

Type: Long

425

Page 434: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南SimulationJob

Required: Nostatus

Status of the simulation job.

Type: String

Valid Values: Pending | Preparing | Running | Restarting | Completed | Failed |RunningFailed | Terminating | Terminated | Canceled

Required: Notags

A map that contains tag keys and tag values that are attached to the simulation job.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Required: NovpcConfig

VPC configuration information.

Type: VPCConfigResponse (p. 440) object

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

426

Page 435: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南SimulationJobBatchSummary

SimulationJobBatchSummaryInformation about a simulation job batch.

Contentsarn

The Amazon Resource Name (ARN) of the batch.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: NocreatedAt

The time, in milliseconds since the epoch, when the simulation job batch was created.

Type: Timestamp

Required: NocreatedRequestCount

The number of created simulation job requests.

Type: Integer

Required: NofailedRequestCount

The number of failed simulation job requests.

Type: Integer

Required: NolastUpdatedAt

The time, in milliseconds since the epoch, when the simulation job batch was last updated.

Type: Timestamp

Required: NopendingRequestCount

The number of pending simulation job requests.

Type: Integer

Required: Nostatus

The status of the simulation job batch.Pending

The simulation job batch request is pending.

427

Page 436: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南SimulationJobBatchSummary

InProgress

The simulation job batch is in progress.Failed

The simulation job batch failed. One or more simulation job requests could not be completed dueto an internal failure (like InternalServiceError). See failureCode and failureReasonfor more information.

Completed

The simulation batch job completed. A batch is complete when (1) there are no pendingsimulation job requests in the batch and none of the failed simulation job requests are due toInternalServiceError and (2) when all created simulation jobs have reached a terminal state(for example, Completed or Failed).

Canceled

The simulation batch job was cancelled.Canceling

The simulation batch job is being cancelled.Completing

The simulation batch job is completing.TimingOut

The simulation job batch is timing out.

If a batch timing out, and there are pending requests that were failing due to an internal failure (likeInternalServiceError), the batch status will be Failed. If there are no such failing request,the batch status will be TimedOut.

TimedOut

The simulation batch job timed out.

Type: String

Valid Values: Pending | InProgress | Failed | Completed | Canceled | Canceling| Completing | TimingOut | TimedOut

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

428

Page 437: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南SimulationJobRequest

SimulationJobRequestInformation about a simulation job request.

Contentscompute

Compute information for the simulation job

Type: Compute (p. 383) object

Required: NodataSources

Specify data sources to mount read-only files from S3 into your simulation. These files are availableunder /opt/robomaker/datasources/data_source_name.

Note

There is a limit of 100 files and a combined size of 25GB for all DataSourceConfig objects.

Type: Array of DataSourceConfig (p. 386) objects

Array Members: Minimum number of 1 item. Maximum number of 5 items.

Required: NofailureBehavior

The failure behavior the simulation job.Continue

Restart the simulation job in the same host instance.Fail

Stop the simulation job and terminate the instance.

Type: String

Valid Values: Fail | Continue

Required: NoiamRole

The IAM role name that allows the simulation instance to call the AWS APIs that are specified in itsassociated policies on your behalf. This is how credentials are passed in to your simulation job.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: arn:aws:iam::\w+:role/.*

Required: NologgingConfig

The logging configuration.

429

Page 438: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南SimulationJobRequest

Type: LoggingConfig (p. 402) object

Required: NomaxJobDurationInSeconds

The maximum simulation job duration in seconds. The value must be 8 days (691,200 seconds) orless.

Type: Long

Required: YesoutputLocation

The output location.

Type: OutputLocation (p. 404) object

Required: NorobotApplications

The robot applications to use in the simulation job.

Type: Array of RobotApplicationConfig (p. 412) objects

Array Members: Fixed number of 1 item.

Required: NosimulationApplications

The simulation applications to use in the simulation job.

Type: Array of SimulationApplicationConfig (p. 420) objects

Array Members: Fixed number of 1 item.

Required: Notags

A map that contains tag keys and tag values that are attached to the simulation job request.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Required: NouseDefaultApplications

Boolean indicating whether to use default simulation tool applications.

Type: Boolean

Required: No

430

Page 439: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南SimulationJobRequest

vpcConfig

If your simulation job accesses resources in a VPC, you provide this parameter identifying the list ofsecurity group IDs and subnet IDs. These must belong to the same VPC. You must provide at leastone security group and two subnet IDs.

Type: VPCConfig (p. 439) object

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

431

Page 440: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南SimulationJobSummary

SimulationJobSummarySummary information for a simulation job.

Contentsarn

The Amazon Resource Name (ARN) of the simulation job.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: NodataSourceNames

The names of the data sources.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*

Required: NolastUpdatedAt

The time, in milliseconds since the epoch, when the simulation job was last updated.

Type: Timestamp

Required: Noname

The name of the simulation job.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*

Required: NorobotApplicationNames

A list of simulation job robot application names.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*

Required: NosimulationApplicationNames

A list of simulation job simulation application names.

432

Page 441: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南SimulationJobSummary

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*

Required: Nostatus

The status of the simulation job.

Type: String

Valid Values: Pending | Preparing | Running | Restarting | Completed | Failed |RunningFailed | Terminating | Terminated | Canceled

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

433

Page 442: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南SimulationSoftwareSuite

SimulationSoftwareSuiteInformation about a simulation software suite.

Contentsname

The name of the simulation software suite.

Type: String

Valid Values: Gazebo | RosbagPlay

Required: Noversion

The version of the simulation software suite.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1024.

Pattern: 7|9|Kinetic|Melodic|Dashing

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

434

Page 443: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南Source

SourceInformation about a source.

Contentsarchitecture

The taget processor architecture for the application.

Type: String

Valid Values: X86_64 | ARM64 | ARMHF

Required: Noetag

A hash of the object specified by s3Bucket and s3Key.

Type: String

Required: Nos3Bucket

The s3 bucket name.

Type: String

Length Constraints: Minimum length of 3. Maximum length of 63.

Pattern: [a-z0-9][a-z0-9.\-]*[a-z0-9]

Required: Nos3Key

The s3 object key.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Pattern: .*

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

435

Page 444: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南SourceConfig

SourceConfigInformation about a source configuration.

Contentsarchitecture

The target processor architecture for the application.

Type: String

Valid Values: X86_64 | ARM64 | ARMHF

Required: Nos3Bucket

The Amazon S3 bucket name.

Type: String

Length Constraints: Minimum length of 3. Maximum length of 63.

Pattern: [a-z0-9][a-z0-9.\-]*[a-z0-9]

Required: Nos3Key

The s3 object key.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Pattern: .*

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

436

Page 445: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南TemplateLocation

TemplateLocationInformation about a template location.

Contentss3Bucket

The Amazon S3 bucket name.

Type: String

Length Constraints: Minimum length of 3. Maximum length of 63.

Pattern: [a-z0-9][a-z0-9.\-]*[a-z0-9]

Required: Yess3Key

The list of S3 keys identifying the data source files.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Pattern: .*

Required: Yes

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

437

Page 446: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南TemplateSummary

TemplateSummarySummary information for a template.

Contentsarn

The Amazon Resource Name (ARN) of the template.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: NocreatedAt

The time, in milliseconds since the epoch, when the template was created.

Type: Timestamp

Required: NolastUpdatedAt

The time, in milliseconds since the epoch, when the template was last updated.

Type: Timestamp

Required: Noname

The name of the template.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 255.

Pattern: .*

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

438

Page 447: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南VPCConfig

VPCConfigIf your simulation job accesses resources in a VPC, you provide this parameter identifying the list ofsecurity group IDs and subnet IDs. These must belong to the same VPC. You must provide at least onesecurity group and two subnet IDs.

ContentsassignPublicIp

A boolean indicating whether to assign a public IP address.

Type: Boolean

Required: NosecurityGroups

A list of one or more security groups IDs in your VPC.

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 5 items.

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: .+

Required: Nosubnets

A list of one or more subnet IDs in your VPC.

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 16 items.

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: .+

Required: Yes

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

439

Page 448: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南VPCConfigResponse

VPCConfigResponseVPC configuration associated with your simulation job.

ContentsassignPublicIp

A boolean indicating if a public IP was assigned.

Type: Boolean

Required: NosecurityGroups

A list of security group IDs associated with the simulation job.

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 5 items.

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: .+

Required: Nosubnets

A list of subnet IDs associated with the simulation job.

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 16 items.

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: .+

Required: NovpcId

The VPC ID associated with your simulation job.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1024.

Pattern: .*

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go

440

Page 450: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南WorldConfig

WorldConfigConfiguration information for a world.

Contentsworld

The world generated by Simulation WorldForge.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

442

Page 451: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南WorldCount

WorldCountThe number of worlds that will be created. You can configure the number of unique floorplans and thenumber of unique interiors for each floor plan. For example, if you want 1 world with 20 unique interiors,you set floorplanCount = 1 and interiorCountPerFloorplan = 20. This will result in 20 worlds(floorplanCount * interiorCountPerFloorplan).

If you set floorplanCount = 4 and interiorCountPerFloorplan = 5, there will be 20 worlds with5 unique floor plans.

ContentsfloorplanCount

The number of unique floorplans.

Type: Integer

Required: NointeriorCountPerFloorplan

The number of unique interiors per floorplan.

Type: Integer

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

443

Page 452: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南WorldExportJobSummary

WorldExportJobSummaryInformation about a world export job.

Contentsarn

The Amazon Resource Name (ARN) of the world export job.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: NocreatedAt

The time, in milliseconds since the epoch, when the world export job was created.

Type: Timestamp

Required: Nostatus

The status of the world export job.Pending

The world export job request is pending.Running

The world export job is running.Completed

The world export job completed.Failed

The world export job failed. See failureCode for more information.Canceled

The world export job was cancelled.Canceling

The world export job is being cancelled.

Type: String

Valid Values: Pending | Running | Completed | Failed | Canceling | Canceled

Required: Noworlds

A list of worlds.

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 100 items.

444

Page 453: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南WorldExportJobSummary

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

445

Page 454: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南WorldFailure

WorldFailureInformation about a failed world.

ContentsfailureCode

The failure code of the world export job if it failed:InternalServiceError

Internal service error.LimitExceeded

The requested resource exceeds the maximum number allowed, or the number of concurrentstream requests exceeds the maximum number allowed.

ResourceNotFound

The specified resource could not be found.RequestThrottled

The request was throttled.InvalidInput

An input parameter in the request is not valid.

Type: String

Valid Values: InternalServiceError | LimitExceeded | ResourceNotFound |RequestThrottled | InvalidInput | AllWorldGenerationFailed

Required: NofailureCount

The number of failed worlds.

Type: Integer

Required: NosampleFailureReason

The sample reason why the world failed. World errors are aggregated. A sample is used as thesampleFailureReason.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1024.

Pattern: .*

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++

446

Page 456: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南WorldGenerationJobSummary

WorldGenerationJobSummaryInformation about a world generator job.

Contentsarn

The Amazon Resource Name (ARN) of the world generator job.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: NocreatedAt

The time, in milliseconds since the epoch, when the world generator job was created.

Type: Timestamp

Required: NofailedWorldCount

The number of worlds that failed.

Type: Integer

Required: Nostatus

The status of the world generator job:Pending

The world generator job request is pending.Running

The world generator job is running.Completed

The world generator job completed.Failed

The world generator job failed. See failureCode for more information.PartialFailed

Some worlds did not generate.Canceled

The world generator job was cancelled.Canceling

The world generator job is being cancelled.

Type: String

448

Page 457: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南WorldGenerationJobSummary

Valid Values: Pending | Running | Completed | Failed | PartialFailed |Canceling | Canceled

Required: NosucceededWorldCount

The number of worlds that were generated.

Type: Integer

Required: Notemplate

The Amazon Resource Name (arn) of the world template.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: NoworldCount

Information about the world count.

Type: WorldCount (p. 443) object

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

449

Page 458: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南WorldSummary

WorldSummaryInformation about a world.

Contentsarn

The Amazon Resource Name (ARN) of the world.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: NocreatedAt

The time, in milliseconds since the epoch, when the world was created.

Type: Timestamp

Required: NogenerationJob

The Amazon Resource Name (arn) of the world generation job.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: Notemplate

The Amazon Resource Name (arn) of the world template.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: No

See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java V2• AWS SDK for Ruby V3

450

Page 459: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南Common Errors

Common ErrorsThis section lists the errors common to the API actions of all AWS services. For errors specific to an APIaction for this service, see the topic for that API action.

AccessDeniedException

You do not have sufficient access to perform this action.

HTTP Status Code: 400IncompleteSignature

The request signature does not conform to AWS standards.

HTTP Status Code: 400InternalFailure

The request processing has failed because of an unknown error, exception or failure.

HTTP Status Code: 500InvalidAction

The action or operation requested is invalid. Verify that the action is typed correctly.

HTTP Status Code: 400InvalidClientTokenId

The X.509 certificate or AWS access key ID provided does not exist in our records.

HTTP Status Code: 403InvalidParameterCombination

Parameters that must not be used together were used together.

HTTP Status Code: 400InvalidParameterValue

An invalid or out-of-range value was supplied for the input parameter.

HTTP Status Code: 400InvalidQueryParameter

The AWS query string is malformed or does not adhere to AWS standards.

HTTP Status Code: 400MalformedQueryString

The query string contains a syntax error.

HTTP Status Code: 404MissingAction

The request is missing an action or a required parameter.

HTTP Status Code: 400MissingAuthenticationToken

The request must contain either a valid (registered) AWS access key ID or X.509 certificate.

451

Page 460: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南Common Parameters

HTTP Status Code: 403MissingParameter

A required parameter for the specified action is not supplied.

HTTP Status Code: 400NotAuthorized

You do not have permission to perform this action.

HTTP Status Code: 400OptInRequired

The AWS access key ID needs a subscription for the service.

HTTP Status Code: 403RequestExpired

The request reached the service more than 15 minutes after the date stamp on the request or morethan 15 minutes after the request expiration date (such as for pre-signed URLs), or the date stamp onthe request is more than 15 minutes in the future.

HTTP Status Code: 400ServiceUnavailable

The request has failed due to a temporary failure of the server.

HTTP Status Code: 503ThrottlingException

The request was denied due to request throttling.

HTTP Status Code: 400ValidationError

The input fails to satisfy the constraints specified by an AWS service.

HTTP Status Code: 400

Common ParametersThe following list contains the parameters that all actions use for signing Signature Version 4 requests witha query string. Any action-specific parameters are listed in the topic for that action. For more informationabout Signature Version 4, see Signature Version 4 Signing Process in the Amazon Web Services GeneralReference.

Action

The action to be performed.

Type: string

Required: YesVersion

The API version that the request is written for, expressed in the format YYYY-MM-DD.

452

Page 461: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南Common Parameters

Type: string

Required: YesX-Amz-Algorithm

The hash algorithm that you used to create the request signature.

Condition: Specify this parameter when you include authentication information in a query string insteadof in the HTTP authorization header.

Type: string

Valid Values: AWS4-HMAC-SHA256

Required: ConditionalX-Amz-Credential

The credential scope value, which is a string that includes your access key, the date, the region youare targeting, the service you are requesting, and a termination string ("aws4_request"). The value isexpressed in the following format: access_key/YYYYMMDD/region/service/aws4_request.

For more information, see Task 2: Create a String to Sign for Signature Version 4 in the Amazon WebServices General Reference.

Condition: Specify this parameter when you include authentication information in a query string insteadof in the HTTP authorization header.

Type: string

Required: ConditionalX-Amz-Date

The date that is used to create the signature. The format must be ISO 8601 basic format(YYYYMMDD'T'HHMMSS'Z'). For example, the following date time is a valid X-Amz-Date value:20120325T120000Z.

Condition: X-Amz-Date is optional for all requests; it can be used to override the date used for signingrequests. If the Date header is specified in the ISO 8601 basic format, X-Amz-Date is not required.When X-Amz-Date is used, it always overrides the value of the Date header. For more information, seeHandling Dates in Signature Version 4 in the Amazon Web Services General Reference.

Type: string

Required: ConditionalX-Amz-Security-Token

The temporary security token that was obtained through a call to AWS Security Token Service (AWSSTS). For a list of services that support temporary security credentials from AWS Security TokenService, go to AWS Services That Work with IAM in the IAM User Guide.

Condition: If you're using temporary security credentials from the AWS Security Token Service, youmust include the security token.

Type: string

Required: ConditionalX-Amz-Signature

Specifies the hex-encoded signature that was calculated from the string to sign and the derived signingkey.

453

Page 462: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南Common Parameters

Condition: Specify this parameter when you include authentication information in a query string insteadof in the HTTP authorization header.

Type: string

Required: ConditionalX-Amz-SignedHeaders

Specifies all the HTTP headers that were included as part of the canonical request. For moreinformation about specifying signed headers, see Task 1: Create a Canonical Request For SignatureVersion 4 in the Amazon Web Services General Reference.

Condition: Specify this parameter when you include authentication information in a query string insteadof in the HTTP authorization header.

Type: string

Required: Conditional

454

Page 463: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南

限制和支持的区域有关 AWS RoboMaker 服务限制,请参阅 AWS RoboMaker 限制。

有关请求放宽 AWS 资源限制的信息,请参阅 AWS 服务限制。

有关支持 AWS RoboMaker 的 AWS 区域的列表,请参阅 AWS RoboMaker 区域。

455

Page 464: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南

AWS RoboMaker 的文档历史记录下表介绍了此版本的 AWS RoboMaker 的文档。

更改 Description Date

新服务和指南 这是 AWS RoboMaker 和 AWSRoboMaker 开发人员指南 的初始版本。

2018 年 11 月 7 日

对标签的支持 添加了对多种 AWS RoboMaker资源的标签支持。

1/24/2019

样品已弃用 自动驾驶加固、导航、人员检测和语音命令样本。

5/15/2020

456

Page 465: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南

AWS 词汇表有关最新 AWS 术语,请参阅 AWS General Reference 中的 AWS 词汇表。

457

Page 466: AWS RoboMaker - 开发人员指南...1.阅读 工作原理 (p. 5) – AWS RoboMaker 概述。了解构建机器人应用程序和模拟所涉及的关键概念和 组件。请按提供的顺序阅读本主题。2.阅读开始使用

AWS RoboMaker 开发人员指南

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

cdlviii