AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker...

368
AWS RoboMaker 開発者ガイド

Transcript of AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker...

Page 1: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker開発者ガイド

Page 2: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド

AWS RoboMaker: 開発者ガイドCopyright © 2020 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 - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド

Table of ContentsAWS RoboMaker とは ........................................................................................................................ 1

AWS RoboMaker を初めて使用する場合 ........................................................................................ 1サポートされているソフトウェアとバージョン ............................................................................... 1

ROS 2 Dashing (ベータ版) .................................................................................................................. 3ROS2 の既知の相違点 ................................................................................................................. 3

Colcon を使用したアプリケーションのクロスコンパイル .......................................................... 3rosout を使用してログデータをキャプチャする ....................................................................... 3ROS2 コマンドラインインターフェイスの使用 ....................................................................... 4AWS RoboMaker シミュレーション ROS サービスの使用 ........................................................ 4

既知の問題 ................................................................................................................................ 4仕組み ............................................................................................................................................... 5

AWS RoboMaker によるロボット開発 ........................................................................................... 5ROS 開発環境を作成する ............................................................................................................ 6ロボットアプリケーションを作成する ............................................................................................ 6シミュレーションおよびテストデータを開発する ............................................................................ 7フリート管理とデプロイ .............................................................................................................. 7

開始方法 ............................................................................................................................................ 8重要なライセンス情報 ................................................................................................................. 8ステップ 1: アカウントを作成する ................................................................................................ 9

AWS アカウントを作成する ................................................................................................. 9IAM 管理者を作成してサインインする ................................................................................... 9

ステップ 2: Hello World サンプルアプリケーションを実行する ........................................................ 10ステップ 3: 環境を設定してアプリケーションをビルドする ............................................................. 11

開発環境を作成する .......................................................................................................... 11アプリケーションを変更してビルドする ............................................................................... 11

ステップ 4: シミュレーションを実行する ..................................................................................... 12Hello World アプリケーションをバンドルする ....................................................................... 12Hello World シミュレーションアプリケーションを再起動する .................................................. 12シミュレーションを試す .................................................................................................... 13

ステップ 5: ロボットアプリケーションをデプロイする ................................................................... 13TurtleBot3 ロボットを準備する ........................................................................................... 14Hello World ロボットアプリケーションをバンドルしてデプロイする ........................................ 14

ステップ 6: クリーンアップする ................................................................................................. 15追加のサンプルロボット ............................................................................................................ 16

Navigation and Person Recognition ..................................................................................... 16Voice Commands .............................................................................................................. 17Robot Monitoring .............................................................................................................. 18Object Following using Reinforcement Learning ..................................................................... 19Self-Driving using Reinforcement Learning ............................................................................ 20

サンプルアプリケーション ................................................................................................................. 21サンプルアプリケーションを起動する .......................................................................................... 21アクセス許可を設定する ............................................................................................................ 22

最小限必要なアクセス権限 ................................................................................................. 22Navigation (ナビゲーション) ............................................................................................... 24個人の検出 ....................................................................................................................... 25音声コマンド .................................................................................................................... 26

アプリケーションのバージョニング ..................................................................................................... 28$LATEST バージョン ................................................................................................................ 28アプリケーションバージョンを更新する ....................................................................................... 28アプリケーションバージョンを削除する ....................................................................................... 29

アプリケーションの開発 .................................................................................................................... 30新しいロボットアプリケーションの作成 ....................................................................................... 30

前提条件 .......................................................................................................................... 31ロボットアプリケーションワークスペースを作成します。 ...................................................... 31

iii

Page 4: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド

シミュレーションアプリケーションワークスペースの作成 ...................................................... 34ロボットおよびシミュレーションアプリケーションバンドルをビルドする ................................. 37

colcon によるロボットアプリケーションのビルドとバンドル ........................................................... 38colcon のインストール ....................................................................................................... 38colcon によるビルドとバンドル .......................................................................................... 38

シミュレーションジョブの作成 ................................................................................................... 38前提条件 .......................................................................................................................... 39ソースおよび出力の Amazon S3 バケットの作成 ................................................................... 39ロボットアプリケーションを作成する .................................................................................. 39シミュレーションアプリケーションの作成 ............................................................................ 40シミュレーションジョブロールの作成 .................................................................................. 40シミュレーションジョブの作成 ........................................................................................... 42

AWS RoboMaker クラウド拡張機能 ............................................................................................ 42前提条件 .......................................................................................................................... 43AWS RoboMaker クラウド拡張機能 のインストール .............................................................. 43

AWS Cloud9 による開発 ............................................................................................................ 43開発環境の作成 ................................................................................................................. 44開発環境の使用 ................................................................................................................. 44環境の削除 ....................................................................................................................... 52

ロボットアプリケーションの使用 ........................................................................................................ 53ロボットアプリケーションの作成 ................................................................................................ 53アプリケーションバージョンの作成 ............................................................................................. 54ロボットアプリケーションの表示 ................................................................................................ 55ロボットアプリケーションの更新 ................................................................................................ 55ロボットアプリケーションの削除 ................................................................................................ 56ロボットアプリケーションバージョンの削除 ................................................................................. 56

シミュレーションアプリケーションの使用 ............................................................................................ 58シミュレーションアプリケーションの作成 .................................................................................... 58シミュレーションアプリケーションバージョンの作成 .................................................................... 59シミュレーションアプリケーションの表示 .................................................................................... 60シミュレーションアプリケーションの更新 .................................................................................... 60シミュレーションアプリケーションの削除 .................................................................................... 61シミュレーションアプリケーションバージョンの削除 .................................................................... 62

シミュレーションジョブの実行 ........................................................................................................... 64VPC 設定 ................................................................................................................................ 64

Amazon VPC アクセス用に AWS RoboMaker シミュレーションジョブを設定する ...................... 64シミュレーションジョブ用のインターネットアクセス ............................................................ 65

シミュレーションジョブへの接続 ................................................................................................ 65ポートフォワーディングを有効にする前に ............................................................................ 65ポートフォワーディングの有効化 ........................................................................................ 66ポートフォワーディングの例 .............................................................................................. 66

シミュレーションジョブのデータへのアクセス .............................................................................. 68ルートアクセスとシステム機能 ................................................................................................... 69AWS RoboMaker によって作成された環境変数 ............................................................................. 70シミュレーションジョブのタグの管理 .......................................................................................... 71

ROS コマンドラインツールを使用したタグの使用 ................................................................. 71シミュレーションアプリケーションでコードからタグを使用する ............................................. 72

再生のための ROS bag の使用 ................................................................................................... 72起動ファイル設定の例 ....................................................................................................... 73再生終了時の失敗したシミュレーションジョブの回避 ............................................................ 75カスタムステータスとプロパティ値のタグの使用 ................................................................... 76シミュレーションジョブの早期キャンセル ............................................................................ 76

シミュレーションジョブの管理 ................................................................................................... 77シミュレーションジョブの作成 ........................................................................................... 78シミュレーションジョブの表示 ........................................................................................... 83シミュレーションジョブのキャンセル .................................................................................. 83シミュレーションジョブのクローン ..................................................................................... 84

iv

Page 5: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド

シミュレーションジョブの再起動 ........................................................................................ 84シミュレーションジョブバッチの管理 .......................................................................................... 85

シミュレーションジョブバッチの開始 .................................................................................. 85シミュレーションジョブバッチの表示 .................................................................................. 87シミュレーションジョブバッチのキャンセル ......................................................................... 87シミュレーションジョブバッチのクローン作成 ...................................................................... 88

シミュレーションツール ............................................................................................................ 88Gazebo ........................................................................................................................... 88rqt ................................................................................................................................... 90rviz ................................................................................................................................. 91ターミナル ....................................................................................................................... 92

フリート管理 .................................................................................................................................... 94ロボットアプリケーションのデプロイ .......................................................................................... 94

ロボットアプリケーションをデプロイする方法 ...................................................................... 94ロボットの管理 ......................................................................................................................... 95

ロボットの作成 ................................................................................................................. 95ロボットの削除 ................................................................................................................. 97

フリートの管理 ......................................................................................................................... 98フリートの作成 ................................................................................................................. 98ロボットの登録と登録解除 ................................................................................................. 99フリートの削除 ............................................................................................................... 100

デプロイの管理 ....................................................................................................................... 100条件付きデプロイ ............................................................................................................ 101デプロイジョブの作成 ...................................................................................................... 101デプロイジョブの表示 ...................................................................................................... 103

セキュリティ .................................................................................................................................. 105データ保護 ............................................................................................................................. 105認証とアクセスコントロール ..................................................................................................... 105

認証とアクセスコントロールの概要 ................................................................................... 106必要なアクセス許可 ......................................................................................................... 107AWS RoboMaker で IAM を使用する方法 ........................................................................... 110認証とアクセスコントロールのトラブルシューティング ........................................................ 111認証とは ........................................................................................................................ 112アクセスコントロールとは ................................................................................................ 113ポリシーとは .................................................................................................................. 116サービスにリンクされたロールの使用 ................................................................................ 119IAM の開始方法 .............................................................................................................. 121

ログ記録とモニタリング ........................................................................................................... 128Amazon CloudWatch を使用した AWS RoboMaker のモニタリング ........................................ 129AWS CloudTrail を使用した AWS RoboMaker API コールのログ作成 ...................................... 131

セキュリティコンプライアンス ................................................................................................. 132耐障害性 ................................................................................................................................ 132インフラストラクチャセキュリティ ........................................................................................... 133

AWS RoboMaker リソースにタグを付ける .......................................................................................... 134タグの基本 ............................................................................................................................. 134

タグの制約と制限 ............................................................................................................ 135IAM ポリシーでのタグの使用 .................................................................................................... 135

トラブルシューティング ................................................................................................................... 137シミュレーションジョブのトラブルシューティング ...................................................................... 137

シミュレーションジョブが失敗しました ............................................................................. 137開発環境のトラブルシューティング ........................................................................................... 140

サンプルコードに問題がある ............................................................................................. 140デプロイのトラブルシューティング ........................................................................................... 140

デプロイに失敗しました ................................................................................................... 140ロボットのローカルライブラリを使用する方法 .................................................................... 143ロボットアプリケーションバージョンの ETag の不一致が発生しましたか? ............................. 143

colcon でのビルドとバンドルのトラブルシューティング ............................................................... 143

v

Page 6: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド

Colcon でのビルドの失敗 ................................................................................................. 143colcon バンドルの失敗 ..................................................................................................... 144不足している依存関係があります。 ................................................................................... 144

API リファレンス ............................................................................................................................ 146Actions .................................................................................................................................. 146

BatchDescribeSimulationJob ............................................................................................. 148CancelDeploymentJob ...................................................................................................... 152CancelSimulationJob ........................................................................................................ 154CancelSimulationJobBatch ................................................................................................ 156CreateDeploymentJob ...................................................................................................... 158CreateFleet .................................................................................................................... 164CreateRobot ................................................................................................................... 167CreateRobotApplication .................................................................................................... 171CreateRobotApplicationVersion .......................................................................................... 175CreateSimulationApplication .............................................................................................. 179CreateSimulationApplicationVersion ................................................................................... 184CreateSimulationJob ........................................................................................................ 188DeleteFleet ..................................................................................................................... 198DeleteRobot ................................................................................................................... 200DeleteRobotApplication .................................................................................................... 202DeleteSimulationApplication .............................................................................................. 204DeregisterRobot .............................................................................................................. 206DescribeDeploymentJob ................................................................................................... 209DescribeFleet ................................................................................................................. 213DescribeRobot ................................................................................................................ 217DescribeRobotApplication ................................................................................................. 221DescribeSimulationApplication ........................................................................................... 225DescribeSimulationJob ..................................................................................................... 229DescribeSimulationJobBatch ............................................................................................. 236ListDeploymentJobs ......................................................................................................... 243ListFleets ....................................................................................................................... 247ListRobotApplications ....................................................................................................... 250ListRobots ...................................................................................................................... 253ListSimulationApplications ................................................................................................. 256ListSimulationJobBatches ................................................................................................. 259ListSimulationJobs ........................................................................................................... 262ListTagsForResource ....................................................................................................... 265RegisterRobot ................................................................................................................. 267RestartSimulationJob ....................................................................................................... 270StartSimulationJobBatch ................................................................................................... 272SyncDeploymentJob ........................................................................................................ 281TagResource .................................................................................................................. 286UntagResource ............................................................................................................... 288UpdateRobotApplication ................................................................................................... 290UpdateSimulationApplication ............................................................................................. 294

Data Types ............................................................................................................................ 298BatchPolicy .................................................................................................................... 300Compute ........................................................................................................................ 301ComputeResponse .......................................................................................................... 302DataSource .................................................................................................................... 303DataSourceConfig ........................................................................................................... 304DeploymentApplicationConfig ............................................................................................ 305DeploymentConfig ........................................................................................................... 306DeploymentJob ............................................................................................................... 307DeploymentLaunchConfig ................................................................................................. 309FailedCreateSimulationJobRequest .................................................................................... 311Filter .............................................................................................................................. 313

vi

Page 7: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド

Fleet .............................................................................................................................. 314LaunchConfig ................................................................................................................. 316LoggingConfig ................................................................................................................. 318NetworkInterface ............................................................................................................. 319OutputLocation ................................................................................................................ 320PortForwardingConfig ....................................................................................................... 321PortMapping ................................................................................................................... 322ProgressDetail ................................................................................................................ 323RenderingEngine ............................................................................................................. 325Robot ............................................................................................................................ 326RobotApplicationConfig .................................................................................................... 328RobotApplicationSummary ................................................................................................ 329RobotDeployment ............................................................................................................ 331RobotSoftwareSuite ......................................................................................................... 333S3KeyOutput .................................................................................................................. 334S3Object ........................................................................................................................ 335SimulationApplicationConfig .............................................................................................. 336SimulationApplicationSummary .......................................................................................... 337SimulationJob ................................................................................................................. 339SimulationJobBatchSummary ............................................................................................ 343SimulationJobRequest ...................................................................................................... 345SimulationJobSummary .................................................................................................... 348SimulationSoftwareSuite ................................................................................................... 350Source ........................................................................................................................... 351SourceConfig .................................................................................................................. 352VPCConfig ..................................................................................................................... 353VPCConfigResponse ....................................................................................................... 354

Common Errors ...................................................................................................................... 355Common Parameters ............................................................................................................... 356

制限とサポートされているリージョン ................................................................................................ 359ドキュメント履歴 ............................................................................................................................ 360AWS の用語集 ................................................................................................................................ 361

vii

Page 8: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドAWS RoboMaker を初めて使用する場合

AWS RoboMaker とはAWS RoboMaker は、大規模なロボットアプリケーションを簡単に作成できるサービスです。AWSRoboMaker は、ロボットオペレーティングシステム (ROS) のフレームワークをクラウドのサービスで拡張します。これには、AWS の Machine Learning サービスも含まれます。また、モニタリングサービスが含まれます。さらに分析サービスも含まれます。これらのサービスの連携により、ロボットは複数の動作を自発的に行うことができます。たとえば、データのストリーミング、移動、通信、理解、学習ができます。AWS RoboMaker はロボットアプリケーションの開発環境を提供します。また、ロボットシミュレーションサービスを提供し、アプリケーションのテストを高速化します。フリート管理サービスを提供し、リモートからアプリケーションをデプロイして管理できるようにします。

AWS RoboMaker を初めて使用する場合AWS RoboMaker を初めて使用する場合は、以下を行ってください。

1. 「仕組み (p. 5)」を読む – AWS RoboMaker の概要。ロボットアプリケーションおよびシミュレーションのビルドに関する主要な概念やコンポーネントを確認します。このトピックを順に読み進めてください。

2. 「AWS RoboMaker の開始方法 (p. 8)」を読む – 最初のロボットアプリケーションとシミュレーションのビルドに役立つチュートリアル。シミュレーションジョブを実行する方法について説明します。AWS RoboMaker から提供されているサンプルコードを使用します。

3. 必要に応じて、次のトピックを参照してください。• ロボットオペレーティングシステム (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 Latest ROS ロボットアプリケーションとシミュレーションアプリケーションをバンドルするためのコマンドラインツール。

1

Page 9: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドサポートされているソフトウェアとバージョン

名前 サポートされるバージョン 説明

Gazebo 7、9 環境でロボットをシミュレートするためのツール。

rviz ROS rviz

ROS2 rviz2

ROS のセンサーデータと状態情報を 3D で可視化するツール。

rqt latest ROS GUI 開発用の Qt ベースのフレームワークおよびプラグイン。

ROS は、ここに記載されている Python バージョンをサポートしています。

名前 サポートされているバージョン サポートされている Ununtu バージョン

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

開発環境 (Create) 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

2

Page 10: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドROS2 の既知の相違点

ROS 2 Dashing (ベータ版)AWS RoboMaker は、ベータ版でロボットオペレーティングシステム 2 (ROS2) をサポートするようになりました。ROS2 はディスカバリ、シリアル化、トランスポーテーションを提供する業界データ接続標準である Data Distribution Standard (DDS) の上に構築されます。ROS2 は ROS のユースケースのセキュリティの強化、サービスの質、および埋め込みシステムとリアルタイムシナリオのサポートで拡大します。お客様は、AWS マネジメントコンソール、AWS SDK、AWS CLI、および AWS API を使用して、ROS2-Dashing で AWS RoboMaker でロボットアプリケーションを開発およびテストできます。AWSRoboMaker では、このベータ版の ROS2-Dashing 機能を運用ワークロードに使用しないことをお勧めします。

AWS RoboMaker ROS2 ベータ機能をリリースし、お客様に ROS2 を使用してロボットアプリケーションを構築する方法のプレビューを提供します。具体的には、ROS2 の最初の長期サポートリリースであるROS2 Dashing です。ROS-2 Dashing には、コミュニティが取り組んでいる特定の「既知の問題」があるため、ROS2 Dashing を使用して運用アプリケーションを構築することはお勧めしません。これは、こうした問題が完全に解決された後に AWS RoboMaker ROS2 の一般公開を発表する前に、AWS RoboMakerROS2 機能を使用してロボットアプリケーションを開発、テスト、評価し、フィードバックを提供する機会となります。このベータプログラムの最後に、ROS2 Dashing のサポートは非推奨になります。お客様は、ROS2 Dashing 上に構築された開発環境をシャットダウンするよう求められ、新しいシミュレーションジョブを開始することはできません。既存のシミュレーションジョブは完了するまで実行することができます。また、お客様は、ロボットフリートを管理するための AWS RoboMaker ROS2 の新リリースへの移行も求められます。

ベータ版の利用規約の詳細については、「AWS のサービス条件」を参照してください。

トピック• ROS2 の既知の相違点 (p. 3)• 既知の問題 (p. 4)

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 など) が付き、古いログファイルはインクリメントされます。

3

Page 11: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドROS2 コマンドラインインターフェイスの使用

ROS2 コマンドラインインターフェイスの使用ROS2 トピック、メッセージ、ノード、サービス、およびその他の情報を調べるには、ros2 コマンドを使用します。ros2 の使用方法の詳細については、「コマンドラインツールによる詳細分析」を参照してください。

AWS RoboMaker シミュレーション ROS サービスの使用タグの使用方法と ROS2 Dashing を使用したシミュレーションのキャンセル方法の詳細については、「github.com/aws-robotics/aws-robomaker-simulation-ros-pkgs/tree/dashing」を参照してください。

既知の問題ここでは、AWS RoboMaker で ROS2 を使用する際の既知の問題について説明します。

• ROS bag の再生はサポートされていません。ROS bag の再生の詳細については、「再生のための ROSbag の使用 (p. 72)」を参照してください。Amazon S3 出力場所を指定しても、ROS2 アプリケーションの rosbags は自動的には記録されません。ROS2 アプリケーションからの rosbag2 の記録の詳細については、「GitHub の rosbag2 リポジトリ」を参照してください。

• Hello world およびロボットのモニタリングサンプルアプリケーションは、ROS2 で動作するように更新されました。サンプルアプリケーションの説明については、「サンプルアプリケーション (p. 21)」を参照してください。

4

Page 12: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドAWS RoboMaker によるロボット開発

仕組みAWS RoboMaker は、ロボットアプリケーションをすばやく開発、テスト、およびデプロイするためのサービスです。このセクションでは、ロボット開発の概要を示します。AWS RoboMaker の仕組みについて説明します。AWS RoboMaker を初めて使用する方は、次のセクションを順にお読みください。

トピック• AWS RoboMaker によるロボット開発 (p. 5)• ROS 開発環境を作成する (p. 6)• ロボットアプリケーションを作成する (p. 6)• シミュレーションおよびテストデータを開発する (p. 7)• フリート管理とデプロイ (p. 7)

AWS RoboMaker によるロボット開発このセクションでは、一般的なロボット開発ワークフローを示します。これは、AWS RoboMaker でタスクを実行する方法を示します。

ロボットアプリケーション開発は、通常、物理ロボットのハードウェアを選択した後で開始します。まず、開発環境を作成し、アプリケーションをビルドするためのツールをロードします。次に、ロボットアプリケーションを作成します。環境データに応答するカスタムロジックを記述します。次にシミュレーションをビルドします。これは、ロボットが活動する世界のモデルです。シミュレーションジョブでのロボットの動作に関するデータを収集します。テストが完了したら、アプリケーションを物理ロボットにデプロイします。動作をモニタリングし、必要に応じてソフトウェアを更新します。

通常、ロボット開発では以下のアクティビティを実行します。

1. ROS 開発環境を作成します。ロボットアプリケーションを作成するには、ROS 開発用に設定された環境と、アプリケーションをビルドおよびバンドルするためのツール(Colcon など)が必要です。また、物理ロボット向けにアプリケーションをクロスコンパイルするためのツールも必要です。この作業は統合開発環境を使用して容易に達成できます。

AWS RoboMaker では、ロボットアプリケーションを開発するためのツールが事前に設定された AWSCloud9 開発環境を作成できます。また、既存の環境を使用することもできます。

2. ロボットアプリケーションを作成します。これはコードを記述する場所です。ROS が提供する基盤の上にビルドし、他の場所にある関数を統合します。作成するアプリケーションは、ロボットハードウェアと連携します。また、インテリジェンスを提供し、クラウドを使用します。

3. シミュレーションおよびテストデータを開発します。この段階では、シミュレートされた環境でロボットアプリケーションを実行します。シミュレーションからセンサーデータや他のパフォーマンスデータを収集します。ロボットのプログラミングを完了するには、多くのシミュレーションテストが必要な場合があります。

4. アプリケーションをロボットフリートにデプロイします。アプリケーションの動作が期待どおりであれば、アプリケーションをロボットにデプロイする準備が完了です。AWS RoboMaker では、デプロイされたソフトウェアを受け取るために、ロボットはロボットのグループ(フリート)に属する必要があります。AWS RoboMaker の各仮想ロボットが物理ロボットを表します。

5. ロボットをモニタリングして更新します。ロボットは実際に動作しています。 AWS RoboMaker クラウド拡張機能 で収集するデータを使用してロボットを絞り込みます。

以下のセクションでは、各ステップについて詳しく説明します。

5

Page 13: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドROS 開発環境を作成する

ROS 開発環境を作成するロボットアプリケーションを作成する前に、開発環境を適切に設定する必要があります。AWSRoboMaker によるロボット開発は、いくつかのオープンソースパッケージに依存します。

パッケージ バージョン 説明

ロボットオペレーティングシステム (ROS)

Kinetic

Melodic

開発者によるロボットアプリケーションの作成に役立つライブラリとツール。

ロボットオペレーティングシステム 2 (ROS2)

Dashing まだ開発中の ROS の新しいバージョン。AWSRoboMaker で ROS 2を使用する方法については、「ROS 2 Dashing(ベータ版) (p. 3)」を参照してください。

Colcon Latest ROS ロボットアプリケーションとシミュレーションアプリケーションをバンドルするためのコマンドラインツール。

Gazebo 7

9

複雑な環境でロボットをシミュレートするためのツール。

rviz Melodic

Dashing

ROS のセンサーデータと状態情報を 3D で視覚化するツール。

rqt Melodic

Dashing

ROS GUI 開発用の Qtベースのフレームワークおよびプラグイン。

AWS RoboMaker をサポートするために、独自の開発環境を作成したり、既存の開発環境を更新したりできます。ほとんどの開発者は、Ubuntu や他のサポートされている Linux バリアントを使用しています。他の互換性があるオペレーティングシステムを使用できる場合もあります。

AWS RoboMaker では、ロボット開発向けの設定済み開発環境をすばやく簡単に作成できます。

ロボットアプリケーションを作成する開発環境を設定したら、ロボットアプリケーションを作成します。ROS が提供する基盤の上にビルドします。ROS は Computation Graph(計算グラフ)に依存します。このグラフは、同時プロセス(ノード)のコレクションです。これらのプロセスでは車輪モーターの制御やメッセージの受け渡しなどのタスクを実行します。

一般的なロボットハードウェアやアルゴリズムのノードを作成する必要はありません。あらゆる種類のモーター、レーザー、アクチュエータ、ライダー、センサーなどを操作するためのパッケージ (ノードお

6

Page 14: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドシミュレーションおよびテストデータを開発する

よび依存するメッセージ定義) があります。また、他のパッケージのデータを使用してマップや経路探索などを作成するためのパッケージもあります。包括的なリストについては、ros.org を参照してください。

AWS RoboMaker クラウド拡張機能 により、トラブルシューティングに役立つ運用データをキャプチャしたり、インテリジェント関数でロボットを強化したりできます。詳細については、「the section called“AWS RoboMaker クラウド拡張機能” (p. 42)」を参照してください。

シミュレーションおよびテストデータを開発するロボットアプリケーション開発者は、シミュレーションを使用して動作を微調整します。シミュレーションを使用して、ロボットのアルゴリズムをテストし、回帰テストを実行します。シミュレーションでは、現実的なシナリオと詳細な仮想環境を使用して世界をモデル化し、ロボットの動作を模倣します。

AWS RoboMaker では、シミュレーションアプリケーション内にロボット、地形、アセットのモデルが1 つのシーンにまとめられています。シミュレーションアプリケーションでは、ロボットのセンサー、運動学、動力学などの物理的な側面をシミュレートします。センサーには、カメラやライダーだけでなく、GPS デバイスなども含まれる場合があります。運動学と動力学は、ロボットがジョイントや車輪を動かしたり、シミュレートされた環境のオブジェクトと物理的にやり取り(衝突など)したりするために必要です。

シミュレーションを実行するには、ロボットアプリケーションとシミュレーションアプリケーションをペアリングしてシミュレーションジョブを構成します。シミュレーションジョブは最大 14 日間実行できます。また、実行中に新しいアプリケーションで再起動できます。実行中のシミュレーションを操作するには、Gazebo、rviz、rqt、およびターミナルを使用してコマンドラインで操作します。たとえば、Gazeboを使用して環境でレンダリングされたロボットのモデルを表示したり、ターミナルを使用して ROS メッセージをリッスンまたはロボットに送信したりします。

ロボットには、それがシミュレートされた環境内にあることがわかりません。シミュレーターは、ロボットの物理デバイスと同じインターフェイスおよびデータ型を使用します。これにより、シミュレーションで同じロボットソフトウェアをテストして、ロボットにデプロイできます。

フリート管理とデプロイテストが完了したら、AWS IoT Greengrass 無線による更新を使用して、ロボットアプリケーションをロボットにデプロイできます。アプリケーションをデプロイする前に、AWS RoboMaker からの更新を受け取り、そのステータスを知らせるよう各ロボットを設定します。次に、ロボットをフリートに登録します。フリートは、ロボットの論理グループです。フリートが設定されたら、ロボットアプリケーションをデプロイします。デプロイのペースを制御できます。また、ロボットでアプリケーションが起動する前後の動作を制御することもできます。

デプロイに関する情報は AWS RoboMaker から提供されます。ロボットおよびシナリオ別の追加情報は、AWS RoboMaker クラウド拡張機能 とカスタムコードを使用してキャプチャできます。

7

Page 15: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド重要なライセンス情報

AWS RoboMaker の開始方法このセクションでは、ロボットアプリケーションとシミュレーションアプリケーションを構築する方法の基本を学びます。また、コードの編集方法、ビルド方法、新しいシミュレーションの起動方法、およびアプリケーションをロボットにデプロイする方法についても学習します。Hello world は、使用できるロボットアプリケーションやシミュレーションアプリケーションの例です。Hello world は TurtleBot3 用にビルドされます。ロボットは所定の位置で回転します。シミュレーションは何もない世界です。

Note

このチュートリアルは、ROS Kinetic と ROS Melodic に当てはまります。ROS 2 Dashing の詳細については、「ROS 2 Dashing (ベータ版) (p. 3)」を参照してください。

• ロボットアプリケーションをビルドする。 ロボットアプリケーションは、物理ロボットで実行されるロボットオペレーティングシステム (ROS) ベースのアプリケーションです。AWS RoboMaker シミュレーションでアプリケーションを実行するには、X86_64 アーキテクチャバージョンのロボットアプリケーションをビルドします。

• シミュレーションアプリケーションをビルドする。 シミュレーションアプリケーションには、3D の人工世界と、この世界でロボットの動作を制御する Gazebo プラグインが含まれています。X86_64 アーキテクチャバージョンのシミュレーションアプリケーションが必要です。

• AWS RoboMaker シミュレーションを起動する。 シミュレーションは、テストアルゴリズムの開発とテスト、Machine Learning モデルのトレーニング、ロボットアプリケーションの回帰テストに役立ちます。

• ロボットアプリケーションをデプロイする。 ロボットアプリケーションをビルドして TurtleBot3 ロボットにデプロイできます。デプロイは、AWS IoT Greengrass を使用して無線で実行されます。TurtleBot3の詳細については、「TurtleBot3」を参照してください。

• ログ記録およびモニタリング機能にアクセスする。 サービスのメトリクス、stdout に書き込まれたデータ、ROS バッグ、および Gazebo ログファイルにアクセスできます。アクセスは IAM を使用して制限できます。

トピック• 重要なライセンス情報 (p. 8)• ステップ 1: AWS アカウントおよび管理者を作成する (p. 9)• ステップ 2: Hello World サンプルアプリケーションを実行する (p. 10)• ステップ 3: 環境を設定してアプリケーションをビルドする (p. 11)• ステップ 4: シミュレーションを実行する (p. 12)• ステップ 5: ロボットアプリケーションをデプロイする (p. 13)• ステップ 6: クリーンアップする (p. 15)• 追加のサンプルロボット (p. 16)

重要なライセンス情報AWS RoboMaker のサンプルアプリケーションには、オープンソースライセンスでライセンス許諾されたサードパーティーソフトウェアが含まれています。サンプルは、デモンストレーションのみを目的として提供されています。本番稼働用ワークロードや商用製品/デバイスに関連した AWS RoboMaker サンプルアプリケーションの組み込みまたは使用は、該当するオープンソースライセンスに基づく法的権利や義務に影響する可能性があります。ソースファイル情報は、以下の各サンプルアプリケーションの readme ファイルに記載されています。

8

Page 16: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドステップ 1: アカウントを作成する

• Hello World• ナビゲーションと人物認識• 音声コマンド• ロボットのモニタリング• 強化学習を利用した自動運転• 強化学習を利用したオブジェクト追跡

AWS RoboMaker 開発環境およびシミュレーションには、オープンソースライセンスに基づいてライセンス許諾されたサードパーティー製ソフトウェアが含まれています。ソースファイルとライセンス情報は以下で確認できます。

• シミュレーション環境• 開発環境

ステップ 1: AWS アカウントおよび管理者を作成する

AWS RoboMaker を初めて使用する場合は、事前に以下のタスクを実行してください。

トピック• AWS アカウントを作成する (p. 9)• IAM 管理者を作成してサインインする (p. 9)

AWS アカウントを作成するすでに AWS アカウントをお持ちの場合は、この手順をスキップしてください。

Amazon Web Services (AWS) にサインアップすると、AWS のすべてのサービス (AWS RoboMaker など)に対して AWS アカウントが自動的にサインアップされます。料金が発生するのは、実際に使用したサービスの分のみです。

AWS アカウントを作成するには

1. https://portal.aws.amazon.com/billing/signup を開きます。2. オンラインの手順に従います。

サインアップ手順の一環として、通話呼び出しを受け取り、電話のキーパッドを用いて確認コードを入力することが求められます。

次のタスクで必要となるため、AWS アカウント ID を書き留めておきます。

IAM 管理者を作成してサインインするAWS アカウントを作成すると、シングルサインイン ID を取得します。これにより、アカウント内のすべての AWS のサービスとリソースにアクセスできます。この ID は、AWS アカウントのルートユーザーと呼ばれます。アカウントの作成時に使用した認証情報を使用して AWS マネジメントコンソール にサインインすると、アカウントのすべての AWS リソースにアクセスできます。

日常的なタスクには (それが管理タスクであっても)、ルートユーザーを使用しないよう強くお勧めします。代わりに、「個々の IAM ユーザーの作成」に従ってください。管理者権限を持つ AWS Identity and

9

Page 17: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドステップ 2: Hello World サンプルアプリケーションを実行する

Access Management (IAM) ユーザーを作成します。次に、ルートユーザーの認証情報を安全な場所に保存します。これらの認証情報では、アカウントおよびサービス管理の限定されたタスクのみを実行します。

管理者権限を持つ IAM ユーザーを作成してコンソールにサインインするには

1. AWS アカウントで管理者権限を持つアカウントを作成します。手順については、IAM ユーザーガイドの「初めての IAM ユーザーと管理者グループの作成」を参照してください。

Note

このガイドの演習と手順では、管理者レベルの認証情報を使用することを前提としています。別の IAM ユーザーを作成して使用する場合、そのユーザーに最小限のアクセス権限を付与します。

2. AWS マネジメントコンソール にサインインします。

IAM AWS マネジメントコンソール にサインインするには、特別な URL を使用する必要があります。詳細については、IAM ユーザーガイドの「ユーザーがアカウントにサインインする方法」を参照してください。

IAM の詳細については、以下を参照してください。

• AWS Identity and Access Management (IAM)• はじめに• IAM ユーザーガイド

ステップ 2: Hello World サンプルアプリケーションを実行する

ロボットアプリケーションおよびシミュレーションアプリケーションコードの使用を開始する前に、AWSRoboMaker コンソールで Hello World デモアプリケーションを実行します。これにより、アプリケーションに必要な AWS リソースが設定されます。たとえば、アプリケーションをロードしてシミュレーションの出力を書き込むための適切な IAM ロールと Amazon S3 バケットなどが設定されます。

Hello World デモアプリケーションを実行するには

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 でサンプルアプリケーションが起動されます。

サンプルアプリケーションでは、ROS Melodic および Gazebo 9 がデフォルトで使用されます。4. [simulation job detail (シミュレーションジョブの詳細)] ページで、ステータスが [running (実行中)] に

なったら、[Gazebo] を選択します。5. [AWS RoboMaker gzclient] ウィンドウで、マウスまたはキーボードを使用して TurtleBot にズームイ

ンします。詳細については、「Gazebo Keyboard Shortcuts」を参照してください。

ロボットは時計回りに回転しています。Gazebo は完全な機能を備えているため、その他の機能も試すことができます。たとえば、ロボットにもっとライトを当てる場合は、太陽(ポイントライト)アイコンを選択します。次に、ロボットの回りでポインターを移動してロボットを照らします。

6. 試したら、ブラウザウィンドウを閉じて Gazebo を終了します。

10

Page 18: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドステップ 3: 環境を設定してアプリケーションをビルドする

Hello World シミュレーションの実行時間は 1 時間です。以降の手順で、シミュレーションを再起動する機会があります。再起動すると、シミュレーションのジョブタイマーが 0 にリセットされ、シミュレーションジョブがもう 1 時間実行されます。

ステップ 3: 環境を設定してアプリケーションをビルドする

このセクションでは、AWS RoboMaker を使用して AWS Cloud9 環境を作成します。次に、サンプルコードをインストールします。開発環境で、ロボットアプリケーションを変更し、ロボットおよびシミュレーションアプリケーションをビルドします。

トピック• 開発環境を作成する (p. 11)• アプリケーションを変更してビルドする (p. 11)

開発環境を作成するAWS Cloud9 開発環境は、ROS と AWS RoboMaker でロボットアプリケーションとシミュレーションアプリケーションを開発するためのツールを提供します。

開発環境を作成するには

1. AWS RoboMaker コンソール (https://console.aws.amazon.com/robomaker/) にサインインします。2. 左側で、[Development (開発)] を展開し、[Development environments (開発環境)]、[Create

environment (環境の作成)] の順に選択します。3. [Create AWS RoboMaker development environment (AWS RoboMaker 開発環境の作成)] で、環境の

[name (名前)] として「HelloWorld」と入力します。4. [ROS Distribution (ROS ディストリビューション)] で、[ROS Melodic] を選択します。5. [Instance type (インスタンスタイプ)] として、デフォルトの [m4.large] をそのまま使用します。バン

ドルのパフォーマンスを向上させるためにさまざまなインスタンスタイプを選択できます。6. [VPC] を選択します。デフォルトの VPC を使用します。7. [Subnet (サブネット)] を選択します。パブリックサブネットを使用します。8. [Create (作成)] を選択して AWS Cloud9 開発環境を作成します。

アプリケーションを変更してビルドするこのセクションでは、AWS Cloud9 開発環境を使用してロボットアプリケーションを変更します。以下のステップは、ロボットを反時計回りに回転させてから、ロボットとシミュレーションアプリケーションをビルドする方法を示しています。

ロボットおよびシミュレーションアプリケーションをビルドするには

1. AWS RoboMaker コンソール (https://console.aws.amazon.com/robomaker/) にサインインします。2. 左側で、[Development (開発)] を展開し、[Development environments (開発環境)]、[HelloWorld]、

[Open environment (環境を開く)] の順に選択します。開発環境を準備するまでに数分かかることがあります。

3. HelloWorld AWS Cloud9 開発環境で、[Resources]、[Download samples]、[1. Hello World] の順に選択します。

11

Page 19: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドステップ 4: シミュレーションを実行する

4. 左側の [Environment (環境)] タブで、[HelloWorld]、[HelloWorld]、[robot_ws.src]、[hello_world_robot]、[nodes] の順に展開します。ファイル rotate を選択してエディタにロードします。

5. [rotate (回転)] タブで、ロボットを時計回りに回転させるために、次のようにコード内のレートを負にします。 self.twist.angular.z = -0.1。[ファイル]、[Save (保存)] の順に選択してファイルを保存します。

6. ロボットアプリケーションをビルドします。メニューで、[Run]、[Build]、[HelloWorld Robot] の順に選択します。

7. シミュレーションアプリケーションをビルドします。メニューで、[Run]、[Build]、[HelloWorldSimulation] の順に選択します。

次のステップ

ステップ 4: シミュレーションを実行する (p. 12)

ステップ 4: シミュレーションを実行するこのセクションでは、ロボットアプリケーションおよびシミュレーションアプリケーションをソースファイル内にバンドルします。ソースファイルには、アプリケーションを実行するために必要なすべての依存関係が含まれています。シミュレーションジョブを作成するには、ロボットアプリケーションのソースファイルとシミュレーションアプリケーションのソースファイルを使用します。デプロイを作成するには、ロボットアプリケーションのソースファイルを使用します。

トピック• Hello World アプリケーションをバンドルする (p. 12)• Hello World シミュレーションアプリケーションを再起動する (p. 12)• シミュレーションを試す (p. 13)

Hello World アプリケーションをバンドルする前のステップでは、ロボットアプリケーションとシミュレーションアプリケーションをビルドしました。このステップでは、各アプリケーションを、実行に必要なリソースおよび依存関係とバンドルします。たとえば、シミュレーションアプリケーションは、TurtleBot3 のモデルと物理パラメータを必要とします。

Warning

ロボットアプリケーションとシミュレーションアプリケーションのバンドルは、インスタンスタイプに応じてそれぞれ 20 分以上かかることがあります。

Hello World アプリケーションをバンドルするには

1. HelloWorld AWS Cloud9 開発環境で、メニューの [Run] を選択し、[Bundle]、[HelloWorld Robot] の順に選択します。

2. メニューで、[Run]、[Bundle]、[HelloWorld Simulation] の順に選択します。

Hello World シミュレーションアプリケーションを再起動する更新したロボットアプリケーションおよびシミュレーションアプリケーションのソースを使用して、実行中のシミュレーションを再起動できます。これは、コードをデバッグしたり、頻繁に変更を行ったりする場合に便利です。

12

Page 20: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドシミュレーションを試す

シミュレーションを再起動すると、タイマーがゼロにリセットされます。リセットまたはキャンセルされるまで、元の所要時間で実行されます。Hello World の場合、所要時間は 1 時間です。

1. メニューで、[Simulation]、[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 時間延長されます。

シミュレーションを試すシミュレーションの実行中に Gazebo を起動し、ロボットが反時計回りに回転していることを検証できます。AWS Cloud9 開発環境ターミナルでログを表示することもできます。

1. シミュレーションジョブのステータスは、[Simulation] メニュー項目の横に表示されます。ステータスが [Running (実行中)] に移行すると、アプリケーションを起動してシミュレーションを試すことができます。

2. AWS RoboMaker コンソールで、左側の [Simulation jobs (シミュレーションジョブ)] を選択し、[HelloWorld] シミュレーションジョブを選択します。

3. [Simulation details (シミュレーションの詳細)] 画面の [Simulation tools (シミュレーションツール)] セクションで、[Gazebo] を選択します。

4. [Gazebo] でロボットにズームインします。ロボットは所定の位置で回転しています。5. ログデータが、CloudWatch Logs と AWS Cloud9 開発環境のタブにストリーミングされます。

CloudWatch Logs を表示するには、[Simulation details (シミュレーションの詳細)] 画面で [Logs (ログ)] を選択します。

6. シミュレーションジョブで生成される出力ファイルは、シミュレーションジョブの出力先で利用できます。Amazon S3 バケットにアクセスするにはリンクを選択します。

次のステップ

ステップ 5: ロボットアプリケーションをデプロイする (p. 13)

ステップ 5: ロボットアプリケーションをデプロイする

このセクションでは、TurtleBot3 で使用する、ARMHF アーキテクチャ向けの Hello World ロボットアプリケーションをコンパイルします。また、AWS RoboMaker でロボットを作成し、AWS IoT Greengrass ソフトウェアで TurtleBot3 ロボットを設定します。次に、ロボットを新しいフリートに登録し、アプリケーションをデプロイします。

トピック• TurtleBot3 ロボットを準備する (p. 14)• Hello World ロボットアプリケーションをバンドルしてデプロイする (p. 14)

13

Page 21: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドTurtleBot3 ロボットを準備する

TurtleBot3 ロボットを準備するロボットアプリケーションを物理ロボットにデプロイする前に、AWS RoboMaker でロボットを作成します。次に、AWS IoT Greengrass を使用して物理ロボットを設定します。その後、フリートを作成し、ロボットをフリートに登録します。

TurtleBot3 ロボットを準備するには

1. まず、AWS RoboMaker でロボットを作成し、TurtleBot3 ロボットを設定します。ロボットの作成 (p. 95) の手順を行います。

2. 次に、フリートを作成します。フリートの作成 (p. 98) の手順を行います。3. ロボットを新しいフリートの一部として登録します。「ロボットの登録と登録解除 (p. 99)」の手順

に従って、ロボットをフリートに登録します。

Hello World ロボットアプリケーションをバンドルしてデプロイするこのセクションでは、Docker イメージを使用して ARMHF アーキテクチャ向けの Hello World アプリケーションをバンドルします。次に、ロボットアプリケーションのバンドルを Amazon S3 バケットにコピーしてデプロイします。

ロボットアプリケーションとシミュレーションアプリケーションのバンドルは、インスタンスタイプに応じてそれぞれ 20 分以上かかることがあります。

Note

AWS RoboMaker クロスコンパイルコンテナでは、colcon bundle を使用して、コンパイルされたソースをパッケージ化します。これにより、Ubuntu 用の Debian パッケージ(Bionic とXenial)が解決されます。これらのパッケージは、ROS ディストリビューションで提供されます。Raspbian 用の Debian パッケージなど、ROS ディストリビューションで利用できないパッケージは、クロスコンパイルコンテナではサポートされていません。

Hello World ロボットアプリケーションをバンドルしてデプロイするには

1. AWS RoboMaker コンソール (https://console.aws.amazon.com/robomaker/) にサインインします。2. 左側で、[Development (開発)] を展開し、[Development environments (開発環境)]、[HelloWorld]、

[Open IDE (IDE を開く)] の順に選択します。開発環境を準備するまでに数分かかることがあります。3. HelloWorld AWS Cloud9 開発環境で、ページの下部にある [bash] タブを選択します。次に、以下のコ

マンドを実行して、ARMHF 用の HelloWorld ロボットアプリケーションをバンドルします。

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$ 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

14

Page 22: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドステップ 6: クリーンアップする

4. ロボットアプリケーションをデプロイする前に、AWS RoboMaker がアクセスできる Amazon S3 バケットにロボットアプリケーションをコピーします。バケットは、HelloWorld ロボットアプリケーション用に作成済みです。次のコマンドを使用してバケットの名前を見つけます。

$ aws s3 ls | grep "robomakerhelloworld"

次に、上で見つけたバケットにロボットアプリケーションをコピーします。

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

ARMHF バージョンのロボットアプリケーションは hello-world-robot.armhf.tar です。5. 作成済みの Hello World ロボットアプリケーションを ARMHF バージョンのロボットアプリケーショ

ンで更新します。AWS RoboMaker コンソールで、[Development (開発)]、[Robot applications (ロボットアプリケーション)] の順に選択し、次に名前が roboMakerSampleApplicationHelloWorld_ で始まるロボットアプリケーションを選択します。

6. [Robot application details (ロボットアプリケーションの詳細)] ページの [Versions (バージョン)] で、[$LATEST]、[Update (更新)] の順に選択します。

7. [Update robot application (ロボットアプリケーションの更新)] ページの [Sources (ソース)] で、ステップ 4 の [ARMHF] バンドルの場所を [ARMHF source file (ARMHF ソースファイル)] フィールドに指定し、[作成] を選択します。

8. [Robot application details (ロボットアプリケーションの詳細)] ページの [Versions (バージョン)] で、[Create new version (新しいバージョンの作成)]、[Create (作成)] の順に選択します。

9. これでロボットアプリケーションを TurtleBot3 ロボットにデプロイする準備が完了しました。AWSRoboMaker コンソールで、[Fleet management (フリート管理)]、[Deployments (デプロイ)]、[Createdeployment (デプロイの作成)] の順に選択します。

10. [Create deployment (デプロイの作成)] ページで、ロボットを登録した作成済みのフリートを選択し、[Robot application (ロボットアプリケーション)]、作成した [Robot application version (ロボットアプリケーションバージョン)] の順に選択します。

11. [Deployment launch config (デプロイ起動設定)] で、[Package name (パッケージ名)]に「hello_world_robot」と入力します。次に、[Launch file (起動ファイル)] に「deploy_rotate.launch」と入力します。

12. [Deployment config (デプロイ設定)] で、[Concurrent deployment percentages (同時実行デプロイの割合 (%))] と [Failure threshold percentage (失敗のしきい値の割合 (%))] のデフォルト値をそのまま使用します。

13. [作成] を選択します。[デプロイの詳細] ページで、デプロイのステータスと進捗状況の詳細を追跡できます。

次のステップ

ステップ 6: クリーンアップする (p. 15)

ステップ 6: クリーンアップする余分な請求を回避するため、AWS マネジメントコンソール を使用して、この演習用に作成した項目を削除します。

1. AWS RoboMaker コンソール (https://console.aws.amazon.com/robomaker/) を開きます。[Simulation jobs (シミュレーションジョブ)]、[Hello World] シミュレーションジョブの順に選択します。[Simulation job details (シミュレーションジョブの詳細)] ページで、[Actions (アクション)]、[Cancel(キャンセル)]、[Yes, cancel (はい、キャンセルする)] の順に選択します。

15

Page 23: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド追加のサンプルロボット

Note

シミュレーションジョブは 90 日後に自動的に削除されます。2. AWS CloudFormation コンソール (https://console.aws.amazon.com/cloudformation/) を開

き、HelloWorld のスタックを削除します。複数のエントリがある場合は、日付と時刻で選択します。3. IAM コンソール (https://console.aws.amazon.com/iam/) を開き、IAM ロールを削除します。ア

クセス許可ポリシーを作成している場合は、これらも削除します。4. AWS Cloud9 コンソール (https://console.aws.amazon.com/cloud9/) を開きます。

[HelloWorld] 環境、[Delete (削除)] の順に選択します。確認のために 「Delete」と入力し、[Delete (削除)] を選択します。

追加のサンプルロボットこのセクションでは、より高度なロボットおよびシミュレーションについて説明します。

トピック• Navigation and Person Recognition (p. 16)• Voice Commands (p. 17)• Robot Monitoring (p. 18)• Object Following using Reinforcement Learning (p. 19)• Self-Driving using Reinforcement Learning (p. 20)

Navigation and Person Recognitionこのセクションでは、場所間を移動して写真の顔を認識するロボットを試します。

AWS RoboMaker を初めて使用する場合は、事前に「アカウントの作成 (p. 9)」のタスクを完了してください。次に、AWS RoboMaker コンソールで Navigation and Person Recognition サンプルアプリケーションを起動します。

トピック• シミュレートされたカメライメージを表示する (p. 16)• 認識された人物を表示する (p. 17)

シミュレートされたカメライメージを表示するrqt を使用してロボットのカメラからイメージを表示します。

シミュレートされたカメライメージを表示するには

1. AWS RoboMaker コンソール (https://console.aws.amazon.com/robomaker/) にサインインします。2. AWS RoboMaker コンソールで、左側の [Simulation jobs (シミュレーションジョブ)] を選択し、

[Navigation and Person Recognition] シミュレーションジョブを選択します。3. [Simulation details (シミュレーションの詳細)] ページの [Simulation tools (シミュレーションツール)]

セクションで、[rqt] を選択します。4. [rqt] で、[Plugins (プラグイン)]、[Visualization (視覚化)]、[Image View (イメージビュー)] の順に選択

します。5. [/camera/rgb/image_raw] を選択します。

16

Page 24: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドVoice Commands

認識された人物を表示するターミナルと rostopic を使用して、ロボットが仮想空間を探索して認識した人物を表示します。

ログを表示するには

1. AWS RoboMaker コンソール (https://console.aws.amazon.com/robomaker/) にサインインします。2. AWS RoboMaker コンソールで、左側の [Simulation jobs (シミュレーションジョブ)] を選択し、

[Navigation and Person Recognition] シミュレーションジョブを選択します。3. [Simulation details (シミュレーションの詳細)] ページの [Simulation tools (シミュレーションツール)]

セクションで、[terminal (ターミナル)] を選択します。4. [terminal (ターミナル)] で、以下を入力して ROS 環境をセットアップし、テキストコマンドツールを

実行します。

eval $AWS_ROBOMAKER_ROBOT_APPLICATION_SETUP

5. 次のコマンドを入力します。

rostopic echo /rekognized_people

人物が認識されると、次のような出力が表示されます。

Data: "I see brandon"

Voice Commandsこのセクションでは、Amazon Lex を使用してシミュレートされた書店で自然言語のテキストと音声でコマンドを受け付けるロボットを試します。ロボットでは、コマンド move [direction] [rate] またはturn [direction] [rate] と stop をサポートしています。各コマンドは承諾されて実行されます。

AWS RoboMaker を初めて使用する場合は、事前に「アカウントの作成 (p. 9)」のタスクを完了してください。次に、AWS RoboMaker コンソールで Voice Commands サンプルアプリケーションを起動します。

トピック• 自然言語を使用してロボットを移動させる (p. 16)

自然言語を使用してロボットを移動させるrqt を使用してロボットのカメラからイメージを表示します。

シミュレートされたカメライメージを表示するには

1. AWS RoboMaker コンソール (https://console.aws.amazon.com/robomaker/) にサインインします。2. AWS RoboMaker コンソールで、左側の [Simulation jobs (シミュレーションジョブ)] を選択し、[Voice

Commands] シミュレーションジョブを選択します。3. [Simulation details (シミュレーションの詳細)] 画面の [Simulation tools (シミュレーションツール)] セ

クションで、[Gazebo] を選択します。ロボットにズームインします。進行方向には数々の障害物が配置されています。

4. [Simulation details (シミュレーションの詳細)] 画面の [Simulation tools (シミュレーションツール)] セクションで、[terminal (ターミナル)] を選択します。

17

Page 25: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドRobot Monitoring

5. [terminal (ターミナル)] で、次のコマンドを入力してロボットオペレーティングシステム (ROS) 環境をセットアップし、テキストコマンドツールを実行します。

eval $AWS_ROBOMAKER_ROBOT_APPLICATION_SETUProsrun voice_interaction_robot text_input.py

6. 次のコマンドを入力して、ロボットが障害物に衝突するのを確認します。ロボットは、0.4 m/秒の速度で前進します。

move forward 0.4

ロボットは、停止するよう指示されるまで前進しようとします。ロボットの移動が速くなるほど、障害物の移動が多くなります。適切な速度は 0.3~0.5 m/秒です。

ロボットを後退させることもできます。

move backward 0.4

7. ロボットに右旋回または左旋回を指示できます。(例:

turn clockwise .5turn counterclockwise .65

旋回レートの単位はラジアン/秒です。旋回レートの適切な値は 0.4~0.78 です。8. ロボットを停止させるには「stop」と入力します。

Robot Monitoringこのセクションでは、Amazon CloudWatch メトリクスと Amazon CloudWatch Logs を使用して、シミュレートされた書店でのロボットのヘルスと運用メトリクスをモニタリングする方法を示します。ストリームのメトリクスには、速度、最寄りの障害物までの距離、現在の目標までの距離、ロボットの CPU 使用率、および RAM 使用量が含まれます。

AWS RoboMaker を初めて使用する場合は、事前に「アカウントの作成 (p. 9)」のタスクを完了してください。次に、AWS RoboMaker コンソールで Robot Monitoring サンプルアプリケーションを起動します。

トピック• ロボットのヘルスおよびパフォーマンスのメトリクスを表示する (p. 18)• CloudWatch Logs を表示する (p. 19)

ロボットのヘルスおよびパフォーマンスのメトリクスを表示するRobot Monitoring サンプルアプリケーションは、AWS RoboMaker クラウド拡張機能 を使用してヘルスおよびパフォーマンスのカスタムメトリクスを Amazon CloudWatch に書き込みます。

ロボットのヘルスおよびパフォーマンスのメトリクスを表示するには

1. https://console.aws.amazon.com/cloudwatch/ にある CloudWatch コンソールを開きます。2. CloudWatch コンソールで [Metrics (メトリクス)] を選択します。3. [Metrics (メトリクス)] ページの [All metrics (すべてのメトリクス)] タブで、Robot Monitoring 例を選択

します。

18

Page 26: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドObject Following using Reinforcement Learning

4. [Metrics (メトリクス)] ページの [All metrics (すべてのメトリクス)] タブで、[Robot (ロボット)] を選択します。これらは、ロボットの運用メトリクスです。

5. すべてのメトリクスを選択します。各メトリクスは、グラフに別の色で表示されます。6. グラフの上にカーソルを移動して、その時点の値を表示します。また、グラフの一部を選択してズー

ムインしたり、ページの上部にある [custom (カスタム)] を選択して、カスタムの期間を選択したりできます。

CloudWatch Logs を表示するシミュレーションジョブが実行されると、シミュレーションツールとシミュレーションジョブ内のアプリケーションによってログが生成されます。

ログを表示するには

1. https://console.aws.amazon.com/cloudwatch/ にある CloudWatch コンソールを開きます。2. CloudWatch コンソールで、[Logs (ログ)] を選択します。3. [Log groups (ロググループ)] ページで、Robot Monitoring ロググループを選択し、次に [Turtlebot3] を

選択します。4. 詳細を表示するイベントを選択します。たとえば、monitor_obstacle_distance イベントをフィ

ルター処理すると、その時点における最寄りの障害物までの距離を確認できます。

Object Following using Reinforcement Learningこのセクションでは、Coach Reinforcement Learning Library を使用して、シミュレーションの強化学習を通じてオブジェクトを追跡するようロボットに教えます。 Amazon CloudWatch メトリクスの報酬メトリクスを表示して、時間の経過に伴う Machine Learning モデルの進化を確認します。報酬関数をカスタマイズして、トレーニングに使用する Machine Learning アルゴリズムを強化します。

AWS RoboMaker を初めて使用する場合は、事前に「アカウントの作成 (p. 9)」のタスクを完了してください。次に、AWS RoboMaker コンソールで Object Following using Reinforcement Learning サンプルアプリケーションを起動します。

トピック• トレーニングのメトリクスを表示する (p. 19)• トレーニング済みの Machine Learning モデルを表示する (p. 20)

トレーニングのメトリクスを表示するObject Following using Reinforcement Learning サンプルアプリケーションは、AWS RoboMaker クラウド拡張機能 を使用してトレーニングのメトリクスを Amazon CloudWatch に書き込みます。

ロボットのトレーニングのメトリクスを表示するには

1. https://console.aws.amazon.com/cloudwatch/ にある CloudWatch コンソールを開きます。2. CloudWatch コンソールで [Metrics (メトリクス)] を選択します。3. [Metrics (メトリクス)] ページの [All metrics (すべてのメトリクス)] タブで、

[AWSRoboMakerSimulation] を選択します。4. ObjectTrackerRewardPerEpisode という名前のメトリクスを選択します。5. グラフの上にカーソルを移動して、その時点の値を表示します。このグラフは、各トライアル/エピ

ソードでロボットが受け取った合計の報酬をプロットします。時間の経過に伴う報酬の増加は、ロボットがターゲットオブジェクトを検出して追跡する能力が向上していることを示します。

19

Page 27: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドSelf-Driving using Reinforcement Learning

トレーニング済みの Machine Learning モデルを表示するシミュレーションジョブが実行されると、フリーズされた TensorFlow グラフが重みと共に Amazon S3 バケットに書き込まれます。このファイルをロボットにデプロイできます。

TensorFlow データを表示するには

1. Amazon Simple Storage Service コンソール (https://console.aws.amazon.com/s3/) を開きます。名前が awsrobomakerobjecttracker で始まるバケットを開きます。

2. バケットで、model-store/model という名前のフォルダを開き、model.pb を選択します。

Self-Driving using Reinforcement Learningこのセクションでは、シミュレーションでレースカーに運転を学習させます。強化学習とコーチ強化学習ライブラリを使用します。Amazon CloudWatch メトリクスの報酬メトリクスを表示して、時間の経過に伴う Machine Learning モデルの進化を確認します。報酬関数をカスタマイズして、トレーニングに使用する Machine Learning アルゴリズムを強化します。

AWS RoboMaker を初めて使用する場合は、事前に「アカウントの作成 (p. 9)」のタスクを完了してください。次に、AWS RoboMaker コンソールで Self-Driving using Reinforcement Learning サンプルアプリケーションを起動します。

トピック• トレーニングのメトリクスを表示する (p. 20)• トレーニング済みの Machine Learning モデルを表示する (p. 20)

トレーニングのメトリクスを表示するSelf-Driving using Reinforcement Learning サンプルアプリケーションは、AWS RoboMaker クラウド拡張機能 を使用してトレーニングのメトリクスを Amazon CloudWatch に書き込みます。

ロボットのトレーニングのメトリクスを表示するには

1. https://console.aws.amazon.com/cloudwatch/ にある CloudWatch コンソールを開きます。2. CloudWatch コンソールで [Metrics (メトリクス)] を選択します。3. [Metrics (メトリクス)] ページの [All metrics (すべてのメトリクス)] タブで、

[AWSRoboMakerSimulation] を選択します。4. DeepRacerRewardPerEpisode という名前のメトリクスを選択します。5. グラフの上にカーソルを移動して、その時点の値を表示します。このグラフは、各トライアルまたは

エピソードでロボットが受け取った合計の報酬をプロットします。時間の経過に伴う報酬の増加は、レーストラックでのレースカーのパフォーマンスが向上していることを示します。

トレーニング済みの Machine Learning モデルを表示するシミュレーションジョブが実行されると、フリーズされた TensorFlow グラフが重みと共に Amazon S3 バケットに書き込まれます。このファイルを DeepRacer にデプロイできます。

TensorFlow データを表示するには

1. Amazon Simple Storage Service コンソール (https://console.aws.amazon.com/s3/) を開きます。名前が awsrobomakerdeepracer で始まるバケットを開きます。

2. バケットで、model-store/model という名前のフォルダを開き、model.pb を選択します。

20

Page 28: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドサンプルアプリケーションを起動する

サンプルアプリケーションAWS RoboMaker には、 AWS RoboMaker コンソールで起動できるサンプルプログラムが付属しています。また、自分でサンプルプログラムをダウンロードしてビルドすることもできます。各サンプルには、GitHub にリポジトリがあります。readme ファイルには、サンプルとそのビルド方法が記述されています。readme は、デスクトップおよび AWS RoboMaker でサンプルをどのように実行できるかを示します。

• Hello world — ロボットアプリケーションとシミュレーションアプリケーションを作成する方法の基本を学びます。何もないワールドにロボットが含まれている、基本的なプロジェクトテンプレートから作成を開始します。

• ロボットのモニタリング — シミュレートされた書店でロボットのヘルスと運用メトリクスをモニタリングします。Amazon CloudWatch メトリクスと Amazon CloudWatch Logs を使用します。

• ナビゲーションと人認識 — ロボットが、シミュレーションされた家で目標位置間を移動し、写真の顔を認識します。また、カメラ画像をKinesis ビデオストリーム にストリーミングし、Amazon Rekognitionから顔認識結果を受け取り、Amazon Polly を使用して認識された人の名前を発声します。

• 音声コマンド — Amazon Lexを使用してシミュレートされた書店で自然言語のテキストと音声コマンドを使ってロボットを操作します。デフォルトのコマンドには、「move」、「turn」および「stop」があります。

• 強化学習を利用した自動運転 — Coach Reinforcement Learning Library を使用した強化学習により、シミュレーションでレースカーに運転を学習させます。Amazon CloudWatch で報酬メトリクスを確認して報酬関数をカスタマイズし、トレーニングに使用される機械学習アルゴリズムを改善します。

• 強化学習を利用したオブジェクト追跡 — Coach Reinforcement Learning Library を使用した強化学習を通じて、シミュレーションでロボットにオブジェクトを追跡、フォローすることを学習させます。Amazon CloudWatch で報酬メトリクスを確認して報酬関数をカスタマイズし、トレーニングに使用される機械学習アルゴリズムを改善します。

このセクションでは、AWS RoboMaker コンソールでサンプルアプリケーションを起動する方法について説明します。サンプルアプリケーションを起動する際に独自の IAM ロールを提供する場合は、アクセス許可を設定する方法についても説明します。

トピック• サンプルアプリケーションを起動する (p. 21)• アクセス許可を設定する (p. 22)

サンプルアプリケーションを起動するAWS RoboMaker コンソールを使用すると、事前に構築された AWS RoboMaker サンプルアプリケーションを簡単に起動できます。デフォルト設定を使用してアプリケーションを起動し、AWS RoboMaker に権限を管理させることができます。別の Gazebo バージョンを選択してカスタム IAM ロールを使用することもできます。

サンプルアプリケーションを起動するには

以下のいずれかのタブのステップに従ってください。

1. https://console.aws.amazon.com/robomaker/ で AWS RoboMaker コンソール にサインインします。

2. 左側のペインで、[Resources (リソース)]、[Sample applications (サンプルアプリケーション)] の順に選択します。

21

Page 29: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドアクセス許可を設定する

3. サンプルアプリケーションのいずれかを選択します。4. オプション: 追加の設定オプションを表示するには、[Additional settings (追加設定)] を選択します。5. オプション: [ROS ディストリビューション] を選択します。ROS Melodic は最新バージョンで

す。Gazebo 9 で使用できます。ロボットオペレーティングシステム (ROS) の詳細については、www.ros.org を参照してください。

6. オプション: [シミュレーションソフトウェアスイート] を選択します。各サンプルアプリケーションはGazebo 7 と Gazebo 9 用に構築されています。Gazebo 9 には、ロボット開発者向けの追加機能があります。

7. オプション: [IAM ロール] を選択します。このロールは、サンプルアプリケーション環境を作成し、起動するために AWS RoboMaker によって使用されます。また、 Amazon Rekognition のようにサンプルアプリケーションで使用されるリソースにアクセスできます。

Note

学生や教員として、AWS Educate ポータルから AWS RoboMaker にアクセスする場合は、IAM ロール [robomaker_students] を選択します。

サンプルアプリケーションに必要なアクセス権限の詳細については、??? (p. 22)を参照してください。

アクセス許可を設定するAWS RoboMaker コンソールでサンプルプログラムを起動するときに、使用する IAM ロールを指定できます。アクセス許可はサンプルプログラムによって異なります。このセクションでは、各サンプルの起動に必要な内容について説明します。

AWS Identity and Access Management ロールの詳細については、「AWS のサービスにアクセス許可を委任するロールの作成」を参照してください。

最小限必要なアクセス権限サンプルアプリケーションを起動するには、以下を持つロールが必要です。

• robomaker.amazonaws.com との信頼関係。• lambda.amazonaws.com との信頼関係。• サンプルアプリケーションのアクセス権限。

Hello world、Robot monitoring、Self-driving、および Object-following のサンプルを起動するには、次のアクセス許可を使用します。他のサンプルでは、これらのアクセス許可と一連の追加のアクセス許可を使用します。

account# をアカウント番号に置き換えます。

{ "Version": "2012-10-17", "Statement": [ { "Action": [ "s3:ListBucket", "s3:GetObject", "s3:PutObject" ], "Resource": [ "*" ],

22

Page 30: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド最小限必要なアクセス権限

"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" }, { "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" } ]

23

Page 31: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドNavigation (ナビゲーション)

}

Navigation (ナビゲーション)最小限のアクセス許可 (p. 22)とともに、ナビゲーションにはここに記載されているアクセス許可が必要です。

account# をアカウント番号に置き換えます。

{ "Action": [ "iam:PassRole" ], "Resource": "arn:aws:iam::account#:role/*", "Effect": "Allow"},{ "Action": [ "cloudformation:DescribeStacks" ], "Resource": "arn:aws:cloudformation:*:account#:stack/*", "Effect": "Allow"},{ "Action": [ "kinesis:DeleteStream", "kinesis:DescribeStream", "kinesis:CreateStream" ], "Resource": "arn:aws:kinesis:*:account#:stream/AmazonRekognitionPersonDetectionStream*", "Effect": "Allow"},{ "Action": [ "kinesisvideo:CreateStream" ], "Resource": "*", "Effect": "Allow"},{ "Action": [ "kinesisvideo:DescribeStream", "kinesisvideo:DeleteStream" ], "Resource": "arn:aws:kinesisvideo:*:account#:stream/RoboMakerPersonDetectionVideoStream*", "Effect": "Allow"},{ "Action": [ "rekognition:CreateCollection", "rekognition:DeleteCollection", "rekognition:IndexFaces" ], "Resource": "arn:aws:rekognition:*:account#:collection/roboMakerSampleAppPersonDetectionCollection*", "Effect": "Allow"},{ "Action": [ "rekognition:CreateStreamProcessor" ],

24

Page 32: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド個人の検出

"Resource": [ "arn:aws:rekognition:*:account#:streamprocessor/personDetectionStreamProcessor*", "arn:aws:rekognition:*:account#:collection/roboMakerSampleAppPersonDetectionCollection*" ], "Effect": "Allow"},{ "Action": [ "rekognition:DeleteStreamProcessor", "rekognition:StartStreamProcessor", "rekognition:StopStreamProcessor" ], "Resource": "arn:aws:rekognition:*:account#:streamprocessor/personDetectionStreamProcessor*", "Effect": "Allow"},{ "Action": [ "s3:PutBucketNotification" ], "Resource": "*", "Effect": "Allow"}

個人の検出最小限のアクセス許可 (p. 22)とともに、人物検出サンプルには rekognition.amazonaws.comとの信頼関係が必要です。ポリシー arn:aws:iam::aws:policy/service-role/AmazonRekognitionServiceRole をロールにアタッチします。

これには、ここに記載されているアクセス許可も必要です。account# をアカウント番号に置き換えます。

{ "Action": [ "iam:PassRole" ], "Resource": "arn:aws:iam::account#:role/*", "Effect": "Allow"},{ "Action": [ "cloudformation:DescribeStacks" ], "Resource": "arn:aws:cloudformation:*:account#:stack/*", "Effect": "Allow"},{ "Action": [ "kinesis:DeleteStream", "kinesis:DescribeStream", "kinesis:CreateStream" ], "Resource": "arn:aws:kinesis:*:account#:stream/AmazonRekognitionPersonDetectionStream*", "Effect": "Allow"},{ "Action": [ "kinesisvideo:CreateStream" ], "Resource": "*",

25

Page 33: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド音声コマンド

"Effect": "Allow"},{ "Action": [ "kinesisvideo:DescribeStream", "kinesisvideo:DeleteStream" ], "Resource": "arn:aws:kinesisvideo:*:account#:stream/RoboMakerPersonDetectionVideoStream*", "Effect": "Allow"},{ "Action": [ "rekognition:CreateCollection", "rekognition:DeleteCollection", "rekognition:IndexFaces" ], "Resource": "arn:aws:rekognition:*:account#:collection/roboMakerSampleAppPersonDetectionCollection*", "Effect": "Allow"},{ "Action": [ "rekognition:CreateStreamProcessor" ], "Resource": [ "arn:aws:rekognition:*:account#:streamprocessor/personDetectionStreamProcessor*", "arn:aws:rekognition:*:account#:collection/roboMakerSampleAppPersonDetectionCollection*" ], "Effect": "Allow"},{ "Action": [ "rekognition:DeleteStreamProcessor", "rekognition:StartStreamProcessor", "rekognition:StopStreamProcessor" ], "Resource": "arn:aws:rekognition:*:account#:streamprocessor/personDetectionStreamProcessor*", "Effect": "Allow"},{ "Action": [ "s3:PutBucketNotification" ], "Resource": "*", "Effect": "Allow"}

音声コマンド最小限のアクセス許可 (p. 22)とともに、音声コマンドサンプルには以下に記載されているアクセス許可が必要です。

account# をアカウント番号に置き換えます。

{ "Action": [ "lex:CreateBotVersion", "lex:GetBot", "lex:GetBotAlias", "lex:GetIntent",

26

Page 34: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド音声コマンド

"lex:GetSlotType", "lex:PutBot", "lex:PutBotAlias", "lex:PutIntent", "lex:PutSlotType" ], "Resource": [ "arn:aws:lex:*:account#:*" ], "Effect": "Allow"},{ "Action": [ "lex:GetImport", "lex:StartImport" ], "Resource": "*", "Effect": "Allow"}

27

Page 35: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド$LATEST バージョン

アプリケーションのバージョニングAWS RoboMaker は、ロボットアプリケーションとシミュレーションアプリケーションの複数のバージョンの作成をサポートしています。これにより、ロボットとシミュレーションで使用するコードを制御できます。バージョンは、アプリケーションの $LATEST バージョンの番号付きスナップショットです。バージョンは、開発ワークフローの段階別に作成できます。たとえば、開発、ベータデプロイ、本番稼働用に別のバージョンを使用します。

AWS RoboMaker ロボットアプリケーションまたはシミュレーションアプリケーションのバージョニングを行う場合、アプリケーションのスナップショットが作成されます。AWS RoboMaker は、各バージョンのファイルの Amazon S3 パスと ETag を記憶します。アプリケーションのバージョンは、Amazon S3 パスにまだ存在し、変更されていない (ETag が変更されていない) 限り、作成時に存在していたとおりに使用できます。

アプリケーションごとに作成できるバージョンは最大 40 個です。

トピック• $LATEST バージョン (p. 28)• アプリケーションバージョンを更新する (p. 28)• アプリケーションバージョンを削除する (p. 29)

$LATEST バージョンバージョンを作成すると、AWS RoboMaker は $LATEST バージョンのスナップショットを取得し、バージョン番号を 1 ずつ増やします。AWS RoboMaker は、ファイルの Amazon S3 パスと ETag を記憶します。パスは、ファイルを取得するために使用されます。ETag は、変更されていないことを確認するために使用されます。バージョン番号が再利用されることはありません。たとえば、最新バージョンが 10で、それを削除してから新しいバージョンを作成した場合、新しいバージョンはバージョン 11 になります。

アプリケーションの開発時に $LATST バージョンを更新できます。$LATEST バージョンを選択すると、指定した Amazon S3 の場所から取得されます。たとえば、ロボットアプリケーションとシミュレーションアプリケーションの最新バージョンを使用してシミュレーションジョブを開始し、その Amazon S3 パスでロボットアプリケーションを変更してから、シミュレーションジョブを再起動すると、更新されたロボットアプリケーションが使用されます。

ロボットアプリケーションをデプロイする場合は、デプロイする特定の番号付きバージョンを選択する必要があります。ロボットアプリケーションバージョンを作成する方法の詳細については、「アプリケーションバージョンの作成 (p. 54)」を参照してください。

シミュレーションアプリケーションバージョンを作成する方法の詳細については、「シミュレーションアプリケーションバージョンの作成 (p. 59)」を参照してください。ETags の詳細については、「一般的なレスポンスヘッダー」を参照してください。

アプリケーションバージョンを更新するAWS RoboMaker アプリケーションの $LATEST バージョンのみ更新できます。更新したバージョンは、AWS RoboMaker で使用可能になります。たとえば、シミュレーションジョブを再起動すると、最新バージョンのアプリケーションがシミュレーションで使用されます。

28

Page 36: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドアプリケーションバージョンを削除する

詳細については、「ロボットアプリケーションの更新 (p. 55)」および「シミュレーションアプリケーションの更新 (p. 60)」を参照してください。

アプリケーションバージョンを削除する不要になったアプリケーションバージョンは削除できます。詳細については、「ロボットアプリケーションバージョンの削除 (p. 56)」および「シミュレーションアプリケーションバージョンの削除 (p. 62)」を参照してください。

29

Page 37: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド新しいロボットアプリケーションの作成

アプリケーションの開発このセクションは、ロボットオペレーティングシステム (ROS) で開発するためのセットアップに役立ちます。設定された AWS Cloud9 開発環境でロボットアプリケーションとシミュレーションアプリケーションを作成する方法を学習します。AWS RoboMaker クラウド拡張機能 でロボットアプリケーションを拡張する方法を学習します。

AWS RoboMaker ロボットアプリケーションと AWS RoboMaker シミュレーションアプリケーションを作成して管理する方法についても説明します。

トピック• 新しいロボットアプリケーションの作成 (p. 30)• colcon によるロボットアプリケーションのビルドとバンドル (p. 38)• シミュレーションジョブの作成 (p. 38)• AWS RoboMaker クラウド拡張機能 (p. 42)• AWS Cloud9 による開発 (p. 43)

新しいロボットアプリケーションの作成このセクションでは、ロボットアプリケーションの作成方法について説明します。ここでは、ロボットアプリケーションとシミュレーションアプリケーションを分離するディレクトリ構造を使用します。これによって、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

30

Page 38: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド前提条件

### 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

トピック• 前提条件 (p. 31)• ロボットアプリケーションワークスペースを作成します。 (p. 31)• シミュレーションアプリケーションワークスペースの作成 (p. 34)• ロボットおよびシミュレーションアプリケーションバンドルをビルドする (p. 37)

前提条件AWS RoboMaker を使用したロボット開発用に設定された開発環境があることが必要です。使用する開発環境には以下を完備していることが必要です。

• ロボットオペレーティングシステム (ROS) Kinetic または Melodic• Colcon

事前設定されたロボット開発環境を AWS Cloud9 で作成するには、「開発環境の作成 (p. 44)」を参照してください。

ロボットアプリケーションワークスペースを作成します。ロボットアプリケーションワークスペースには、カスタム 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. ROS で Python を使用するために、空の __init__.py ファイルを作成します。

$ touch src/robot_app/__init__.py

5. 次の Python スクリプトを rotate.py という名前のファイルにコピーし、これを scripts ディレクトリに保存します。このサンプルノードは定期的にロボットをローテーションします。アプリケーションは 1 つ以上のノードとさらに高度なコードを備える可能性が高くなります。

31

Page 39: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドロボットアプリケーションワークスペースを作成します。

#!/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) 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 にファイルを作成する詳細については、「CMakeLists.txt」を参照してください。

################################################################################# Set minimum required version of cmake, project name and compile options################################################################################

32

Page 40: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドロボットアプリケーションワークスペースを作成します。

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()

################################################################################# 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">

33

Page 41: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドシミュレーションアプリケーションワークスペースの作成

<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>

10. setup.py ファイルを作成し、robot_app ディレクトリに保存します。これにより、ROS が Pythonノードを見つけられるようになります。ROS Python makefiles の詳細については、「ROS PythonMakefile を書く」を参照してください。

## ! 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"/>

34

Page 42: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドシミュレーションアプリケーションワークスペースの作成

<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 ロボットがシミュレーションに生成されます。

<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">

35

Page 43: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドシミュレーションアプリケーションワークスペースの作成

<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> <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 ディレクトリに保存します。これにはシミュレーションアプリケーションの依存関係がすべて含まれています。

36

Page 44: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドロボットおよびシミュレーションア

プリケーションバンドルをビルドする

<?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>

ロボットおよびシミュレーションアプリケーションバンドルをビルドするAWS RoboMaker は、ロボットアプリケーションの構築および colcon によるバンドルで動作します。詳細については、「colcon によるロボットアプリケーションのビルドとバンドル (p. 38)」を参照してください。

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

37

Page 45: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドcolcon によるロボットアプリケーションのビルドとバンドル

次を使用して AWS RoboMaker でシミュレーションアプリケーションを起動します。

roslaunch simulation_app example.launch

colcon によるロボットアプリケーションのビルドとバンドル

AWS RoboMaker は、colcon でビルドおよびバンドルされたロボットアプリケーションを使用します。colcon は Open Source Robotics Foundation (OSRF) でビルドされたコマンドラインツールです。ROS および ROS2 アプリケーションのビルドとバンドルを自動化します。catkin_make の当座の代用となります。

colcon の詳細については、「colcon」を参照してください。colcon によるビルド中に問題が発生した場合は、「colcon-Ros」を参照してください。colcon によるバンドルの問題については、「colcon-bundle」を参照してください。

トピック• colcon のインストール (p. 38)• colcon によるビルドとバンドル (p. 38)

colcon のインストール次のコマンドを使用して colcon をインストールします。

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 によるビルドとバンドル以下のコマンドを使用してロボットアプリケーションをビルドしてバンドルします。

cd robotic-application-workspacecolcon buildcolcon bundle

シミュレーションジョブの作成このセクションでは、コマンドラインからシミュレーションジョブを作成する方法を説明します。

トピック

38

Page 46: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド前提条件

• 前提条件 (p. 39)• ソースおよび出力の Amazon S3 バケットの作成 (p. 39)• ロボットアプリケーションを作成する (p. 39)• シミュレーションアプリケーションの作成 (p. 40)• シミュレーションジョブロールの作成 (p. 40)• シミュレーションジョブの作成 (p. 42)

前提条件コマンドラインから AWS RoboMaker シミュレーションジョブを作成するには、以下が必要です。

• AWS コマンドラインインターフェイス (AWS CLI)。AWS CLI のインストールについての詳細は、の「AWS CLI のインストール」を参照してください。

• ロボットアプリケーションとシミュレーションアプリケーション。これらは colcon およびターゲットの X86_64 アーキテクチャとバンドルする必要があります。シンプルなロボットアプリケーションとシミュレーションアプリケーションをスクラッチから作成するには、「新しいロボットアプリケーションの作成 (p. 30)」を参照してください。

必要に応じて、Gazebo、rqt、rviz やターミナルなどのシミュレーションツールに簡単にアクセスするため、AWS RoboMaker コンソールへのアクセスが必要となります。これらのツールは、[シミュレーションジョブの詳細] ページから利用できます。

ソースおよび出力の 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 アーキテクチャに構築される必要があります。

39

Page 47: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドシミュレーションアプリケーションの作成

$ 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

この呼び出しは、新しく作成したロボットアプリケーションに関する情報を返します。シミュレーションジョブを作成するときに 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) を使用します。

シミュレーションジョブロールの作成シミュレーションジョブを作成するとき、AWS RoboMaker が Amazon S3 バケットや AmazonCloudWatch Logs などのリソースにアクセスするために使用できる IAM ロールを指定する必要があります。また、このロールは、Amazon Lex や Amazon Rekognition など、ロボットアプリケーションが消費するリソースにアクセスするためにも使用されます。

ロールをすでに作成している場合は、「シミュレーションジョブの作成 (p. 42)」に進むことができます。

シミュレーションジョブロールを作成するには

1. AWS マネジメントコンソール にサインインし、AWS Identity and Access Management コンソール(console.aws.amazon.com/iam) を開きます。

2. アクセスポリシーを作成します。左側で、[ポリシー]、[ポリシーの作成] の順に選択します[JSON] を選択し、以下のコードを貼り付けます。

40

Page 48: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドシミュレーションジョブロールの作成

{ "Version": "2012-10-17", "Statement": [ { "Action": "s3:ListBucket", "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" }, { "Action": [ "ec2:CreateNetworkInterfacePermission" ], "Resource": [ "arn:aws:ec2:*:account#:*" ], "Effect": "Allow" }, { "Action": [ "ec2:AssociateRouteTable", "ec2:CreateSubnet", "ec2:DeleteNetworkInterface", "ec2:DeleteSubnet", "ec2:DescribeNetworkInterfaces", "ec2:DescribeSecurityGroups", "ec2:DescribeSubnets", "ec2:DescribeVpcs" ], "Resource": "*", "Effect": "Allow" } ]

41

Page 49: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドシミュレーションジョブの作成

}

my-input-bucket および my-output-bucket を使用する入力および出力バケットの名前で置き換えます。account# を使用する AWS アカウント番号で置き換えます。

[ポリシーの確認] を選択し、[名前] に入力して [ポリシーの作成] を選択します。3. [ロール]、[ロールの作成] の順に選択します。4. [Create role: Step 1 (ロールの作成: ステップ 1)] ページで [RoboMaker] を選択します。[RoboMaker -

Simulation (RoboMaker - シミュレーション)] をユースケースとして選択したら、[Next: Permissions(次へ: アクセス権限)] を選択します。

5. [アクセス許可] ページで、先ほど作成したポリシーを選択し、[次へ: タグ] を選択します。6. [タグの追加] ページで、省略可能なタグをロールに追加し、[次へ: 確認] を選択します。7. [確認] ページで、[ロール名] に入力し、[ロールの作成] を選択します。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. 次のコマンドを使用して、シミュレーションジョブのステータスを確認します。

$ 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/ リンクから AWS RoboMaker コンソールを開き、[シミュレーションジョブ] を選択してから使用するシミュレーションを選択します。下にスクロールし、いずれかのツールを選択します。

シミュレーションツールの詳細については、「シミュレーションツール (p. 88)」を参照してください。

AWS RoboMaker クラウド拡張機能AWS RoboMaker クラウド拡張機能 は ROS パッケージのコレクションです。このパッケージを使用すると、ロボットアプリケーションとシミュレーションアプリケーションから AWS に簡単にアクセスできま

42

Page 50: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド前提条件

す。拡張機能により、いくつかのエキサイティングなシナリオが可能になります。たとえば、物理ロボットが環境の探索中に収集した動画や他のセンサーデータをキャプチャできます。ロボットの音声を指定して、音声コマンドを処理できます。顔やオブジェクトを認識できます。

利用可能なパッケージは以下のとおりです。

• Amazon CloudWatch メトリクス — ロボットからのセンサーデータ、パフォーマンスメトリクス、その他の情報をストリーミングします。時間の経過に伴うデータを表示し、データが特定のしきい値 (バッテリ低下など) に達したときにアラートを受信するようにアラームを設定します。

• Amazon CloudWatch Logs — ロボットフリートのログ記録データを一か所にストリーミングして簡単に分析できるようにします。何百ものロボットから生成されたデータを一か所で検索します。

• Amazon Kinesis ビデオストリーム — ロボットからのリアルタイム動画を AWS にストリーミングします。

• Amazon Lex — 魅力的なユーザーエクスペリエンスを提供し、リアルな会話ができるロボットを作成します。

• Amazon Polly — テキストを音声に変換します。さまざまな言語のリアルな音声を使用します。

これらの拡張機能の実際の使用例については、AWS RoboMaker サンプルアプリケーションのページ「AWS RoboMaker のサンプルアプリケーション」を参照してください。さまざまなロボットシミュレーションをすばやく簡単に起動して試すことができます。

前提条件AWS RoboMaker クラウド拡張機能 を使用するには、以下が必要です。

• AWS アカウント。AWS アカウントにサインアップするには、「ステップ 1: AWS アカウントおよび管理者を作成する (p. 9)」を参照してください。

• AWS 認証情報。認証情報を使用して AWS のサービスにアクセスします。• AWS のサービスの使用を AWS RoboMaker クラウド拡張機能 に許可するように IAM ロールのアクセス

許可を設定します。必要なアクセス許可は、各拡張機能に含まれている README ファイルに記載されています。

• Ubuntu 16.04 上の ROS Kinetic、Ubuntu 18.04 上の ROS Melodic、または Ubuntu 18.04 上の ROS 2Dashing。AWS RoboMaker 開発環境を使用する場合は、選択したディストリビューションを使用したロボット開発用に事前設定済みです。ROS 2 Dashing の詳細については、「ROS 2 Dashing (ベータ版) (p. 3)」を参照してください。

AWS RoboMaker クラウド拡張機能 のインストールAWS RoboMaker のクラウド拡張機能をインストールするには、各パッケージの README ファイルに記載されている手順に従ってください。

• Amazon Kinesis & Amazon Rekognition• Amazon Lex• Amazon Polly• Amazon CloudWatch Logs• Amazon CloudWatch メトリクス

AWS Cloud9 による開発AWS RoboMaker およびロボット開発用の AWS Cloud9 開発環境を作成できます。環境は、ROS で事前設定され、他の AWS RoboMaker 機能と統合されます。これにより、ビルド設定を管理し、シミュレー

43

Page 51: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド開発環境の作成

ションジョブを作成して、実行中のシミュレーションを Gazebo、rviz、rqt、およびターミナルで試すことができます。

AWS Cloud9 開発環境には、ウェブブラウザを通じてアクセスできます。

トピック• 開発環境の作成 (p. 44)• 開発環境の使用 (p. 44)• 環境の削除 (p. 52)

開発環境の作成このセクションでは、開発環境を作成し、この環境にブラウザからアクセスします。

Note

この手順を完了すると、AWS アカウントに料金が発生する可能性があります。これには、Amazon EC2 や AWS RoboMaker などのサービスの料金も含まれる場合があります。詳細については、「Amazon EC2 料金表」、「AWS RoboMaker 料金表」、および「クラウドサービスの料金表」を参照してください。

開発環境を作成するには

以下のステップに従ってください。

1. AWS RoboMaker コンソール (https://console.aws.amazon.com/robomaker/) にサインインします。2. 左側のナビゲーションペインで、[Development (開発)]、[IDEs (IDE)] の順に選択します。3. [Create AWS RoboMaker development environment (AWS RoboMaker 開発環境の作成)] で、環境の名

前を入力します。4. [ROS Distribution] を選択します。ロボットオペレーティングシステム (ROS) の詳細について

は、www.ros.org を参照してください。AWS RoboMaker で ROS 2 を使用する方法については、「ROS 2 Dashing (ベータ版) (p. 3)」を参照してください。

5. [Instance type (インスタンスタイプ)] で、実行するタスクの種類に必要と思われる容量の RAM およびvCPU を備えたインスタンスタイプを選択します。または、デフォルトの選択のままにします。

Note

サイズのより大きい RAM および vCPU を備えたインスタンスタイプを選択すると、AmazonEC2 の AWS アカウントに追加料金が発生する可能性があります。

6. 開発環境で Amazon VPC のリソースにアクセスする必要がある場合は、[ネットワーキング] で [VPC]とサブネットを選択します。

7. [作成] を選択して開発環境を作成します。8. [Environment details (環境の詳細)] ページで、[Open environment (環境を開く)] を選択します。開発環

境を準備するまでに少し時間がかかることがあります。

利用可能な開発環境を一覧表示するには、左のナビゲーションペインで [Development (開発)]、[Development environments (開発環境)] の順に選択します。

開発環境の使用このセクションでは、AWS Cloud9 開発環境の AWS RoboMaker 機能について詳しく説明します。

トピック• Gazebo バージョンの手動による切り替え (p. 45)• 環境設定 (p. 46)

44

Page 52: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド開発環境の使用

• ワークフローの作成 (p. 46)• メニューコマンドリファレンス (p. 50)

Gazebo バージョンの手動による切り替えこのセクションでは、AWS Cloud9 開発環境でサポートされている Gazebo のバージョンを変更する方法説明します。これは ROS Kinetic 開発環境にのみ適用されます。

Gazebo バージョンを切り替えると、開発環境全体に影響が及びます。開発環境のすべてのロボットアプリケーションとシミュレーションアプリケーションは、切り替えられた環境内で構築されてバンドルされます。

Note

シミュレーションアプリケーションは 1 つのバージョンに依存します。バージョンを変更するには、アプリケーションの依存関係を更新する必要があります。

トピック• Gazebo 7 から Gazebo 9 への切り替え (p. 45)• Gazebo 9 から Gazebo 7 への切り替え (p. 46)

Gazebo 7 から Gazebo 9 への切り替え

Gazebo 7 環境から Gazebo 9 環境へ切り替えるには

1. コマンドプロンプトを開きます。2. 以下のコードを実行して、現在のディレクトリに gazebo7to9.sh という名前のシェルスクリプトを

作成します。

$ 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 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

使用する環境では、このスクリプトを 1 回だけ作成することが必要です。

45

Page 53: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド開発環境の使用

3. コマンドラインで、作成したスクリプトを実行します。

$ gazebo7to9.sh

この環境は、Gazebo 9 を使用してアプリケーションを構築し、バンドルするように設定されます。

Gazebo 9 から Gazebo 7 への切り替えGazebo 9 環境から Gazebo 7 環境へ切り替えるには

1. コマンドプロンプトを開きます。2. 以下のコードを実行して、現在のディレクトリに gazebo9to7.sh という名前のシェルスクリプトを

作成します。

$ 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. 46)

シミュレーションソフトウェアスイート開発環境では、異なるバージョン の Gazebo を使用して構築およびバンドルを設定できます。一度に 1 つのバージョンのみアクティブにすることができます。

Note

シミュレーションアプリケーションに選択されたソフトウェアシミュレーションは、環境設定と一致する必要があります。

ワークフローの作成このセクションでは、既存のアプリケーションに AWS RoboMaker ワークフローを作成する方法を説明します。

ワークフローは、順次実行されるタスクの集合体です。タスクには、アプリケーションの構築、アプリケーションのバンドル、およびシミュレーションジョブの作成が含まれます。ワークフローおよびタスクは、AWS RoboMaker AWS Cloud9 開発環境内で作成されます。ワークフローは、[AWS RoboMaker 実行]メニューから選択して実行できます。

46

Page 54: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド開発環境の使用

ワークフローは、反復性のある開発時の反復タスク作業に便利です。このセクションでは、以下のタスクを実行するワークフローを作成します。

• colcon を使用して、ロボットアプリケーションおよびシミュレーションアプリケーションを構築します。

• colcon を使用して、ロボットアプリケーションおよびシミュレーションアプリケーションをバンドルします。

• シミュレーションジョブを作成します。

トピック• 前提条件 (p. 47)• ソースおよび出力の Amazon S3 バケットの作成 (p. 47)• シミュレーションジョブロールの作成 (p. 47)• アプリケーションビルド設定の作成 (p. 47)• アプリケーションバンドル設定の作成 (p. 48)• シミュレーション設定の作成 (p. 48)• ワークフロー設定の作成 (p. 48)

前提条件コマンドラインから AWS RoboMaker シミュレーションジョブを作成するには、以下が必要です。

• AWS RoboMaker 開発環境。開発環境の作成についての詳細は、「開発環境の作成 (p. 44)」を参照してください。

• ロボットアプリケーションとシミュレーションアプリケーション。シンプルなロボットアプリケーションとシミュレーションアプリケーションをスクラッチから作成するには、「新しいロボットアプリケーションの作成 (p. 30)」を参照してください。

必要に応じて、Gazebo、rqt、rviz やターミナルなどのシミュレーションツールに簡単にアクセスするため、AWS RoboMaker コンソールを使用することができます。これらのツールは、[シミュレーションジョブの詳細] ページから利用できます。

ソースおよび出力の Amazon S3 バケットの作成諸みゅれ―所んジョブを作成する前に、アプリケーションのソースとして使用するバケットを作成する必要があります。バケットを作成するには、「ソースおよび出力の Amazon S3 バケットの作成 (p. 39)」の手順に従います。

シミュレーションジョブロールの作成シミュレーションジョブには、ソースの Amazon S3 バケットや Amazon CloudWatch Logs などのリソースにアクセスできる IAM ロールが必要です。シミュレーションジョブのロールを作成するには、「シミュレーションジョブロールの作成 (p. 40)」の手順に従います。

アプリケーションビルド設定の作成AWS RoboMaker は colcon を使用して、ロボットアプリケーションおよびシミュレーションアプリケーションを構築します。

ロボットアプリケーションとシミュレーションアプリケーションのビルド設定を作成するには

1. 使用するロボットアプリケーションがある AWS RoboMaker 開発環境を開きます。2. AWS Cloud9 メニューで [RoboMaker Run (RoboMaker 実行)] を開き、[ビルド]、[Add or Edit

Configurations (設定の追加または編集)] の順に選択します。

47

Page 55: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド開発環境の使用

3. [RoboMaker Configuration (RoboMaker の設定)] ダイアログの [Create New Configuration (新しい設定の作成)] で、[Colcon build (Colcon ビルド)] を選択します。

4. [RoboMaker Configuration (RoboMaker の設定)] の [Colcon Build Configuration (Colcon ビルド設定)]で、ロボットアプリケーションビルド設定の名前を入力します。たとえば、MyRobot v3 build,bundle, and create simulation と指定します。

5. ロボットアプリケーションの作業ディレクトリへのパスを入力します。また、[...] を選択して作業ディレクトリを選択するためにファイルピッカーを使用することもできます。作業ディレクトリにはCMakeLists.txt が含まれています。

6. 同じステップを繰り返して、シミュレーションアプリケーションビルド設定を作成します。[作業ディレクトリ] をシミュレーションアプリケーションワークスペースに設定します。

7. ビルドを開始するには、[RoboMaker Run (RoboMaker 実行)]、[ビルド] の順に選択し、ビルド設定を選択します。IDE の下部に新しいターミナルウィンドウが開きます。ビルドの進捗状況を追跡するためにこれを使用します。

アプリケーションバンドル設定の作成AWS RoboMaker は colcon を使用して、ロボットアプリケーションおよびシミュレーションアプリケーションをバンドルします。

ロボットアプリケーションとシミュレーションアプリケーションのビルド設定を作成するには

1. 使用するロボットアプリケーションがある AWS RoboMaker 開発環境を開きます。2. AWS Cloud9 メニューで [RoboMaker Run (RoboMaker 実行)] を開き、[バンドル]、[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. 同じステップを繰り返して、シミュレーションアプリケーションバンドル設定を作成します。[作業ディレクトリ] をシミュレーションアプリケーションワークスペースに設定します。

7. バンドルプロセスを開始するには、[RoboMaker Run (RoboMaker 実行)]、[バンドル] の順に選択し、バンドル設定を選択します。IDE の下部に新しいターミナルウィンドウが開きます。バンドルの進捗状況を追跡するためにこれを使用します。バンドルする前に、アプリケーションをビルドする必要があります。

シミュレーション設定の作成

シミュレーション設定を作成するには

1. 使用するロボットアプリケーションがある AWS RoboMaker 開発環境を開きます。2. AWS Cloud9 メニューで [RoboMaker Run (RoboMaker 実行)] を開き、[Launch Simulation (起動シ

ミュレーション)]、[Add or Edit Configurations (設定の追加または編集)] の順に選択します。3. [Create New Configuration (新しい設定の作成)] で [Simulation (シミュレーション)] を選択します。4. [RoboMaker Configuration (RoboMaker の設定)] の [Simulation Configuration (シミュレーションバン

ドル設定)] で、ロボットアプリケーションバンドル設定の名前を入力します。5. [シミュレーションジョブ時間] を秒単位で入力します。たとえば、シミュレーションジョブを 1 時間

実行するには、3600 と入力します。6. [Failure behavior (失敗の動作)] で [fail (失敗)] を選択します。7. シミュレーションジョブ用に作成した [IAM ロール] を選択します。8. シミュレーションジョブ出力用にオプションの Amazon S3 バケットを選択します。

48

Page 56: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド開発環境の使用

9. [ロボットアプリケーション] にロボットアプリケーションの名前を入力します。10. [Robot app bundle path (ロボットアプリバンドルパス)] を指定します。これは、ロボットアプリケー

ションのバンドルプロセスで作成したファイルのパスです。たとえば、./MySample/robot_ws/output.tar と指定します。必要に応じて、ファイルを検出するために [..] を選択します。

11. [アーキテクチャ] で X86_64 を選択します。12. ロボットアプリケーションソースに使用する Amazon S3 バケットを選択します。バンドルは、バン

ドルファイルへのパスから作成されたプレフィックスを使用してこの場所にアップロードされます。たとえば、使用するアプリケーションバンドルが ./MySample/robot_ws/output.tar の場合、ファイル名は output.tar、プレフィックスは ./MySample/robot_ws/ となります。

13. [起動パッケージ名] および [起動ファイル] を指定します。新しいロボットアプリケーションの作成 (p. 30) からサンプルプロジェクトを使用している場合、起動パッケージの名前は robot_app、起動ファイルは rotate.launch になります。

14. [シミュレーションアプリケーション] にシミュレーションアプリケーションの名前を入力します。15. [Sim app bundle path (シミュレーションアプリケーションバンドルパス)] を指定します。これは、シ

ミュレーションアプリケーションのバンドルプロセスで作成したファイルのパスです。たとえば、./MySample/simulation_ws/output.tar と指定します。必要に応じて、ファイルを検出するために [..] を選択します。

16. シミュレーションアプリケーションソースに使用する Amazon S3 バケットを選択します。バンドルは、バンドルファイルへのパスから作成されたプレフィックスを使用してこの場所にアップロードされます。

17. [起動パッケージ名] および [起動ファイル] を指定します。新しいロボットアプリケーションの作成 (p. 30) からサンプルプロジェクトを使用している場合、起動パッケージの名前はsimulation_app、起動ファイルは example.launch になります。

18. [保存] を選択して設定を保存します。19. シミュレーションジョブを開始するには、[RoboMaker Run (RoboMaker 実行)]、[Launch Simulation

(起動シミュレーション)] の順に選択し、シミュレーション設定を選択します。

ワークフロー設定の作成

ワークフロー設定を作成するには

1. 使用するロボットアプリケーションがある AWS RoboMaker 開発環境を開きます。2. AWS Cloud9 メニューで [RoboMaker Run (RoboMaker 実行)] を開き、[ワークフロー]、[Add or Edit

Configurations (設定の追加または編集)] の順に選択します。3. [Create New Configuration (新しい設定の作成)] で [ワークフロー] を選択します。4. [RoboMaker Configuration (RoboMaker の設定)] の [Colcon Bundle Configuration (Colcon バンドル設

定)] で、ワークフロー設定の名前を入力します。5. [Action 1 (アクション 1)] で使用するロボットアプリケーションの colcon ビルドステップを選択しま

す。6. アクションの追加を選択したら、シミュレーションアプリケーションの colcon ビルドステップをアク

ションとして選択します。7. アクションの追加を選択したら、ロボットアプリケーションの colcon バンドルステップをアクション

として選択します。8. アクションの追加を選択したら、シミュレーションアプリケーションの colcon バンドルステップをア

クションとして選択します。9. アクションの追加を選択したら、アプリケーションのシミュレーションステップをアクションとして

選択します。10. 保存を選択します。11. ワークフローを実行するには、[RoboMaker Run (RoboMaker 実行)]、[ワークフロー] の順に選択し、

ワークフロー設定を選択します。ワークフローの進行状況を追跡するには、ターミナルウィンドウを使用します。

49

Page 57: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド開発環境の使用

Gazebo およびその他のシミュレーションツールを使用して実行中のシミュレーションジョブに接続し、センサーデータおよび他の情報を調べます。これらのツールは、[アプリケーション] の[RoboMaker Simulation (RoboMaker シミュレーション)] メニューにあります。

メニューコマンドリファレンス以下の表は、AWS Cloud9 開発環境における AWS RoboMaker 用のデフォルトのメニューバーコマンドの一覧です。メニューバーが表示されていない場合は、開発環境の上端にある細いバーを選択して表示します。

トピック• AWS RoboMaker 実行 (p. 50)• AWS RoboMaker シミュレーション (p. 50)• AWS RoboMaker リソース (p. 52)

AWS RoboMaker 実行

コマンド 説明

Build 選択したアプリケーションをビルドします。または、ビルド設定を追加/編集します。

Bundle 選択したアプリケーションをバンドルします。または、バンドル設定を追加/編集します。

Launch simulation 選択したシミュレーションを開始します。

Workflow 選択したワークフローを実行します。または、ワークフロー設定を追加/編集します。

Add/Edit Configurations ビルド、バンドル、シミュレーション、ワークフロー設定を追加または編集します。

AWS RoboMaker シミュレーション

コマンド 説明

Connect 実行中のシミュレーションジョブに接続します。

50

Page 58: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド開発環境の使用

コマンド 説明

Stop 接続した実行中のシミュレーションジョブを停止します。

Restart 接続したシミュレーションジョブを再起動します。現在のワークフローにシミュレーションステップが含まれている場合にのみ使用できます。

Restart With NewBundles

新しいバンドルでシミュレーションを再起動します。

Restart With Workflow 選択したワークフローでシミュレーションを再起動します。

Applications, Gazebo Gazebo を起動します。これは複雑な環境でロボットをシミュレートするツールです。

Applications, rviz rviz (ROS ビジュアライザ) を起動します。これは ROS のセンサーデータと状態情報を 3D で視覚化するツールです。

Applications, rqt rqt を起動します。これは ROS GUI 開発用の Qt ベースのフレームワークおよびプラグインです。

Applications, Terminal シミュレーションホストに接続されているターミナルを起動します。

View Simulation JobDetails

RoboMaker コンソールの新しいページにシミュレーションジョブの詳細を表示します。

Switch simulation 別の実行中のシミュレーションに接続します。

Disconnect シミュレーションから切断します。

51

Page 59: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド環境の削除

AWS RoboMaker リソース

コマンド 説明

Download Samples 選択したサンプルアプリケーションをダウンロードします。

View Extensions 選択したクラウド拡張機能をダウンロードします。

環境の削除AWS Cloud9 開発環境が不要になった場合、AWS アカウントへの請求を停止するには、環境を削除する必要があります。

環境を削除するには

以下のステップに従ってください。

1. AWS RoboMaker コンソール (https://console.aws.amazon.com/robomaker/) にサインインします。2. 左側のナビゲーションペインで、[Development (開発)]、[Development environments (開発環境)] の順に

選択します。3. 削除する環境を選択して [Edit (編集)] を選択します。4. AWS Cloud9 の [Environment details (環境の詳細)] ページで、[Delete (削除)] を選択します。

「Delete」と入力し、[Delete (削除)] を選択して環境を完全に削除します。

52

Page 60: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドロボットアプリケーションの作成

ロボットアプリケーションの使用AWS RoboMaker ロボットアプリケーションには、ロボットアプリケーションバンドルを格納するAmazon S3 の場所が 1 つ以上含まれています。Amazon S3 リソースには、ロボットアプリケーションで使用される ROS ディストリビューションが含まれいます。

ロボットアプリケーションはシミュレーションアプリケーションとペアリングできます。これはシミュレーションジョブと呼ばれます。アプリケーションは、物理ロボットにデプロイすることもできます。

トピック• ロボットアプリケーションの作成 (p. 53)• アプリケーションバージョンの作成 (p. 54)• ロボットアプリケーションの表示 (p. 55)• ロボットアプリケーションの更新 (p. 55)• ロボットアプリケーションの削除 (p. 56)• ロボットアプリケーションバージョンの削除 (p. 56)

ロボットアプリケーションの作成ロボットアプリケーションを作成してシミュレーションジョブで使用します。ロボットハードウェアにデプロイする準備ができたら、フリートに追加してデプロイすることができます。

ロボットアプリケーションを作成するには

以下のいずれかのタブのステップに従ってください。

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 (ロボットアプリケーションの作成)] ページで、ロボットアプリケーション

の名前を入力します。ロボットを識別しやすい名前を選択します。5. ロボットアプリケーションで使用する [ROS ディストリビューション] を選択します。ロボットオ

ペレーティングシステム (ROS) の詳細については、www.ros.org を参照してください。6. バンドルされたロボットアプリケーションファイルへの Amazon S3 パスを指定します。このロ

ボットアプリケーションをシミュレーションでのみ使用する場合は、X86_64 アーキテクチャ向けにビルドされたバンドルを指定します。このロボットアプリケーションをフリートのデプロイで使用する場合は、フリート内のロボットのアーキテクチャーを表す 1 つ以上のバンドルを指定します。

必要に応じて、[Create new S3 folder (新しい S3 フォルダの作成)] を選択し、Amazon SimpleStorage Service AWS マネジメントコンソール に移動してバケットを作成および管理します。

53

Page 61: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドアプリケーションバージョンの作成

7. 必要に応じて、[タグ] で、シミュレーションアプリケーション用に 1 つ以上のタグを指定します。タグとは、AWS リソースを識別および整理するためのメタデータとして使用される単語やフレーズのことです。の各タグは、キーと値から構成されます。シミュレーションアプリケーションのタグは、[シミュレーションアプリケーションの詳細] ページで管理できます。

タグ付けの詳細については、AWS RoboMaker リソースにタグを付ける (p. 134) を参照してください。

8. [Create] を選択します。

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. 28)」を参照してください。

ロボットアプリケーションバージョンを作成するには

以下のいずれかのタブのステップに従ってください。

Using the console

1. AWS RoboMaker コンソール (https://console.aws.amazon.com/robomaker/) にサインインします。

2. 左側のナビゲーションペインで、[Development (開発)]、[Robot applications (ロボットアプリケーション)] の順に選択します。

3. ロボットアプリケーションの名前を選択します。4. [Robot applications details (ロボットアプリケーションの詳細)] ページで、[Create new version (新

しいバージョンの作成)]、[作成] の順に選択します。

Using the AWS CLI

Example

別のタブの、コンソールを使用した手順と同じ処理を AWS CLI コマンドで実行する例は次のとおりです。

54

Page 62: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドロボットアプリケーションの表示

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

ロボットアプリケーションの表示ロボットアプリケーションの詳細 (Amazon S3 の場所、バージョン、サポートされているアーキテクチャーなど) を表示します。

ロボットアプリケーションの詳細を表示するには

以下のいずれかのタブのステップに従ってください。

Using the console

1. AWS RoboMaker コンソール (https://console.aws.amazon.com/robomaker/) にサインインします。

2. 左側のナビゲーションペインで、[Development (開発)]、[Robot applications (ロボットアプリケーション)] の順に選択します。

3. ロボットアプリケーションの名前を選択します。

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. ソースは追加または削除できますが、少なくとも 1 つのソースロボットアプリケーションファイル

が必要です。

55

Page 63: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドロボットアプリケーションの削除

6. [更新] を選択して、ロボットアプリケーションを更新します。

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 ロボットアプリケーションとそのすべてのバージョンが不要になったら、削除できます。

ロボットアプリケーションを削除するには

以下のいずれかのタブのステップに従ってください。

Using the console

1. AWS RoboMaker コンソール (https://console.aws.amazon.com/robomaker/) にサインインします。

2. 左側のナビゲーションペインで、[Development (開発)]、[Robot applications (ロボットアプリケーション)] の順に選択します。

3. ロボットアプリケーションの名前を選択し、ロボットの作成日時や最終更新日などの詳細を表示します。

4. ロボットアプリケーションバージョンの詳細ページで、[削除] を選択し、さらに [削除] を選択して確定します。

Using the AWS CLI

Example

別のタブの、コンソールを使用した手順と同じ処理を AWS CLI コマンドで実行する例は次のとおりです。

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

ロボットアプリケーションバージョンの削除ロボットアプリケーションバージョンが不要になったら削除できます。

ロボットアプリケーションバージョンを削除するには

56

Page 64: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドロボットアプリケーションバージョンの削除

以下のいずれかのタブのステップに従ってください。

Using the console

1. AWS RoboMaker コンソール (https://console.aws.amazon.com/robomaker/) にサインインします。

2. 左側のナビゲーションペインで、[Development (開発)]、[Robot applications (ロボットアプリケーション)] の順に選択します。

3. ロボットアプリケーションの名前を選択してそのバージョンを表示します。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

57

Page 65: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドシミュレーションアプリケーションの作成

シミュレーションアプリケーションの使用

AWS RoboMaker シミュレーションアプリケーションには、その依存関係に関する情報が含まれています。これには、X86_64 アーキテクチャ用のシミュレーションアプリケーションバンドルの AmazonSimple Storage Service (Amazon S3) 場所が含まれています。また、ロボットオペレーティングシステム(ROS) ディストリビューションの名前とバージョン、および使用されるレンダリングエンジンも含まれています。

シミュレーションをシミュレーションジョブの AWS RoboMaker ロボットアプリケーションと結合してロボットを操作します。Gazebo などのツールを操作し、シミュレーションを開発してデータをテストします。

トピック• シミュレーションアプリケーションの作成 (p. 58)• シミュレーションアプリケーションバージョンの作成 (p. 59)• シミュレーションアプリケーションの表示 (p. 60)• シミュレーションアプリケーションの更新 (p. 60)• シミュレーションアプリケーションの削除 (p. 61)• シミュレーションアプリケーションバージョンの削除 (p. 62)

シミュレーションアプリケーションの作成シミュレーションジョブで使用するシミュレーションアプリケーションを作成します。

シミュレーションアプリケーションを作成するには

以下のいずれかのタブのステップに従ってください。

Note

Amazon S3 オブジェクトは AWS RoboMaker と同じリージョンにあることが必要です。

Using the console

1. AWS RoboMaker コンソール (https://console.aws.amazon.com/robomaker/) にサインインします。

2. 左側のナビゲーションペインで、[Development (開発)]、[simulation applications (シミュレーションアプリケーション)] の順に選択します。

3. アプリケーションの名前を入力します。シミュレーションを識別しやすい名前を選択します。たとえば、Outdoor v2 と指定します。

4. ロボットアプリケーションで使用する [ROS ディストリビューション] を選択します。ROS の詳細については、 www.ros.org を参照してください。

5. シミュレーションアプリケーションで使用する [シミュレーションソフトウェアスイート] を選択します。ROS の詳細については、 www.ros.org を参照してください。

6. シミュレーションアプリケーションで使用する [シミュレーションレンダリングエンジン] を選択します。

58

Page 66: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドシミュレーションアプリケーションバージョンの作成

7. [X86_64] アーキテクチャ向けにビルドしたバンドル済みシミュレーションアプリケーションファイルへの Amazon S3 パスを指定します。

(オプション)[Create new S3 folder (新しい S3 フォルダの作成)] を選択して、Amazon SimpleStorage Service コンソールに移動します。そこで、バケットを作成および管理できます。

8. (オプション)[タグ] で、シミュレーションアプリケーション用にタグを 1 つ以上指定します。タグとは、AWS リソースを識別するためのメタデータとして機能する単語やフレーズのことです。の各タグは、キーと値から構成されます。シミュレーションのタグは、[シミュレーションアプリケーションの詳細] ページで管理できます。

タグ付けの詳細については、AWS RoboMaker リソースにタグを付ける (p. 134) を参照してください。

9. [Create] を選択します。

Using the AWS CLI

Example

別のタブの、コンソールを使用した「シミュレーションアプリケーションの作成」と同じ処理を AWSCLI コマンドで実行する例は次のとおりです。

$ 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 は、バージョンのファイルの Amazon S3 パスと ETag を記憶します。そのバージョンの Amazon S3 パスでファイルを変更すると、AWS RoboMaker はそのバージョンを使用できなくなります。AWS RoboMaker はバージョンのコピーを保持しません。

シミュレーションジョブを作成する場合は、任意のバージョンのロボットシミュレーションアプリケーションを使用できます。アプリケーションのバージョニングの詳細については、「アプリケーションのバージョニング (p. 28)」を参照してください。

シミュレーションアプリケーションバージョンを作成するには

以下のいずれかのタブのステップに従ってください。

Using the console

1. AWS RoboMaker コンソール (https://console.aws.amazon.com/robomaker/) にサインインします。2. 左側のナビゲーションペインで、[Development (開発)]、[Simulation applications (シミュレーショ

ンアプリケーション)] の順に選択します。3. シミュレーションアプリケーションの [名前] を選択します。

59

Page 67: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドシミュレーションアプリケーションの表示

4. [Simulation applications details (シミュレーションアプリケーションの詳細)] ページで、[Createnew version (新しいバージョンの作成)]、[作成] の順に選択します。

Using the AWS CLI

Example

別のタブの、コンソールを使用した「ロボットアプリケーションの作成」と同じ処理を AWS CLI コマンドで実行する例は次のとおりです。

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

シミュレーションアプリケーションの表示シミュレーションアプリケーションの詳細を表示します。

シミュレーションアプリケーションの詳細を表示するには

以下のいずれかのタブのステップに従ってください。

Using the console

1. AWS RoboMaker コンソール (https://console.aws.amazon.com/robomaker/) にサインインします。

2. 左側のナビゲーションペインで、[Development (開発)]、[Simulation applications (シミュレーションアプリケーション)] の順に選択します。

3. シミュレーションアプリケーションの名前を選択し、作成日時や最終更新日などの詳細を表示します。

Using the AWS CLI

以下のコマンドを使用してシミュレーションアプリケーションを記述できます。

• API/SDK: DescribeSimulationApplication• AWS CLI: describe-simulation-application

Example

別のタブの、コンソールを使用した「シミュレーションアプリケーションの記述」と同じ処理を AWSCLI コマンドで実行する例は次のとおりです。

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

シミュレーションアプリケーションの更新シミュレーションアプリケーションを更新します。

60

Page 68: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドシミュレーションアプリケーションの削除

シミュレーションアプリケーションを更新するには

以下のいずれかのタブのステップに従ってください。

Using the console

1. AWS RoboMaker コンソール (https://console.aws.amazon.com/robomaker/) にサインインします。

2. 左側のナビゲーションペインで、[Development (開発)]、[Simulation applications (シミュレーションアプリケーション)] の順に選択します。

3. 更新するシミュレーションアプリケーションの横にあるチェックボックスをオンにします。4. [Actions (アクション)]、[Update (更新)] の順に選択します。5. ソースは追加または削除できますが、少なくとも 1 つのソースシミュレーションアプリケーショ

ンファイルが必要です。6. [更新] を選択して、シミュレーションアプリケーションを更新します。

Using the AWS CLI

以下のコマンドを使用してシミュレーションアプリケーションを更新できます。

• API/SDK: UpdateSimulationApplication• AWS CLI: update-simulation-application

Example

別のタブの、コンソールを使用した「シミュレーションアプリケーションの更新」と同じ処理を AWSCLI コマンドで実行する例は次のとおりです。

$ 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. シミュレーションアプリケーションの [名前] を選択します。これには、作成日時や最終更新日時な

どの詳細が表示されます。

61

Page 69: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドシミュレーションアプリケーションバージョンの削除

4. シミュレーションアプリケーションの詳細ページで、[削除]、[削除] の順に選択し、削除を確定します。

Using the AWS CLI

以下のコマンドを使用してシミュレーションアプリケーションを削除できます。

• API/SDK: DeleteSimulationApplication• AWS CLI: delete-simulation-application

Example

別のタブの、コンソールを使用した「シミュレーションアプリケーションの削除」と同じ処理を AWSCLI コマンドで実行する例は次のとおりです。

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

シミュレーションアプリケーションバージョンの削除

不要になったシミュレーションアプリケーションバージョンは削除できます。

シミュレーションアプリケーションバージョンを削除するには

以下のいずれかのタブのステップに従ってください。

Using the console

1. AWS RoboMaker コンソール (https://console.aws.amazon.com/robomaker/) にサインインします。2. 左側のナビゲーションペインで、[Development (開発)]、[Simulation applications (シミュレーショ

ンアプリケーション)] の順に選択します。3. シミュレーションアプリケーションの名前を選択してそのバージョンを表示します。4. シミュレーションの詳細ページで、[バージョン] を選択して詳細を表示します。5. その詳細ページで、[削除] を選択し、[削除] を選択して確定します。

Using the AWS CLI

以下のコマンドを使用してシミュレーションアプリケーションバージョンを削除できます。

• API/SDK: DeleteSimulationApplicationVersion• AWS CLI: delete-simulation-application-version

Example

別のタブの、コンソールを使用した「シミュレーションアプリケーションの削除」と同じ処理を AWSCLI コマンドで実行する例は次のとおりです。

$ aws robomaker delete-simulation-application-version \

62

Page 70: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドシミュレーションアプリケーションバージョンの削除

--application my-robot-application-arn --version 1.5

63

Page 71: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドVPC 設定

シミュレーションジョブの実行AWS RoboMaker シミュレーションジョブは、クラウド内で実行されるシミュレーションアプリケーションとロボットアプリケーションのペアリングです。実行中のシミュレーションジョブを、Gazebo、rviz、rqt、ターミナルなどのシミュレーションツールを使用して操作し、センサーデータを視覚化したり、ロボットのコンポーネントを制御したりできます。

トピック• Amazon VPC 内のリソースにアクセスするよう AWS RoboMaker シミュレーションジョブを設定す

る (p. 64)• シミュレーションジョブへの接続 (p. 65)• シミュレーションジョブのデータへのアクセス (p. 68)• ルートアクセスとシステム機能 (p. 69)• AWS RoboMaker によって作成された環境変数 (p. 70)• シミュレーションジョブのタグの管理 (p. 71)• 再生のための ROS bag の使用 (p. 72)• シミュレーションジョブの管理 (p. 77)• シミュレーションジョブバッチの管理 (p. 85)• シミュレーションツール (p. 88)

Amazon VPC 内のリソースにアクセスするようAWS RoboMaker シミュレーションジョブを設定する

Amazon Virtual Private Cloud (Amazon VPC) でリソースを作成すると、パブリックインターネット経由で読み取ることはできません。リソースの例には、Amazon Redshift データウェアハウスや AmazonElastiCache クラスターがあります。また、Amazon Elastic Compute Cloud インスタンス上のサービスである場合もあります。デフォルトでは、Amazon VPC 内のリソースは AWS RoboMaker シミュレーションジョブにアクセスできません。

デフォルトでは、AWS RoboMaker は Amazon VPC でシミュレーションジョブを実行します。ただし、ジョブが Amazon VPC 内のリソースにアクセスできるようにするには、Amazon VPC サブネット ID とセキュリティグループ ID を含む VPC 固有のデータを指定する必要があります。AWS RoboMaker では、このデータを使用して、Elastic Network Interface (ENI) を設定します。ENI は、ジョブをプライベートAmazon VPC 内の他のリソースに安全に接続するのに役立ちます。

AWS RoboMaker は、専有テナント VPC 内のリソースに接続しません。詳細については、専用 VPCを参照してください

Amazon VPC アクセス用に AWS RoboMaker シミュレーションジョブを設定するジョブを作成するときに VpcConfig パラメータを使用して、Amazon VPC データを AWS RoboMaker シミュレーションジョブに追加します(「CreateSimulationJob (p. 188)」を参照)。AWS CLI の例を示します。

64

Page 72: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドシミュレーションジョブ用のインターネットアクセス

• 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"}' \--vpc-config assignPublicIp=true,subnets=comma-separated-vpc-subnet-ids,securityGroups=comma-separated-security-group-ids

シミュレーションジョブを VPC 内で実行するよう設定すると、ENI ペナルティが発生します。ネットワークリソースに接続する際にアドレス解決が遅延する場合があります。

シミュレーションジョブ用のインターネットアクセスAWS RoboMaker では、指定された VPC データを使用して ENI を設定します。ENI により、ジョブがVPC リソースにアクセスできるようになります。各 ENI には、指定されたサブネットの範囲からプライベート IP アドレスが割り当てられます。デフォルトでは、ENI にパブリック IP アドレスは割り当てられません。

ジョブでインターネットアクセスが必要な場合(VPC エンドポイントを持たない AWS サービスを検索する場合など)、VPC 内に NAT を設定できます。Amazon VPC NAT ゲートウェイを使用できます。RoboMaker にパブリック IP を割り当てるようリクエストできます。詳細については、Amazon VPCユーザーガイドの「NAT ゲートウェイ」を参照してください。VPC にアタッチされたインターネットゲートウェイを使用できません。これには、ENI にパブリック IP アドレスが必要です。

パブリックサブネットの使用時にインターネットアクセスを設定するには、assignPublicIp=true を設定して ENI にパブリック IP を割り当てます。

シミュレーションジョブへの接続シミュレーションジョブでアプリケーションを操作する場合は、ポートフォワーディングで接続します。ポートフォワーディングを設定すると、トラフィックはシミュレーションジョブポートからアプリケーションポートに転送されます。ポートフォワーディングにより、ROS Bridge などのツールと簡単に接続できます。これは、デバッグまたはカスタムツールを実行してアプリケーションを操作する場合に便利です。

トピック• ポートフォワーディングを有効にする前に (p. 65)• ポートフォワーディングの有効化 (p. 66)• ポートフォワーディングの例 (p. 66)

ポートフォワーディングを有効にする前にインスタンスへのアクセスを必要とするユーザー ローカルコンピュータのパブリック IPv4 アドレスなど、信頼する単一のホストまたは特定のネットワーク。Amazon EC2 コンソールのセキュリティグループ

65

Page 73: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドポートフォワーディングの有効化

エディタは、ローカルコンピュータのパブリック IPv4 アドレスを自動的に検出できます。また、インターネットブラウザで「私の IP アドレスは何ですか?」と検索するか、Check IP (使用中の IP アドレス確認)サービスを使用することもできます。ISP 経由で、またはファイアウォールの内側から静的な IP アドレスなしで接続している場合は、クライアントマシンで使用されている IP アドレスの範囲を見つける必要があります。

Warning

シミュレーションジョブに安全なリモート接続を設定することは、お客様の責任となります。開放するポートに対して、強力な認証方法と転送中の暗号化を実装することをお勧めします。

セキュリティグループの詳細については、「VPC のセキュリティグループ」を参照してください。

ポートフォワーディングの有効化ポートフォワーディングを有効にするには:

1. ロボットアプリケーションとシミュレーションアプリケーションに必要なポートを決定します。アプリケーションのポートは、アプリケーションポートと呼ばれます。

たとえば、シミュレーションアプリケーションのポート 8085 で ROS Bridge を使用し、ロボットアプリケーションで HTTP 用のポート 8080 を使用できます。

2. リモート接続ポイントとして使用するシミュレーションジョブインスタンスのポートを特定します。シミュレーションジョブのポートは、ジョブポートと呼ばれます。

たとえば、ROS Bridge にはポート 8085、HTTP にはポート 80 を使用できます。ジョブポートとアプリケーションポートは異なる場合があります。

3. パブリック IP で有効にするポートマッピングを決定します。パブリック IP アドレスは、インターネットから到達可能な IPv4 アドレスです。アプリケーションとインターネット間の通信には、パブリック アドレスを使用できます。

AWS での Linux 踏み台ホストまたは AWS VPN などのソリューションを使用すると、パブリックアドレスを有効にすることなくシミュレーションジョブに接続できます。

4. シミュレーションジョブを作成 (p. 78)し、アプリケーションポートマッピングを提供します。たとえば、ジョブポート 8085 からアプリケーションポート 8085 など、ROS Bridge のシミュレーションアプリケーションマッピングを提供できます。ジョブポート 8080 からアプリケーションポート 80 など、HTTP 用のロボットアプリケーションマッピングを提供することもできます。

5. シミュレーションジョブポートでトラフィックを有効にするように、1 つ以上の VPC セキュリティグループを設定します。インバウンドトラフィックまたはアウトバウンドトラフィックを設定するルールを作成します。

たとえば、ポート 80 で HTTP を使用している場合は、ポート 80 でインバウンドトラフィックとアウトバウンドトラフィックを許可するルールを作成できます。1 つの IP アドレス、アドレスの範囲へのアクセスを制限したり、他の条件を使用することもできます。

セキュリティグループでの操作の詳細については、「Working with Security Groups (セキュリティグループの操作)」を参照してください。

ポートフォワーディングの例さまざまなツールを使用して、シミュレーションジョブにリモートで接続できます。このセクションでは、ROS Bridge と HTTP を使用して接続する方法を示します。

トピック• ROS ブリッジを使用したポートフォワーディング (p. 67)

66

Page 74: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドポートフォワーディングの例

• HTTP サーバーを使用したポートフォワーディング (p. 67)

ROS ブリッジを使用したポートフォワーディングROS Bridge を使用して ROS 以外のプログラムから ROS 機能にアクセスできます。ROS Bridge は JSONAPI を提供します。JSON API をサポートするツールやアプリケーションは、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 を有効にします。デフォルトではポート 8000 を使用します。

<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 サーバーを使用したポートフォワーディングノードディレクトリの ROS Python ノードとして新しい Python ファイルに次のコードをコピーします。コードは、ウェブサーバーをホストする webserver という名前のノードを作成します。

ROS ノードの詳細については、「ROSのノードを理解する」を参照してください。

1. rospy (package.xml ファイルの ROS 用の Python クライアントライブラリ) への依存関係を追加します。

<package> ... <exec_depend>rospy</exec_depend></package>

2. 起動ファイルを更新して ROS Bridge を有効にします。デフォルトでポート 8000 が使用されます。

<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 という名前の新しいシェルスクリプトにコピーします。

#!/usr/bin/env pythonset -ex

67

Page 75: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドシミュレーションジョブのデータへのアクセス

python3 -m webserver.node $1

4. 次のコードを新しい Python ファイルにコピーします。コードは、シンプルなウェブサーバーを起動する webserver という名前のノードを作成します。

#!/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 時間を要した場合、係数は 0.5 です。シミュレーションが複雑になるほど、実時間係数が低くなります。

• Gazebo ログデータ (モデル、リンク、ジョイントの状態など)。シミュレーションジョブの作成時にAmazon Simple Storage Service バケットを指定した場合、Gazebo ログデータは gazebo-logs フォルダに書き込まれます。

• タイムスタンプ付きの ROS メッセージが含まれている ROS bag ファイル。シミュレーションジョブの作成時に Amazon Simple Storage Service バケットを指定した場合、ROS bag ファイルは ros-bagフォルダに書き込まれます。

標準出力と標準エラー情報は、シミュレーションジョブの実行中に Amazon CloudWatch に書き込まれます。Gazebo ログおよび ROS bag ファイルは、シミュレーションジョブの完了後にすぐ使用できます。

ログ、メトリクス、および省略可能な出力 Amazon S3 バケットにアクセスするには

1. AWS RoboMaker コンソールで、左側の [Simulation jobs (シミュレーションジョブ)] を選択し、シミュレーションジョブを選択します。

68

Page 76: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドルートアクセスとシステム機能

2. [Simulation details (シミュレーションの詳細)] ページで、[Configuration (設定)] タブを選択します。3. ROS bag、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] を選択します。

CloudWatch Logs、メトリクス、およびシミュレーション出力 Amazon S3 バケットには、AWSRoboMaker コンソールの [Simulation job details (シミュレーションジョブの詳細)] ページからアクセスします。

ルートアクセスとシステム機能AWS RoboMaker は、シミュレーションジョブで実行されているアプリケーションへの制限されたルート(sudo) アクセスを提供します。以下は、ブロックされる重要な syscall の一覧です (ただし、すべてではありません)。

• 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• mbind• mount• move_pages• name_to_handle_at• nfsservctl

69

Page 77: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドAWS RoboMaker によって作成された環境変数

• open_by_handle_at• perf_event_open• personality• pivot_root• process_vm_readv• process_vm_writev• ptrace• query_module• quotactl• reboot• 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 でオブジェクトを管理できます。

70

Page 78: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドシミュレーションジョブのタグの管理

シミュレーションジョブのタグの管理シミュレーションジョブの管理に役立つように、オプションで独自のメタデータを割り当てることができます。たとえば、シミュレートされた地形のタイプ、テスト結果、またはロボットハードウェア構成でシミュレーションジョブを分類できます。これにより、シミュレーションジョブの結果を整理して追跡できます。

このセクションには、ROS コマンドラインツールとコードの使用に関する情報が含まれています。AWSRoboMaker API を使用したタグの管理の詳細については、「TagResource」を参照してください。オブジェクトのタグ付けの詳細については、「AWS RoboMaker リソースにタグを付ける (p. 134)」を参照してください。

シミュレーションジョブのタグ付け、タグ解除、タグの一覧表示を行うアクセス許可が必要です。詳細については、「ROS アプリケーションまたは ROS コマンドラインからタグを使用するために必要なアクセス許可 (p. 110)」を参照してください。

Note

このトピックは、ROS Kinetic および ROS Melodic に適用されます。ROS 2 Dashing の詳細については、「ROS 2 Dashing (ベータ版) (p. 3)」を参照してください。

ROS コマンドラインツールを使用したタグの使用ROS コマンドラインツール rosservice を使用して、シミュレーションジョブのタグを追加、一覧表示、削除できます。次の例では、「status」と「name」というタグを追加し、タグを一覧表示して、両方のタグを削除します。

次の例では、現在のシミュレーションジョブに「status」と「pass」というタグを追加します。Note

TagResource、UntagResource、ListTagsForResource を呼び出すためのアクセス許可が必要です。アクセス許可の詳細については、「AWS RoboMaker に対する認証とアクセスコントロール (p. 105)」を参照してください。

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"

次の例では、現在のシミュレーションジョブから「status」と「pass」というタグを削除します。

robomaker@9cc6d11dfa46:~$rosservice call /robomaker/job/remove_tags "[status, name]"success: Truemessage: ''

71

Page 79: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドシミュレーションアプリケーショ

ンでコードからタグを使用する

シミュレーションアプリケーションでコードからタグを使用する次の例では、シミュレーションアプリケーションでタグを管理するために使用できる Python 関数を示します。

#!/usr/bin/env python

# 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 bag の使用ROS bag は、ROS トピックのタイムスタンプ付きシリアル化されたメッセージデータを含むファイルです。AWS RoboMaker は ROS bag のメッセージを、シミュレーションジョブで実行されている ROS アプリケーションに再生できます。AWS RoboMaker は rosbag を使用してメッセージを再生します。メッセージは元のタイムスタンプに基づいて再生され、元のペイロードを含んでいます。ROS bag からのメッセージは、現実世界や仮想シミュレーションからの入力やその他の観測値を置き換えます。

ROS bag は rosbag record を使用して記録されます。ROS bag は、シミュレーション用に設計されたROS アプリケーションから作成できます。また、現実世界で動作するロボットによって作成することもできます。ROS bag は、新しいロボットアプリケーションのテスト、既存アプリケーションのトラブルシューティング、新機能の開発に使用されます。

データソースで指定された ROS bag は、シミュレーション環境の /opt/robomaker/datasources/ディレクトリにコピーされます。

トピック• 起動ファイル設定の例 (p. 73)• 再生終了時の失敗したシミュレーションジョブの回避 (p. 75)• カスタムステータスとプロパティ値のタグの使用 (p. 76)• シミュレーションジョブの早期キャンセル (p. 76)

72

Page 80: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド起動ファイル設定の例

起動ファイル設定の例ROS bag 再生を使用するシミュレーションジョブには、少なくとも 1 つの ROS bag データソースが必要です。シミュレーションアプリケーションには、ROS bag データソースを再生するための起動ファイルノードも設定されている必要があります。このセクションでは、起動設定の例を紹介します。

以下の例では ROS bag ファイルを再生するノードを使用します。BAG ファイルは引数で指定されます。ROS bag ファイルへのパスには、データソースのマウントパスがプレフィックスとして付けられます。たとえば、次のようになります。

args="/opt/robomaker/datasources/mybaggroup/myS3prefix/log_0.bag"/>

各パラメーターの意味は次のとおりです。

• myS3prefix/log_0.bag は bag ファイルへの完全な Amazon S3 キーパスです• mybaggroup は bag グループの名前です• /opt/robomaker/datasources/ はログファイルがマウントされているパスです。

単一の ROS bag ファイルを再生する次の例では、ROS bag ファイル log_0.bag 内のメッセージが同期された時間順に再生されます。bagファイルは ROS bag グループ mybaggroup の一部です。ROS bag ファイル自体は、mybaggroup ではなく myS3prefix にあります。

<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 bag ファイルを再生する次の例では、ROS bag ファイル log_0.bag および log_1.bag のメッセージが再生されます。この 2 つの ROS bag は、同じ ROS bag グループ mybaggroup にあります。両方の bag ファイルからのメッセージは、同期された時間順に並べられます。

<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>

メッセージ間の時間はシミュレートされます。たとえば、2 つの ROS bag の間に 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"/>

73

Page 81: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド起動ファイル設定の例

</launch>

異なる bag グループから ROS bag ファイルを再生する次の例では、ROS bag ファイル log_0.bag および log_1.bag のメッセージが、同期された時間順に再生されます。この 2 つのファイルは、異なる ROS bag グループ (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 bag ファイル log_0.bag のメッセージが 10 秒で再生を開始し、ROS bag の末尾に達すると終了します。

<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 bag ファイル 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 bag の先頭から始まるメッセージのサブセットを再生するには、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 bag メッセージは自動的に再生を開始します。メッセージの再生は、手動で開始および停止できます。ROS bag メッセージの再生を一時停止の状態で開始するには、--pause を使用します。その後、rviz および rqt などのツールを使用して再生を操作できます。これは、ロボットアプリケーションをデバッグするときに役立ちます。

詳細については、「rosservice command line tool」を参照してください。

次の起動ファイルでは、再生が一時停止状態で開始します。

<launch> <node pkg="rosbag" type="play" name="rosbag_play" output="screen" required="true"

74

Page 82: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド再生終了時の失敗したシミュレーションジョブの回避

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 bag の場所の指定、start などの再生引数、その他の詳細を簡単に指定できるようになります。

次の起動ファイルでは、2 つの引数 bags および args が作成されます。これらの値は環境変数 BAGS および ARGS からキャプチャされ、シミュレーションジョブの作成時に定義されます。

<launch> <arg name="bags" default="$(optenv BAGS)" doc="space separated list of bag files"/> <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 環境変数を作成します。たとえば、以下の値で環境変数を作成する場合、再生は 2 つの ROS bag ファイルを使用します。再生は 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 applicationexited 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. 76)」を参照してください。

75

Page 83: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドカスタムステータスとプロパティ値のタグの使用

カスタムステータスとプロパティ値のタグの使用シミュレーションジョブの管理に役立つように、オプションで独自のメタデータを割り当てることができます。詳細については、「シミュレーションジョブのタグの管理 (p. 71)」を参照してください。

シミュレーションジョブの早期キャンセルカスタムアプリケーションロジックを使用するか、ターミナルから手動でシミュレーションジョブを早期にキャンセルできます。キャンセルすると、シミュレーションジョブのステータスは Cancelled に設定されます。これは、シミュレーションジョブを確認するときに役立ちます。キャンセルが意図的に行われた場合、シミュレーションジョブのステータスは Cancelled になります。予期せず終了した場合は、シミュレーションジョブのジョブステータスは Failed になります。

シミュレーションジョブは、ターミナルから手動で、またはシミュレーションアプリケーション内ではプログラムでキャンセルできます。

Note

シミュレーションジョブをキャンセルするには、CancelSimulationJob を呼び出すアクセス許可が必要です。アクセス許可の詳細については、「AWS RoboMaker に対する認証とアクセスコントロール (p. 105)」を参照してください。

ターミナルから手動でキャンセルする次の例では、rosservice を使用してシミュレーションジョブを手動でキャンセルする方法を示します。

Note

シミュレーションジョブが終了すると、接続は閉じられます。

robomaker@9cc6d11dfa46:~$rosservice call /robomaker/job/cancelsuccess: Truemessage: ''

Python からのキャンセルシミュレーションアプリケーションで Python を使用してキャンセルするには:

1. サービスタイプ (.srv) にアクセスするには、package.xml 内の AWS RoboMaker パッケージに依存関係を追加します。

<package> ... <depend>aws_robomaker_simulation_ros_pkgs</depend></package>

2. ROS Python ノードとして新しい Python ファイルに次のコードをコピーします。このコードでは、サービスプロキシを使用してタグを追加し、経過時間に基づいてシミュレーションジョブをキャンセルします。キャンセル条件は、センサーデータ、ロボットの状態、またはその他の情報によって異なります。

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

76

Page 84: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドシミュレーションジョブの管理

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: 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. 78)

77

Page 85: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドシミュレーションジョブの作成

• シミュレーションジョブの表示 (p. 83)• シミュレーションジョブのキャンセル (p. 83)• シミュレーションジョブのクローン (p. 84)• シミュレーションジョブの再起動 (p. 84)

シミュレーションジョブの作成Gazebo を使用するか、ROS bag に保存されている以前に記録された ROS メッセージを使用して、仮想世界でロボットアプリケーションを実行する場合、シミュレーションジョブを作成します。シミュレーションアプリケーションを指定するときに、ソフトウェアスイート名を選択します。[Gazebo] を選択した場合、ロボットアプリケーションは、シミュレーションアプリケーションでモデル化されたオブジェクトや地形などの物理的な側面とやり取りします。[RosbagPlay] を選択した場合、ロボットアプリケーションは、データソースとして提供する ROS bag から発行された ROS メッセージを使用します。

ROS bag メッセージを再生するように ROS 起動ファイルを設定する方法の詳細については、「再生のための ROS bag の使用 (p. 72)」を参照してください。

Note

90 日後、シミュレーションジョブは期限切れになり、削除されます。これらのジョブにはアクセスできなくなります。

トピック• Gazebo を使用してシミュレーションジョブを作成する (p. 78)• ROS bag を使用してシミュレーションジョブを作成する (p. 81)

Gazebo を使用してシミュレーションジョブを作成する作成したシミュレーションでロボットアプリケーションを実行する場合は、シミュレーションジョブを作成します。実行中の状態になると、シミュレーションを操作できます。たとえば、rviz を使用してロボットのビジュアルセンサーからのイメージを表示できます。

Gazebo を使用してシミュレーションジョブを作成するには

以下のいずれかのタブのステップに従ってください。Note

既存の Amazon S3 バケットや新規作成したバケットを使用する場合、そのバケットは AWSRoboMaker と同じリージョンに存在している必要があります。

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 料金表」を参照してください。

78

Page 86: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドシミュレーションジョブの作成

5. [Failure behavior (失敗の動作)] を選択します。シミュレーションジョブが失敗した場合にホストインスタンスを終了するには、[fail (失敗)] を選択します。ホストインスタンスを保持し、接続および調査できるようにするには、[continue (続行)] を選択します。

以下でオプションの S3 フォルダを指定した場合は、このフォルダにシミュレーションデータが格納されます。このフォルダは、選択した失敗の動作に関係なしに利用できます。

6. [IAM Role (IAM ロール)] でロールを選択するか、[Create new role (ロールの新規作成)] を選択してロールを作成します。AWS RoboMaker では、このロールを使用して自動的にリソースにアクセスします。このロールは、アプリケーションで Amazon Rekognition や Amazon Lex などのAWS リソースにアクセスするためにも使用します。

7. オプション: [Compute (コンピューティング)] で、シミュレーション単位制限を選択します。シミュレーションには、指定されたシミュレーション単位制限に比例して CPU とメモリが割り当てられます。シミュレーション単位は 1 vcpu と 2 GB のメモリです。デフォルト値は 15 です。

8. 省略可能: [出力先] に、シミュレーションジョブの出力を保存する先の Amazon S3 フォルダの名前を入力します。必要に応じて、[Create new S3 folder (S3 フォルダの新規作成)] を選択して新しい Amazon S3 フォルダを作成します。

9. オプション: ロボットアプリケーションまたはシミュレーションアプリケーションから AmazonVPC のリソースにアクセスする場合は、[Networking (ネットワーキング)] で、[VPC]、サブネット、およびセキュリティグループを選択します。使用可能なすべてのサブネットを選択して、すべてのリソース制限が使用可能であることを確認します。詳細については、「VPC とサブネット」を参照してください。

VPC 外からシミュレーションジョブにアクセスする場合は、[Assign public IP (パブリック IP の割り当て)] を選択します。

10. オプション: シミュレーションアプリケーションまたはロボットアプリケーションにリモートで接続するには、[Enable connect to simulation (シミュレーションへの接続の有効化)] を選択し、ロボットアプリケーションとシミュレーションアプリケーションのポートマッピングを指定します。

Warning

シミュレーションジョブに安全なリモート接続を設定することは、お客様の責任となります。開放するポートには、強力な認証方法と転送時の暗号化を実装することをお勧めします。リモート接続の詳細については、「シミュレーションジョブへの接続 (p. 65)」を参照してください。

11. 必要に応じて、[タグ] で、シミュレーションジョブ用に 1 つ以上のタグを指定します。タグとは、AWS リソースを識別および整理するためのメタデータとして使用される単語やフレーズのことです。の各タグは、キーと値から構成されます。シミュレーションジョブのタグは、[シミュレーションジョブの詳細] ページで管理できます。

タグ付けの詳細については、AWS 請求とコスト管理ユーザーガイドの「コスト配分タグの使用」を参照してください。

12. [次へ] を選択します。13. [Specify robot application (ロボットアプリケーションの指定)] ページで、[Robot application (ロ

ボットアプリケーション)] の [Create new application (アプリケーションの新規作成)] を選択します。必要に応じて、[Choose existing application (既存のアプリケーションの選択)] を選択し、作成済みのロボットアプリケーションを使用します。

14. ロボットアプリケーションの名前を入力します。15. [Sources (ソース)] で、X86_64 ロボットアプリケーションソースの格納先である Amazon S3 の

場所を指定します。AWS RoboMaker シミュレーションジョブは、シミュレーションを実行するために X86_64 ソースを必要とします。

ロボットアプリケーションをフリート内のロボットにデプロイする場合は、必要に応じて、ロボットアプリケーションの ARMHF および ARM64 ソースファイルを指定できます。ロボットアプリケーションを更新して追加のソースファイルを含めることもできます。詳細については、「ロボットアプリケーションの更新 (p. 55)」を参照してください。

79

Page 87: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドシミュレーションジョブの作成

16. [Robot application configuration (ロボットアプリケーション設定)] で、ロボットアプリケーションの roslaunch の [Launch package name (起動パッケージ名)] を指定します。

17. roslaunch の [Launch file (起動ファイル)] を指定します。起動ファイルには、起動するノードとroslaunch の他の初期化パラメータが含まれています。

roslaunch の詳細については、「roslaunch」を参照してください。18. オプション: アプリケーションにグラフィカルユーザーインターフェイスが含まれている場

合は、[Run with streaming session (ストリーミングセッションで実行)] を選択します。AWSRoboMaker は、シミュレーションの実行中にアプリケーションを操作できるように接続を設定します。接続するには、シミュレーションジョブの詳細ページの [Simulation tools (シミュレーションツール)] で、[Robot Application (ロボットアプリケーション)] を選択します。

19. 省略可能: ロボットアプリケーションで環境変数を使用する場合は、[Name (名前)] と [Value (値)]のペアを指定します。環境変数名は、A~Z またはアンダースコアで始まり、A~Z、0~9、アンダースコアで構成される必要があります。「AWS」で始まる名前は予約されています。

他の変数を追加するには、[Add environment variable (環境変数の追加)] を選択します。

起動ファイル内の環境変数は、roslaunch の 代入引数を使用して読み取ることができます。20. [Next (次へ)] を選択します。21. [Specify simulation application (シミュレーションアプリケーションの指定)] ページで、[Create

new application (アプリケーションの新規作成)] を選択します。必要に応じて、[Choose existingapplication (既存のアプリケーションの選択)] を選択し、作成済みのシミュレーションアプリケーションを使用します。

22. シミュレーションアプリケーションの名前を入力します。23. シミュレーションアプリケーションで使用する [シミュレーションソフトウェアスイート] と

[Simulation rendering version (シミュレーションのレンダリングバージョン)] を選択します。24. [Sources (ソース)] で、X86_64 シミュレーションアプリケーションソースの格納先である

Amazon S3 の場所を指定します。AWS RoboMaker シミュレーションジョブは、シミュレーションを実行するために X86_64 ソースを必要とします。

25. [Simulation application configuration (シミュレーションアプリケーション設定)] で、シミュレーションアプリケーション用の roslaunch の [Launch package name (起動パッケージ名)] とroslaunch の [Launch file (起動ファイル)] を選択します。

26. オプション: アプリケーションにグラフィカルユーザーインターフェイスが含まれている場合は、[Run with streaming session (ストリーミングセッションで実行)] を選択します。AWSRoboMaker は、シミュレーションの実行中にアプリケーションを操作できるように接続を設定します。接続するには、シミュレーションジョブの詳細ページの [Simulation tools (シミュレーションツール)] で、[Simulation Application (シミュレーションアプリケーション)] を選択します。

27. 省略可能: シミュレーションアプリケーションで環境変数を使用する場合は、[Name (名前)] と[Value (値)] のペアを指定します。他の変数を追加するには、[Add environment variable (環境変数の追加)] を選択します。

28. [次へ] を選択します。29. [作成] を選択してシミュレーションジョブを作成します。

Using the AWS CLI

Example

別のタブの、コンソールを使用した「シミュレーションジョブの作成」と同じ処理を AWS CLI コマンドで実行する例は次のとおりです。

$ aws robomaker create-simulation-job --max-job-duration-in-seconds 3600 --iam-role arn:aws:iam::111111111111:role/MyRole --robot-applications

80

Page 88: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドシミュレーションジョブの作成

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 bag を使用してシミュレーションジョブを作成するデータソースとして使用する ROS bag ファイルを再生するように ROS 起動ファイルを設定する必要があります。ROS bag メッセージを再生するように ROS 起動ファイルを設定する方法の詳細については、「再生のための ROS bag の使用 (p. 72)」を参照してください。

RosbagPlay を使用してシミュレーションジョブを作成するには

以下のステップを実行します。

Note

既存の Amazon S3 バケットや新規作成したバケットを使用する場合、そのバケットは AWSRoboMaker と同じリージョンに存在している必要があります。

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 では、このロールを使用して自動的にリソースにアクセスします。このロールは、アプリケーションで Amazon Rekognition や Amazon Lex などの AWS リソースにアクセスするためにも使用します。

7. オプション: [Compute (コンピューティング)] で、シミュレーション単位制限を選択します。シミュレーションには、指定されたシミュレーション単位制限に比例して CPU とメモリが割り当てられます。シミュレーション単位は 1 vcpu と 2 GB のメモリです。デフォルト値は 15 です。

8. 省略可能: [出力先] に、シミュレーションジョブの出力を保存する先の Amazon S3 フォルダの名前を入力します。必要に応じて、[Create new S3 folder (S3 フォルダの新規作成)] を選択して新しいAmazon S3 フォルダを作成します。

9. 省略可能: ロボットアプリケーションまたはシミュレーションアプリケーションから Amazon VPC のリソースにアクセスする場合は、[Networking (ネットワーキング)] で、[VPC]、サブネット、およびセキュリティグループを選択します。VPC 外からシミュレーションジョブにアクセスする場合は、[Assign public IP (パブリック IP の割り当て)] を選択します。

10. 必要に応じて、[タグ] で、シミュレーションジョブ用に 1 つ以上のタグを指定します。タグとは、AWS リソースを識別および整理するためのメタデータとして使用される単語やフレーズのことで

81

Page 89: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドシミュレーションジョブの作成

す。の各タグは、キーと値から構成されます。シミュレーションジョブのタグは、[シミュレーションジョブの詳細] ページで管理できます。

タグ付けの詳細については、AWS RoboMaker リソースにタグを付ける (p. 134) を参照してください。

11. [Next] を選択します。12. [Specify robot application (ロボットアプリケーションの指定)] ページで、[Robot application (ロボット

アプリケーション)] の [Create new application (アプリケーションの新規作成)] を選択します。必要に応じて、[Choose existing application (既存のアプリケーションの選択)] を選択し、作成済みのロボットアプリケーションを使用します。

13. ロボットアプリケーションの名前を入力します。14. [Sources (ソース)] で、X86_64 ロボットアプリケーションソースの格納先である Amazon S3 の場所

を指定します。AWS RoboMaker シミュレーションジョブは、シミュレーションを実行するためにX86_64 ソースを必要とします。

ロボットアプリケーションをフリート内のロボットにデプロイする場合は、必要に応じて、ロボットアプリケーションの ARMHF および ARM64 ソースファイルを指定できます。ロボットアプリケーションを更新して追加のソースファイルを含めることもできます。詳細については、「ロボットアプリケーションの更新 (p. 55)」を参照してください。

15. [Robot application configuration (ロボットアプリケーション設定)] で、ロボットアプリケーションのroslaunch の [Launch package name (起動パッケージ名)] を指定します。

16. roslaunch の [Launch file (起動ファイル)] を指定します。起動ファイルには、起動するノードとroslaunch の他の初期化パラメータが含まれています。

roslaunch の詳細については、「roslaunch」を参照してください。17. オプション: アプリケーションにグラフィカルユーザーインターフェイスが含まれている場合は、

[Run with streaming session (ストリーミングセッションで実行)] を選択します。AWS RoboMakerは、シミュレーションの実行中にアプリケーションを操作できるように接続を設定します。接続するには、シミュレーションジョブの詳細ページの [Simulation tools (シミュレーションツール)] で、[Robot Application (ロボットアプリケーション)] を選択します。

18. 省略可能: ロボットアプリケーションで環境変数を使用する場合は、[Name (名前)] と [Value (値)] のペアを指定します。環境変数名は、A~Z またはアンダースコアで始まり、A~Z、0~9、アンダースコアで構成される必要があります。「AWS」で始まる名前は予約されています。

他の変数を追加するには、[Add environment variable (環境変数の追加)] を選択します。

起動ファイル内の環境変数は、roslaunch の 代入引数を使用して読み取ることができます。19. [Next (次へ)] を選択します。20. [Specify simulation application (シミュレーションアプリケーションの指定)] ページで、[Create

new application (アプリケーションの新規作成)] を選択します。必要に応じて、[Choose existingapplication (既存のアプリケーションの選択)] を選択し、作成済みのシミュレーションアプリケーションを使用します。

21. シミュレーションアプリケーションの名前を入力します。22. [Software suite name (ソフトウェアスイート名)] で、[RosbagPlay] を選択します。Kinetic が

[Software suite version (ソフトウェアスイートのバージョン)] として自動的に選択されます。23. [Browse S3 (S3 の参照)] を選択し、シミュレーションアプリケーションへのパスを指定します。24. [Simulation application configuration (シミュレーションアプリケーション設定)] で、シミュレーショ

ンアプリケーション用の roslaunch の [Launch package name (起動パッケージ名)] と roslaunch の[Launch file (起動ファイル)] を選択します。

25. オプション: アプリケーションにグラフィカルユーザーインターフェイスが含まれている場合は、[Run with streaming session (ストリーミングセッションで実行)] を選択します。AWS RoboMakerは、シミュレーションの実行中にアプリケーションを操作できるように接続を設定します。接続するには、シミュレーションジョブの詳細ページの [Simulation tools (シミュレーションツール)] で、[Simulation Application (シミュレーションアプリケーション)] を選択します。

82

Page 90: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドシミュレーションジョブの表示

26. 省略可能: シミュレーションアプリケーションで環境変数を使用する場合は、[Name (名前)] と [Value(値)] のペアを指定します。他の変数を追加するには、[Add environment variable (環境変数の追加)] を選択します。

27. [Data source configuration (データソースの設定)] で [ROS bag group name (ROS bag グループ名)]を指定し、[Browse S3 (S3 の参照)] を選択して [ROS bag files (ROS bag ファイル)] を選択します。ファイルには、rosbag record で使用されるのと同じ形式の ROS メッセージが含まれている必要があります。追加のデータファイルのグループを追加するには、[Add group (グループを追加)] を選択します。

Note

選択できるファイルは、すべてのグループで合計 100 個までです。ファイルの合計サイズの上限は 25 GB です。データファイルの合計サイズが大きくなると、パフォーマンスに影響する可能性があります。

28. [Next] を選択します。29. [作成] を選択してシミュレーションジョブを作成します。

シミュレーションジョブの表示シミュレーションジョブに関する情報を表示できます。ジョブが実行中である場合は、Gazebo、rviz、rqt、またはターミナルを起動してシミュレーションを操作できます。シミュレーションジョブの詳細を表示し、タグを管理することもできます。

シミュレーションジョブの詳細を表示するには

以下のいずれかのタブのステップに従ってください。

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

シミュレーションジョブのキャンセル実行中のシミュレーションジョブが不要になった場合は、キャンセルできます。

シミュレーションジョブをキャンセルするには

以下のいずれかのタブのステップに従ってください。

83

Page 91: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドシミュレーションジョブのクローン

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

シミュレーションジョブのクローン[Simulation job detail (シミュレーションジョブの詳細)] ページでジョブをクローンすることで、既存のシミュレーションジョブから新しいシミュレーションジョブを作成できます。

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 (作成)] を選択します。

シミュレーションジョブの再起動実行中のシミュレーションジョブは再起動できます。再起動したシミュレーションジョブでは、AmazonS3 の場所に格納されているロボットアプリケーションおよびシミュレーションアプリケーションのソースファイルと、シミュレーションジョブの作成時に指定した他のすべての構成設定を使用します。

シミュレーションジョブを再起動するには

以下のいずれかのタブのステップに従ってください。

Using the console

1. AWS RoboMaker コンソール (https://console.aws.amazon.com/robomaker/) にサインインします。

84

Page 92: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS 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

シミュレーションジョブバッチの管理このセクションでは、シミュレーションジョブバッチを開始および管理する方法について説明します。シミュレーションジョブバッチを使用すると、1 つの API コールにより、多数のシミュレーションを開始して実行できます。そのため、回帰テスト、パラメータの最適化、機械学習モデルのトレーニング、および合成データ生成を簡単に実行できます。

Note

シミュレーションジョブバッチは、AWS RoboMaker SDK または AWS CLI からのみ開始できます。AWS RoboMaker コンソールを使用して、シミュレーションバッチの表示、クローン作成、およびキャンセルを行うことができます。

トピック• シミュレーションジョブバッチの開始 (p. 85)• シミュレーションジョブバッチの表示 (p. 87)• シミュレーションジョブバッチのキャンセル (p. 87)• シミュレーションジョブバッチのクローン作成 (p. 88)

シミュレーションジョブバッチの開始シミュレーションジョブバッチは AWS SDK または AWS CLI から開始します。シミュレーションジョブバッチには、1 つ以上のシミュレーションジョブリクエストが含まれています。各シミュレーションジョブリクエストは、各シミュレーションで使用するアプリケーション、ジョブの最大継続時間、およびその他の情報を識別します。シミュレーションジョブバッチおよび各シミュレーションジョブリクエストにはタグを適用できます。

シミュレーションジョブバッチを開始するには、次の操作を実行する必要があります。

1. AWS Command Line Interface をインストールします。AWS CLI のインストールの詳細については、「AWS CLI のインストール」を参照してください。

2. 次の JSON を startsimjobbatch.json という名前のファイルにコピーします。必要な設定に合わせてファイルを変更し、保存します。

85

Page 93: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドシミュレーションジョブバッチの開始

{ "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": 200, "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" } } ] } ], "tags": { "myBatchTagKey" : "myBatchTagValue" }}

3. コマンドプロンプトを開き、次の AWS CLI コマンドを実行します。

$ aws robomaker start-simulation-job-batch start-simulation-job-batch --cli-input-json file://startsimjobbatch.json

シミュレーションジョブバッチを表示するには、「シミュレーションジョブバッチの表示 (p. 87)」を参照してください。

86

Page 94: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドシミュレーションジョブバッチの表示

シミュレーションジョブバッチの表示バッチ内のシミュレーションジョブリクエストの詳細を含む、シミュレーションジョブバッチに関する情報を表示できます。

シミュレーションジョブバッチの詳細を表示するには

以下のいずれかのタブのステップに従ってください。

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 を選択します。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

87

Page 95: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドシミュレーションジョブバッチのクローン作成

シミュレーションジョブバッチのクローン作成既存のシミュレーションジョブバッチのクローンを作成することで、新しいバッチを開始できます。クローンを作成する場合、すべてのシミュレーションジョブリクエストを含めるか、リクエストのサブセットを選択できます。

シミュレーションジョブバッチのクローンを作成するには:

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 jobrequests] でクローンを作成するシミュレーションジョブリクエストをオンにし、[Request actions]、[Clone request] の順に選択します。

5. [Clone simulation job batch] ページの [Submit] を選択します。

シミュレーションツールAWS RoboMaker では、Gazebo、rqt、rviz、およびターミナルを使用して実行中のシミュレーションジョブを操作できます。

一般的なタスクは以下のとおりです。

• 実行中のシミュレーションを一時停止する (p. 89)• ノードグラフを表示する (p. 91)• ロボットのセンサーデータを表示する (p. 92)• ROS トピックとメッセージを検査する (p. 92)

シミュレーションを作成するために使用される IAM ユーザーまたはロールには、シミュレーションツールへのアクセス権限が自動的に与えられます。他のユーザーまたはロールの場合は、robomaker:CreateSimulationJob 権限を付与する必要があります。

トピック• Gazebo (p. 88)• rqt (p. 90)• rviz (p. 91)• ターミナル (p. 92)

GazeboGazebo では、ロボットや地形などのオブジェクトで 3D 世界を作成できます。また、照明、重力などの影響力をモデリングするための物理エンジンを利用できます。ロボット開発者は、Gazebo を使用してさまざまなシナリオでロボットを評価およびテストすることで、物理的なロボットやシナリオを使用した場合よりも迅速に結果を得られることがよくあります。Gazebo では、ロボットの他の側面 (エラー処理、バッテリ寿命、ナビゲーション、Machine Learning アルゴリズムなど) のテストも容易になります。

以下のタスクを実行するには、Gazebo を開いて、実行中のシミュレーションジョブに接続している必要があります。Gazebo は、実行中のシミュレーションジョブの [Simulation jobs detail (シミュレーションジョブの詳細)] ページから開くことができます。

88

Page 96: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドGazebo

トピック• 実行中のシミュレーションを一時停止する (p. 89)• シミュレーションのロボットとオブジェクトを表示する (p. 89)• シミュレーションのオブジェクトを追加および移動する (p. 89)• ロボットとオブジェクトに力を適用する (p. 89)

実行中のシミュレーションを一時停止するGazebo で実行中のシミュレーションを一時停止するには、一時停止アイコンを選択します。このアイコンは、左側の世界のレンダリングの下にあります。

実行中のシミュレーションを一時停止すると、rqt や rviz などの他のシミュレーションツールでも一時停止します。これは、その時点でのシミュレーションデータを調査する場合に役立ちます。たとえば、rqt を使用して、ロボットに取り付けたビデオカメラからのイメージデータを調べる場合に便利です。

シミュレーションのロボットとオブジェクトを表示するGazebo を開くと、シミュレートされた世界のビューが表示されます。最初のパースペクティブは、シミュレーションアプリケーション開発者が設定します。

1. Gazebo では、マウスまたはキーボードを使用して世界を探索します。世界をズームイン、パン、および移動します。

2. 正投影 (またはパースペクティブ) のカメラアングルに切り替えます。メニューで、[Camera (カメラ)]、[Orthographic (正投影)] (または [Perspective (パースペクティブ)]) の順に選択します。[ResetView Angle (視野角のリセット)] を選択して、カメラをリセットします。

3. 別のビューを選択してオブジェクトの表示方法を変更します。たとえば、[View (ビュー)]、[Wireframe(ワイヤーフレーム)] の順に選択し、ワイヤーフレームとしてレンダリングされた世界を表示します。

4. 世界は、元の設定に簡単にリセットできます。[Edit (編集)]、[Reset World (世界のリセット)] の順に選択します。モデルポーズへの変更を元に戻すには、[Reset Model Poses (モデルポーズのリセット)] を選択します。

シミュレーションのオブジェクトを追加および移動するGazebo には、環境の作成に使用できるモデルのコレクションが含まれています。オブジェクトは、シナリオのニーズに合わせて環境に配置したり、移動したり、ポーズをつけたりすることができます。

1. 左側の [Gazebo] で、[Insert (挿入)] タブを選択します。2. [Insert (挿入)] タブで、[Bookshelf (本棚)] を選択し、カーソルを部屋に移動します。部屋の中に移動す

ると、本棚モデルが表示されます。マウスの左ボタンをクリックし、本棚を部屋の中に配置します。3. 変換モードを選択して本棚を移動します。メニューで複数矢印のプラスアイコンを選択するか、キー

ボードショートカット Control-T を使用します。本棚を選択し、新しい場所に移動して、マウスボタンをクリックします。

4. 変換モードを終了するには、Escape キーを押します。本棚を選択し、[World (世界)] タブで [Pose(ポーズ)] を展開して、さまざまポーズ設定を表示します。1 つの値を選択し、上下のセレクタを使用して一度に 1 つの増分だけ変更します。Gazebo は、クリックごとに世界を更新します。

ロボットとオブジェクトに力を適用する現実の世界ではすべてが計画どおりに行くとは限りません。ロボットはオペレーション中に予期しない力を受けたり、障害にさらされたりする場合があります。オブジェクトは、倒れたり、転がったり、近くの

89

Page 97: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドrqt

オブジェクトやロボット自体と接触したりすることがあります。Gazebo では、シミュレーション中にモデルに力やトルクを適用して障害を創り出すことができます。

次の例では、「Navigation and Person Recognition (p. 16)」サンプルを使用しています。詳細については、「AWS RoboMaker のサンプルアプリケーション」を参照してください。原則は、静的ではないロボットやオブジェクトに適用されます。静的とマークされたエンティティには、衝突ジオメトリのみが適用されます。

1. [Gazebo] で、シミュレーションが実行中であることを確認します。力とトルクに対するオブジェクトの反応を確認するには、シミュレーションが実行中であることが必要です。

2. 左側の [World (世界)] タブで、[turtlebot3_waffle_pi] を展開します。[wheel_left_link] を右クリックし、[Apply Force/Torque (力/トルクを適用)] を選択します。

3. [Force (力)] で、[X] 値として「1000」を指定します。ロボットが表示されるように、マウスまたはキーボードを使用して基盤のビューを移動し、[Apply Force (力を適用)] を選択します。通常、ロボットは反時計回りに旋回します。

[Clear (クリア)]、[Apply Force (力の適用)] の順に選択して力を削除します。4. 次に、ロボットが逆さまに転がるように Y 軸に十分なトルクを適用します。[Torque (トルク)] で、[Y]

の値として「400」を指定します。ロボットが表示されていることを確認し、[Apply Torque (トルクの適用)] を選択します。ロボットが逆さまにひっくり返ります。[Apply Torque (トルクの適用)] を選択すると、転がってまっすぐに立ちます。

[Clear (クリア)]、[Apply Torque (トルクの適用)] の順に選択してトルクを削除します。[Cancel (キャンセル)] を選択してダイアログボックスを閉じます。

5. 次に、オブジェクトに対する力の適用を試します。左側の [World (世界)] タブで、[ChairA_01_001] を右クリックし、[Apply Force (力の適用)] を選択します。マウスまたはキーボードを使用して椅子が表示された状態にします。

6. [Force (力)] で、[Z] の値として「50000」を指定し、[Apply Force (力の適用)] を選択します。椅子が床から離れて再び元に戻ります。

[Clear (クリア)]、[Apply Force (力の適用)] の順に選択して力を削除します。[Cancel (キャンセル)] を選択してダイアログボックスを閉じます。

rqtrqt は、ROS 情報を視覚化するためのさまざまなプラグインを提供します。複数のプラグインをカスタムダッシュボードに表示し、ロボットの独特なビューを提供できます。rqt には、多くの便利なプラグインが用意されており、カスタムプラグインを記述することもできます。

以下のタスクを実行するには、rqt を開いて、実行中のシミュレーションジョブに接続している必要があります。rqt は、実行中のシミュレーションジョブの [Simulation jobs detail (シミュレーションジョブの詳細)] ページから開くことができます。

トピック• ロボットからのイメージデータを表示する (p. 90)• ノードグラフを表示する (p. 91)• 現在アドバタイズされているトピックを表示する (p. 91)

ロボットからのイメージデータを表示するrqt は、ロボットからのイメージデータを視覚化するためのプラグインを提供します。イメージデータは、ロボットがシミュレートされた世界を移動するに従って更新されます。

90

Page 98: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドrviz

1. [rqt] で、[Plugins (プラグイン)]、[Visualization (視覚化)]、[Image View (イメージビュー)] の順に選択します。

2. [Image View (イメージビュー)] ビューで、ドロップダウンから [/camera/rgb/image_raw] を選択します。シミュレーションを一時停止するには、「実行中のシミュレーションを一時停止する (p. 89)」を参照してください。

ノードグラフを表示するノードグラフは、アプリケーションのすべての 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 視覚化ツールです。ロボットモデルのビューを提供し、ロボットセンサーからのセンサー情報をキャプチャして、キャプチャしたデータを再生します。カメラ、レーザー、3D/2D デバイスからの写真やポイントクラウドを含むデータを表示できます。

以下のタスクを実行するには、rviz を開いて、実行中のシミュレーションジョブに接続している必要があります。rviz は、実行中のシミュレーションジョブの [Simulation jobs detail (シミュレーションジョブの詳細)] ページから開くことができます。

トピック

91

Page 99: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドターミナル

• ロボットのセンサーデータを表示する (p. 92)

ロボットのセンサーデータを表示する通常、ロボットには世界のデータを収集するセンサーがあります。たとえば、ロボットはセンサーを使用してオブジェクトとの衝突を検出したり、レーザースキャナーを使用して周辺環境内のオブジェクトに関する情報を取得したりできます。

1. [rviz] で、[File (ファイル)]、[Open Config (設定を開く)] の順に選択します。ダイアログボックスで、[robomaker/workspace/bundle-store/GUID/opt/ros/$ROS_DISTRO/share/turtlebot3_description/rviz] に移動します。[model.rviz]、[Open (開く)] の順に選択します。どの GUID ディレクトリを選択してもかまいません。

保存されていない変更についてプロンプトが表示されたら、[Discard (破棄)] を選択します。2. ディスプレイで、レーザースキャンデータは赤い点として表示されます。壁や他のオブジェクトは、

ロボットを中心とした赤い点線で識別されます。レーザースキャンは、仮想世界にオブジェクトがある場合にのみ表示されます。

3. Gazebo を開きます。Gazebo のロボットの位置と方向を、レーザースキャンで検出した結果と比較します。

4. Gazebo で、ロボットの横にある球体を削除します。rviz の場合、レーザースキャンはオブジェクトの一部を検出します。

ターミナルターミナルは、シミュレーションジョブホストでコマンドラインへのアクセスを提供します。

以下のタスクを実行するには、ターミナルを開いて、実行中のシミュレーションジョブに接続している必要があります。ターミナルは、実行中のシミュレーションジョブの [Simulation jobs detail (シミュレーションジョブの詳細)] ページから開くことができます。

Note

ターミナルウィンドウでの GUI アプリケーションの起動はサポートされていません。

トピック• ROS トピックとメッセージを検査する (p. 92)• ROS ノードおよびサービスを検査する (p. 93)• ログファイルをリアルタイムで表示する (p. 93)

ROS トピックとメッセージを検査するROS トピックに関する情報を表示するには、rostopic を使用します。rostopic の詳細については、http://wiki.ros.org/rostopic を参照してください。

1. ターミナルで、以下のコマンドを入力して ROS 環境をセットアップします。

eval $AWS_ROBOMAKER_ROBOT_APPLICATION_SETUP

2. 次のコマンドを入力して使用可能なトピックを一覧表示します。

rostopic list

3. 次のコマンドを使用して、一覧表示されたトピックに関連付けられているメッセージを表示します。

92

Page 100: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドターミナル

rostopic echo /topic_name

ROS ノードおよびサービスを検査するROS ノードおよびサービスに関する情報を表示するには、rosnode を使用します。rosnode の詳細については、http://wiki.ros.org/rosnode を参照してください。

1. ターミナルで、以下のコマンドを入力して ROS 環境をセットアップします。

eval $AWS_ROBOMAKER_ROBOT_APPLICATION_SETUP

2. 次のコマンドを入力して使用可能なトピックを一覧表示します。

rosnode list

3. 次のコマンドを使用して、一覧表示されたトピックに関連付けられているメッセージを表示します。

rostopic info /node_name

ログファイルをリアルタイムで表示するログファイルは、tmp/robot-logs/stdout_and_stderror と tmp/simulation-logs/stdout_and_stderror に書き込まれます。たとえば、ロボットアプリケーションログの最後の部分を表示するには、次のコマンドを使用します。

tail -f /tmp/robot-logs/stdout_and_stderror

93

Page 101: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドロボットアプリケーションのデプロイ

フリート管理このセクションには、ロボット、フリート、およびデプロイに関する情報が記載されています。

トピック• ロボットアプリケーションのデプロイ (p. 94)• ロボットの管理 (p. 95)• フリートの管理 (p. 98)• デプロイの管理 (p. 100)

ロボットアプリケーションのデプロイロボットアプリケーションを物理ロボットにデプロイするには、デプロイを受け取るように物理ロボットを設定し、物理ロボットをフリートに登録する必要があります。デプロイするには、少なくとも以下のステップを実行します。

1. ロボットのアーキテクチャー用のソースを使用してロボットアプリケーションを作成します。サポートされているアーキテクチャーは、X86_64、ARM64、および ARMHF です。

2. AWS RoboMaker でロボットを作成し、デプロイを受け取ることができるように AWS IoT Greengrassでロボットを設定します。AWS RoboMaker では、AWS IoT Greengrass を使用してロボットアプリケーションをデプロイします。各ロボットには、内部に 1 つの AWS IoT Greengrass コアが搭載された1 つの AWS IoT Greengrass グループがあります。

ロボットアプリケーションで AWS RoboMaker クラウド拡張機能、またはその他の AWS のサービスを使用している場合は、ロボットアプリケーションからアクセスできるようにアクセス許可を付与します。

3. ロボットをフリートに登録します。フリートは、ロボットアプリケーションで定義された機能を共有する複数のロボットの論理グループです。

4. ロボットアプリケーションをフリートにインストールするためのデプロイを作成します。ロボットアプリケーションバージョンを選択し、起動設定をカスタマイズ (起動前と起動後のアクションを含む) して、ロボットアプリケーションのデプロイ方法を指定します。

5. デプロイをモニタリングします。デプロイの進行状況や他の情報は、[deployment details (デプロイの詳細)] で追跡できます。AWS RoboMaker クラウド拡張機能 を使用して、追加情報を提供するようにロボットアプリケーションをカスタマイズします。

以上の各ステップの実行方法については、「AWS RoboMaker の開始方法 (p. 8)」を参照してください。Note

AWS RoboMaker は、ロボットの Docker コンテナで AWS IoT Greengrass を実行している場合、無線での デプロイをサポートしません。

ロボットアプリケーションをデプロイする方法ロボットアプリケーションを物理的なロボットにデプロイすると、AWS RoboMaker は次の操作を行います。

1. AWS RoboMaker は、お客様のアカウントでカスタム Lambda を作成または更新します。Lambda には、デプロイに必要なロジックが含まれます。たとえば、ロボットアプリケーションバンドルのダウンロード、ROS の起動、事前確認と事後確認などのロジックがあります。

94

Page 102: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドロボットの管理

2. AWS RoboMaker は、デプロイ設定で指定された並列化を使用してフリートへのデプロイを開始します。

3. AWS RoboMaker は、ターゲットロボットでカスタムの Lambda を実行するように AWS IoTGreengrass に通知します。ロボットで実行されているデーモンにコマンドが送信され、Lambda が実行されます。コマンドの受信時に Lambda が実行されていると、その Lambda と、ロボット上のすべてのROS プロセスは終了します。

4. Lambda は Amazon S3 からロボットアプリケーションバンドルをダウンロードして解凍します。起動前スクリプトが指定されている場合は、実行されます。続いて、指定した起動ファイルとパッケージを使用して、Lambda で ROS が起動されます。起動後スクリプトが指定されている場合は、ROS 起動後に実行されます。最後に、デプロイのステータスが更新されます。

ロボットの管理このセクションでは、ロボットを作成および削除する方法について説明します。

トピック• ロボットの作成 (p. 95)• ロボットの削除 (p. 97)

ロボットの作成ロボットアプリケーションをデプロイする前に、ロボットハードウェアを設定する必要があります。ロボットを作成するときに、ハードウェアアーキテクチャーと AWS IoT Greengrass の IAM ロールを選択します。ロボットを作成したら、AWS IoT Greengrass コアおよびセキュリティリソースをダウンロードし、ロボットハードウェアを設定します。

トピック• デプロイロールを作成する (p. 95)• ロボットを作成する (p. 96)

デプロイロールを作成するロボットを作成する前に、ロボットアプリケーションをデプロイするための IAM ロールを作成します。このロールでは、Amazon S3 (デプロイ前のロボットアプリケーションを配置する先) などのリソースにAWS RoboMaker からアクセスしたり、Amazon Lex や Amazon Rekognition などのリソースにロボットアプリケーションからアクセスしたりもします。

これらのロールを作成済みである場合は、「ロボットを作成する (p. 96)」に進むことができます。

AWS IoT Greengrass ロールを作成するには

1. AWS マネジメントコンソール にサインインし、AWS Identity and Access Management コンソール(console.aws.amazon.com/iam) を開きます。

2. アクセスポリシーを作成します。左側で、[ポリシー]、[ポリシーの作成] の順に選択します[JSON] を選択し、以下のコードを貼り付けます。

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [

95

Page 103: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドロボットの作成

"robomaker:UpdateRobotDeployment" ], "Resource": "*" }, { "Effect": "Allow", "Action": [ "s3:List*", "s3:Get*" ], "Resource": ["arn:aws:s3:::my-robot-application-source-bucket/*"] } ]}

[ポリシーの確認] を選択し、[名前] に入力して [ポリシーの作成] を選択します。3. [ロール]、[ロールの作成] の順に選択します。4. [ロールの作成: ステップ 1] ページで、[Greengrass]、[次へ: アクセス許可] の順に選択します。5. [アクセス許可] ページで、先ほど作成したポリシーを選択し、[次へ: タグ] を選択します。6. [タグの追加] ページで、省略可能なタグをロールに追加し、[次へ: 確認] を選択します。7. [確認] ページで、[ロール名] に入力し、[ロールの作成] を選択します。8. 次に、信頼ポリシーを更新して AWS Lambda を含めます。新しいロールを選択し、[信頼関係] タブを

選択します。9. [信頼関係] タブで、[信頼関係の編集] を選択します。10. 信頼関係を更新して次のポリシードキュメントを反映します。

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": [ "lambda.amazonaws.com", "greengrass.amazonaws.com" ] }, "Action": "sts:AssumeRole" } ]}

11. [信頼ポリシーの更新] を選択します。

ロボットを作成するロボットを作成するには

1. AWS RoboMaker コンソール (https://console.aws.amazon.com/robomaker/) にサインインします。2. 左側のナビゲーションペインで、[Fleet Management (フリート管理)]、[Robots (ロボット)] の順に選

択します。3. [Create robot (ロボットの作成)] を選択します。4. [Create robot (ロボットの作成)] ページで、ロボットの名前を入力します。5. ロボットのアーキテクチャーを選択します。6. [AWS IoT Greengrass group defaults (AWS IoT Greengrass グループのデフォルト)] で、[Create

new (新規作成)] を選択してロボットの新しい AWS IoT Greengrass グループを作成します。必要

96

Page 104: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドロボットの削除

に応じて、既存の AWS IoT Greengrass グループを選択できます。各ロボットに独自の AWS IoTGreengrass グループが必要です。

既存の AWS IoT Greengrass グループを使用する場合は、そのグループに IAM ロールが関連付けられている必要があります。ロールを作成するには、「デプロイロールを作成する (p. 95)」を参照してください。

7. 必要に応じて、[Greengrass prefix (Greengrass のプレフィックス)] を変更します。この文字列は、自動的に作成される AWS IoT Greengrass オブジェクトの先頭に追加されます。

8. [IAM role (IAM ロール)] を選択し、ロボット用に作成した AWS IoT Greengrass グループにロールを割り当てます。このロールでは、Amazon S3 のロボットアプリケーションにアクセスして AWSRoboMaker から更新ステータスを読み取るアクセス許可を AWS IoT Greengrass に付与します。

9. 必要に応じて、[タグ] で、ロボット用に 1 つ以上のタグを指定します。タグとは、AWS リソースを識別および整理するためのメタデータとして使用される単語やフレーズのことです。の各タグは、キーと値から構成されます。ロボットのタグは、[ロボットの詳細] ページで管理できます。

ロボットアプリケーションのデプロイ時に、タグをロボットに環境変数として入力できます。タグには、英数字またはアンダースコア文字のみを含める必要があります。環境変数名はAWS_ROBOMAKER_ROBOT_TAG_KEY_TAGKEY としてフォーマットされます。ここで TAGKEY はタグキーです。タグ値は、環境変数の値になります。

タグ付けの詳細については、AWS RoboMaker リソースにタグを付ける (p. 134) を参照してください。

10. [Create] を選択します。11. [Download your Core device (Core デバイスのダウンロード)] ページで [Download (ダウンロード)] を

選択し、ロボットのセキュリティリソースをダウンロードして保存します。12. 物理ロボットのアーキテクチャと一致する AWS IoT Greengrass コアソフトウェアをダウンロー

ドします。AWS IoT Greengrass コアソフトウェアを設定および実行するには、「モジュール 1:Greengrass の環境設定」のステップに従います。次に、「コアデバイスで AWS Greengrass を起動する」のステップに従います。

次のコマンドを使用してセキュリティリソースを解凍します。

$ 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 (ロボット)] の順に選択します。

97

Page 105: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドフリートの管理

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/ を使用します。

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

フリートの管理フリートはロボットのグループです。ロボットアプリケーションをデプロイする先のロボットは、フリートに属している必要があります。

トピック• フリートの作成 (p. 98)• ロボットの登録と登録解除 (p. 99)• フリートの削除 (p. 100)

フリートの作成フリートを作成するには、以下のいずれかのタブのステップに従ってください。

Using the console

1. AWS RoboMaker コンソール (https://console.aws.amazon.com/robomaker/) にサインインします。

2. 左側のナビゲーションペインで、[Fleet Management (フリート管理)]、[fleets (フリート)] の順に選択します。

3. [Create fleet (フリートの作成)] を選択します。4. [フリートの作成] ページで、フリートの名前を入力します。5. 必要に応じて、[タグ] で、フリート用に 1 つ以上のタグを指定します。タグとは、AWS リソース

を識別および整理するためのメタデータとして使用される単語やフレーズのことです。の各タグは、キーと値から構成されます。フリートのタグは、[フリートの詳細] ページで管理できます。

タグ付けの詳細については、AWS RoboMaker リソースにタグを付ける (p. 134) を参照してください。

6. [作成] をクリックしてデプロイジョブを作成します。

98

Page 106: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドロボットの登録と登録解除

Using the AWS CLI

Example

別のタブの、コンソールを使用した「フリートの作成」と同じ処理を AWS CLI コマンドで実行する例は次のとおりです。

$ aws robomaker create-fleet --name my-fleet

ロボットの登録と登録解除フリートに対してロボットを登録 (追加) または登録解除 (削除) できます。これは、メンテナンスのためにフリートからロボットを削除したり、フリート間でロボットを移動したりする場合に便利です。

ロボットは単一のフリートにのみ登録できます。

ロボットを登録するロボットをフリートに登録するには、以下のいずれかのタブのステップに従ってください。

Using the console

1. AWS RoboMaker コンソール (https://console.aws.amazon.com/robomaker/) にサインインします。

2. 左側のナビゲーションペインで、[Fleet Management (フリート管理)]、[Fleets (フリート)] の順に選択します。

3. 変更するフリートの名前を選択します。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 (フリート)] の順に選択します。

99

Page 107: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドフリートの削除

3. 変更するフリートの名前を選択します。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

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 など) 向けにビルドする必要があります。

トピック• 条件付きデプロイ (p. 101)• デプロイジョブの作成 (p. 101)

100

Page 108: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド条件付きデプロイ

• デプロイジョブの表示 (p. 103)

条件付きデプロイロボットアプリケーションは、デプロイジョブを使用して、フリートのロボットにダウンロードおよびインストールされます。新しいバージョンのロボットアプリケーションをインストールすると、ロボットが実行しているタスクは停止します。ダウンロード条件ファイルを使用して、ロボットが新しいロボットアプリケーションをダウンロードしてインストールする準備ができていることを確認できます。

ダウンロード条件ファイルは、新しいデプロイメントをダウンロードする前にロボットで実行されるスクリプトです。スクリプトが 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 #condition failed echo failed exit 1fi

ダウンロード条件ファイルは /home/gcc_user/roboMakerDeploymentPackage/MyS3KeyNameにダウンロードされます。/home/gcc_user/ ディレクトリが存在しない場合は、/tmp/roboMakerDeploymentPackage にダウンロードされます。ロボット上に既存のダウンロード条件ファイルがある場合、次回のデプロイメント時に上書きされます。ロボットの再起動時や再起動時にも無視されます。

デプロイジョブの作成デプロイジョブを作成して、ロボットアプリケーションの一意なバージョンをフリート内のロボットにインストールします。追加の設定を行うには、カスタム環境変数を定義し、ロボットでのアプリケーションの起動前と起動後にスクリプトを実行します。

AWS RoboMaker によるロボットアプリケーションのデプロイの詳細については、ロボットアプリケーションをデプロイする方法 (p. 94) を参照してください。

Note

90 日後、デプロイメントジョブは期限切れになり、削除されます。これらのジョブにはアクセスできなくなります。

デプロイジョブを作成するUsing the console

101

Page 109: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドデプロイジョブの作成

デプロイジョブを作成するには

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. 54)」を参照してください。

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 プロセスの起動後に実行されるスクリプトです。ロボット環境またはその他のタスクを確認するときに使用できます。スクリプトからのゼロ以外の終了では、ロボットのデプロイが失敗します。

このスクリプトを $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 (ロボットのデプロイタイムアウト)] を指定します。個々のロボットへのデプロイは、指定された時間が経過する前に完了しない場合、停止します。

102

Page 110: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドデプロイジョブの表示

15. オプションで、[Download condition file in S3 (S3 のダウンロード条件ファイル)] を指定します。このファイルは、ロボットがデプロイメントをダウンロードしてインストールする準備ができていることを確認するために使用できるスクリプトです。たとえば、ロボットが充電ステーションにあり、タスク (オブジェクトの飛行や移動など) を実行していないかどうかを確認できます。

16. オプションで、[lock S3 file to the latest etag (S3 ファイルを最新の etag にロック)] できます。エンティティタグは Amazon S3 オブジェクトのハッシュであり、メタデータではなく、ファイルの内容に対する変更を反映します。選択すると、AWS RoboMaker はデプロイメント中にそのバージョンを使用するようにします。

17. 必要に応じて、[タグ] で、デプロイ用に 1 つ以上のタグを指定します。タグとは、AWS リソースを識別および整理するためのメタデータとして使用される単語やフレーズのことです。の各タグは、キーと値から構成されます。デプロイのタグは、[デプロイの詳細] ページで管理できます。

タグ付けの詳細については、AWS RoboMaker リソースにタグを付ける (p. 134) を参照してください。

18. [作成] をクリックしてデプロイジョブを作成します。

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"

デプロイジョブの表示デプロイジョブを作成すると、デプロイの詳細を表示し、デプロイのステータスを追跡できます。

デプロイジョブの詳細を表示するには

以下のいずれかのタブのステップに従ってください。

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 コマンドで実行する例は次のとおりです。

103

Page 111: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドデプロイジョブの表示

$ aws robomaker list-deployment-jobs$ aws robomaker describe-deployment-job --job my-deployment-job-arn

104

Page 112: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドデータ保護

セキュリティこのセクションでは、AWS RoboMaker のさまざまな側面を保護するためのガイドラインを示します。

トピック• AWS RoboMaker でのデータ保護 (p. 105)• AWS RoboMaker に対する認証とアクセスコントロール (p. 105)• AWS RoboMaker でのログ記録とモニタリング (p. 128)• セキュリティコンプライアンス (p. 132)• AWS RoboMaker の耐障害性 (p. 132)• AWS RoboMaker のインフラストラクチャセキュリティ (p. 133)

AWS RoboMaker でのデータ保護AWS RoboMaker は、データ保護の規制やガイドラインを含む AWS 責任共有モデルに準拠しています。AWS は、AWS のすべてのサービスを実行するグローバルなインフラストラクチャを保護する責任を担います。また、AWS は、カスタマーコンテンツおよび個人データを取り扱うためのセキュリティ構成の統制など、このインフラストラクチャ上でホストされるデータ管理を維持します。データコントローラーまたはデータプロセッサーとして機能する、AWS のお客様および APN パートナーは、AWS クラウドに保存された個人データに対する責任を担います。

データ保護目的の場合、AWS アカウント認証情報を保護して IAM (AWS Identity and AccessManagement) で個々のユーザーアカウントをセットアップし、そのユーザーに各自の職務を果たすために必要なアクセス許可のみが付与されるようにすることをお勧めします。また、以下の方法でデータを保護することをお勧めします。

• 各アカウントで多要素認証 (MFA) を使用します。• SSL/TLS を使用して AWS リソースと通信します。• AWS CloudTrail で API とユーザーアクティビティログをセットアップします。• AWS 暗号化ソリューションを、AWS サービス内のすべてのデフォルトのセキュリティ管理と一緒に使

用します。• Amazon Macie などの高度なマネージドセキュリティサービスを使用します。これにより、Amazon S3

に保存される個人データの検出と保護が支援されます。

顧客のアカウント番号などの機密の識別情報は、[名前] フィールドなどの自由形式のフィールドに配置しないことを強くお勧めします。これは、コンソール、API、AWS CLI、または AWS で AWS RoboMakerまたは他の AWS サービスを使用する場合も同様です。AWS RoboMaker または他のサービスに入力したデータはすべて、診断ログの内容として取得される可能性があります。外部サーバーへの URL を指定するときは、そのサーバーへのリクエストを検証するための認証情報を URL に含めないでください。

データ保護の詳細については、AWS セキュリティブログのブログ投稿「AWS の責任共有モデルとGDPR」を参照してください。

AWS RoboMaker に対する認証とアクセスコントロール

AWS Identity and Access Management (IAM) は、管理者が AWS RoboMaker リソースへのアクセスを安全にコントロールするために役立つ AWS のサービスです。管理者は、IAM を使用して AWS RoboMaker リ

105

Page 113: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド認証とアクセスコントロールの概要

ソースを使用するための認証済み (サインイン済み) および承認済み (アクセス許可の付与済み) のユーザーを管理します。IAM は追加料金なしで利用できる AWS アカウントの機能です。

Important

迅速に使用を開始するには、このページの入門情報を確認し、次に「IAM の開始方法 (p. 121)」を参照してください。必要に応じて、認証とアクセスコントロールについて、「認証とは (p. 112)」、「アクセスコントロールとは (p. 113)」、および「ポリシーとは (p. 116)」を参照してください。

トピック

• 認証とアクセスコントロールの概要 (p. 106)• 必要なアクセス許可 (p. 107)• AWS RoboMaker で IAM を使用する方法の概要 (p. 110)• 認証とアクセスコントロールのトラブルシューティング (p. 111)

認証とアクセスコントロールの概要認証 – AWS にサインインするには、IAM ユーザー認証情報、IAM ロールによる一時的な認証情報、ルートユーザー 認証情報 (推奨しません) のいずれかを使用する必要があります。これらのエンティティの詳細については、「認証とは (p. 112)」を参照してください。

アクセスコントロール – AWS 管理者は、ポリシーを使用して AWS RoboMaker robot application などのAWS リソースに対するアクセスをコントロールします。詳細については、「アクセスコントロールとは (p. 113)」と「ポリシーとは (p. 116)」を参照してください。

Important

アカウントのすべてのリソースは、その作成者を問わず、アカウントが所有します。リソースを作成するには、アクセス許可が必要です。ただし、リソースを作成しても、そのリソースへのフルアクセスが自動的に許可されるわけではありません。実行するアクションごとに、管理者から明示的にアクセス許可を得る必要があります。管理者は、アクセス許可を随時取り消すこともできます。

IAM の基本的な仕組みを理解するために、以下の用語に精通してください。

• リソース – AWS のサービス (AWS RoboMaker や IAM など) は、リソースと呼ばれるオブジェクトで構成されています。これらのリソースはサービスで作成、管理、および削除できます。IAM リソースには、ユーザー、グループ、ロール、ポリシーなどが含まれます。• ユーザー – IAM ユーザーは、認証情報を使用して AWS を操作する人またはアプリケーションです。

ユーザーは、AWS マネジメントコンソール にサインインするための名前とパスワード、さらに AWSCLI または AWS API で使用できる 2 つまでのアクセスキーで構成されます。

• グループ – IAM グループは IAM ユーザーの集合です。グループを使用して、そのメンバーユーザーのアクセス許可を指定できます。これにより、複数のユーザーのアクセス許可を簡単に管理できます。

• ロール – IAM ロールに長期の認証情報 (パスワードやアクセスキー) を関連付けることはできません。どのユーザーでも、アクセス許可があれば、ロールを引き受けることができます。IAM ユーザーは、ロールを引き受けることで、一時的に特定のタスクに対して異なるアクセス許可を取得することができます。フェデレーティッドユーザーは、ロールにマッピングされている外部の ID プロバイダーを使用してロールを引き受けることができます。AWS の一部のサービスは、サービスロールを引き受けることで、ユーザーの代わりに AWS リソースにアクセスできます。

• ポリシー – ポリシーは、そのアタッチ先のオブジェクトのアクセス許可を定義する JSON ポリシードキュメントです。AWS は、アイデンティティ (ユーザー、グループ、またはロール) にアタッチするアイデンティティベースのポリシーをサポートしています。AWS の一部のサービスでは、リ

106

Page 114: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド必要なアクセス許可

ソースにリソースベースのポリシーをアタッチして、プリンシパル (人またはアプリケーション) がそのリソースに対して何ができるかをコントロールできます。リソースベースのポリシーは、AWSRoboMaker does not support。

• アイデンティティ – アクセス許可を定義する対象の IAM リソースです。ユーザー、グループ、およびロールなどがあります。

• エンティティ – 認証に使用する IAM リソースです。ユーザーやロールなどがあります。• プリンシパル – AWS では、エンティティを通じて AWS にサインインしてリクエストを行う人または

アプリケーションです。プリンシパルは、AWS マネジメントコンソール、AWS CLI、または AWS APIを使用してオペレーション (robot application の削除など) を実行できます。これに伴って、そのオペレーションに対するリクエストが作成されます。リクエストでは、アクション、リソース、プリンシパル、プリンシパルアカウント、その他リクエストに関する情報を指定します。これらすべての情報は、リクエストのコンテキストを AWS に提供します。AWS は、リクエストのコンテキストに適用されるすべてのポリシーをチェックします。リクエストの各部分がポリシーで許可されている場合にのみ、AWSはリクエストを承認します。

認証とアクセスコントロールを示す図は、IAM ユーザーガイドの「IAM の詳細の理解」で確認できます。AWS でリクエストの許可/拒否を決定する詳しい方法については、IAM ユーザーガイドの「ポリシーの評価ロジック」を参照してください。

必要なアクセス許可AWS RoboMaker を使用したり、自分や他のユーザーの認証とアクセスコントロールを管理したりするには、適切なアクセス許可を持っている必要があります。

AWS RoboMaker コンソールを使用するために必要なアクセス許可AWS RoboMaker コンソールにアクセスするには、AWS アカウントの AWS RoboMaker リソースに関する詳細を表示して確認するための最小限のアクセス許可セットが必要です。最小限必要なアクセス許可よりも制限されたアイデンティティベースのアクセス許可ポリシーを作成すると、そのポリシーをアタッチしたエンティティに対してはコンソールが意図したとおりに機能しません。

AWS RoboMaker コンソールへのフルアクセスには、AWSRoboMakerFullAccess ポリシーを使用します。

AWS RoboMaker コンソールへの読み取り専用アクセスには、AWSRoboMakerReadOnlyAccess ポリシーを使用します。

IAM ユーザーがシミュレーションジョブを作成する場合は、そのユーザーに対して iam:PassRole アクセス許可を付与する必要があります。ロールの受け渡しの詳細については、「AWS サービスにロールを渡すアクセス許可をユーザーに許可する」を参照してください。

たとえば、ユーザーに次のポリシーをアタッチできます。このポリシーは、シミュレーションジョブを作成するアクセス許可を提供します。

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "iam:PassRole", "Resource": "arn:aws:iam::123456789012:role/S3AndCloudWatchAccess" } ]}

107

Page 115: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド必要なアクセス許可

AWS CLI または AWS API のみを呼び出すユーザーには、最小限のコンソールアクセス許可を付与する必要はありません。代わりに、実行する API オペレーションに対応するアクセス許可のみが必要です。

AWS RoboMaker シミュレーションツールを使用するために必要なアクセス権限シミュレーションを作成するために使用される IAM ユーザーまたはロールには、シミュレーションツールへのアクセス権限が自動的に与えられます。他のユーザーまたはロールの場合は、robomaker:CreateSimulationJob 権限を付与する必要があります。

認証の管理に必要なアクセス許可自分の認証情報 (パスワード、アクセスキー、多要素認証 (MFA) デバイスなど) を管理するには、管理者から必要なアクセス許可を取得する必要があります。これらのアクセス許可が含まれているポリシーを表示するには、「認証情報の自己管理をユーザーに許可する (p. 124)」を参照してください。

AWS 管理者は、IAM でユーザー、グループ、ロール、ポリシーを管理するために IAM へのフルアクセスが必要です。管理者は、AWS 全体へのフルアクセスが含まれている AWS AdministratorAccess 管理ポリシーを使用する必要があります。このポリシーは、AWS Billing and Cost Management コンソールへのアクセスを提供しません。また、ルートユーザー 認証情報を必要とするタスクを許可しません。詳細については、AWS General Referenceの「AWS アカウントのルートユーザー 認証情報が必要な AWS タスク」を参照してください。

Warning

AWS へのフルアクセスを持つのは、管理者ユーザーに限ります。このポリシーをアタッチされたユーザーは、だれでも、認証とアクセスコントロールを完全に管理するアクセス許可と、AWS のすべてのリソースを変更するアクセス許可を付与されます。このユーザーを作成する方法については、「IAM 管理者ユーザーを作成する (p. 121)」を参照してください。

アクセスコントロールに必要なアクセス許可管理者から 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",

108

Page 116: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド必要なアクセス許可

"iam:ListAttachedGroupPolicies", "iam:ListGroupPolicies", "iam:ListPolicyVersions", "iam:ListPolicies", "iam:ListUsers" ], "Resource": "*" } ]}

追加のアクセス許可が必要な場合は、管理者に依頼し、ポリシーを更新して必要なアクションへのアクセスを許可してもらいます。

シミュレーションジョブに必要なアクセス許可シミュレーションジョブは、作成時に、以下のアクセス許可のある IAM ロールを引き受ける必要があります。ロボットおよびシミュレーションアプリケーションバンドルが含まれるバケットの名前で my-input-bucket を置き換えます。AWS RoboMaker が出力ファイルを書き込むバケットを参照するようにmy-output-bucket を置き換えます。account# をアカウント番号に置き換えます。

{ "Version": "2012-10-17", "Statement": [ { "Action": "s3:ListBucket", "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" } ]}

109

Page 117: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドAWS RoboMaker で IAM を使用する方法

このポリシーは、以下の信頼ポリシーを使用してロールにアタッチする必要があります。

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "robomaker.amazonaws.com" }, "Action": "sts:AssumeRole" } ]}

ROS アプリケーションまたは ROS コマンドラインからタグを使用するために必要なアクセス許可シミュレーションジョブのタグ付け、タグ解除、一覧表示は、ROS コマンドラインまたは ROS アプリケーションの実行中に行うことができます。以下のアクセス許可を持つ IAM ロールが必要です。account# をアカウント番号に置き換えます。

詳細については、「シミュレーションジョブのタグの管理 (p. 71)」を参照してください。

{ "Version": "2012-10-17", "Statement": [ { "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 を使用できます。

110

Page 118: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド認証とアクセスコントロールのトラブルシューティング

• アクション – AWS RoboMaker はポリシーでのアクションの使用をサポートしています。これにより、管理者は、AWS RoboMaker でオペレーションを実行することをエンティティに許可するかどうかをコントロールできます。たとえば、ポリシーを表示するために GetPolicy AWS API オペレーションを実行することをエンティティに許可する場合、管理者は iam:GetPolicy アクションを許可するポリシーをアタッチする必要があります。

• リソースレベルのアクセス許可 – リソースレベルのアクセス許可は、AWS RoboMaker does notsupport。リソースレベルのアクセス許可では、ARN を使用してポリシーで個々のリソースを指定できます。 この機能は AWS RoboMaker でサポートされていないため、 ポリシービジュアルエディタ で[All resources (すべてのリソース)] を選択する必要があります。JSON ポリシードキュメントでは、* 要素に Resource を使用する必要があります。

• リソースベースのポリシー – リソースベースのポリシーは、AWS RoboMaker does not support。リソースベースのポリシーでは、サービス内のリソースにポリシーをアタッチできます。リソースベースのポリシーには、リソースにアクセスできる IAM アイデンティティを指定するための Principal 要素が含まれています。

• タグに基づいた許可 – タグに基づいた許可は、AWS RoboMaker does support。この機能により、ポリシーの条件でリソースタグを使用できます。

• 一時的な認証情報 – 一時的な認証情報は、AWS RoboMaker supports。この機能により、フェデレーションを使用してサインインし、IAM ロールまたはクロスアカウントロールを引き受けることができます。一時的なセキュリティ認証情報を取得するには、AssumeRole または GetFederationToken などのAWS STS API オペレーションを呼び出します。

• サービスにリンクされたロール – サービスにリンクされたロールは、AWS RoboMaker supports。この機能では、サービスにリンクされたロールをユーザーに代わって引き受けることをサービスに許可します。このロールにより、サービスはユーザーに代わって他のサービスのリソースにアクセスし、アクションを実行できます。サービスにリンクされたロールは、IAM アカウント内に表示され、サービスによって所有されます。IAM 管理者は、サービスにリンクされたロールのアクセス許可を表示できますが、編集することはできません。

• サービスのロール – サービスのロールは、AWS RoboMaker supports。この機能では、サービスのロールをユーザーに代わって引き受けることをサービスに許可します。このロールにより、サービスはユーザーに代わって他のサービスのリソースにアクセスし、アクションを実行できます。サービスのロールは、IAM アカウント内に表示され、サービスによって所有されます。つまり、IAM 管理者は、このロールのアクセス許可を変更できます。ただし、これにより、サービスの機能が損なわれる場合があります。

認証とアクセスコントロールのトラブルシューティング次の情報は、IAM の使用に伴って発生する可能性がある一般的な問題の診断や修復に役立ちます。

トピック• AWS RoboMaker でアクションを実行する権限がない (p. 111)• 管理者として AWS RoboMaker へのアクセスを他のユーザーに許可したい (p. 112)• IAM について専門的な内容ではなく、一般的な概要を知りたい (p. 112)

AWS RoboMaker でアクションを実行する権限がないアクションを実行する権限がないというエラーが AWS マネジメントコンソール に表示された場合は、ユーザー名とパスワードの提供元の管理者に問い合わせる必要があります。

次の例のエラーは、IAM ユーザー (my-user-name) がコンソールを使用して CreateRobotApplication アクションを実行する際に、アクセス許可がない場合に発生します。

111

Page 119: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド認証とは

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 にアクセスします。次に、AWS RoboMaker の適切なアクセス許可を付与するポリシーを、そのエンティティにアタッチする必要があります。

すぐに開始するには、「IAM の開始方法 (p. 121)」を参照してください。

IAM について専門的な内容ではなく、一般的な概要を知りたいIAM の用語、概念、および手順の詳細については、以下のページを参照してください。

• 認証とは (p. 112)• アクセスコントロールとは (p. 113)• ポリシーとは (p. 116)

認証とは認証は、認証情報を使用して AWS にサインインする方法です。

Note

すぐに開始するには、このページを無視できます。最初に、「AWS RoboMaker に対する認証とアクセスコントロール (p. 105)」で基本的な情報を確認し、次に「IAM の開始方法 (p. 121)」を参照してください。

プリンシパルとして AWS にリクエストを送信するには、エンティティ (ルートユーザー、IAM ユーザー、または IAM ロール) を使用して認証済み (AWS にサインイン済み) であることが必要です。IAM ユーザーは、ユーザー名とパスワード、アクセスキーのセットなど、長期的な認証情報を持つことができます。IAM ロールを引き受けると、一時的なセキュリティ認証情報が付与されます。

ユーザーとして AWS マネジメントコンソール から認証するには、ユーザー名とパスワードを使用してサインインする必要があります。AWS CLI または AWS API から認証するには、アクセスキーとシークレットキーを指定するか、一時的な認証情報を指定する必要があります。AWS は、認証情報を使用してリクエストを暗号で署名するための SDK および CLI ツールを提供しています。AWS ツールを使用しない場合は、リクエストに自分で署名する必要があります。使用する認証方法を問わず、追加のセキュリティ情報の提供を要求される場合もあります。たとえば、AWS では多要素認証 (MFA) を使用してアカウントのセキュリティを高めることを推奨しています。

プリンシパルとして、以下のエンティティ (ユーザーまたはロール) を使用して AWS にサインインできます。

• AWS アカウントのルートユーザー – AWS アカウントを初めて作成する場合は、このアカウントのすべての AWS サービスとリソースに対して完全なアクセス権限を持つシングルサインインアイデンティティで始めます。このアイデンティティは AWS アカウント ルートユーザー と呼ばれ、アカウントの作成に使用した E メールアドレスとパスワードでのサインインによりアクセスします。強くお勧めしているのは、日常的なタスクには、それが管理者タスクであっても、ルートユーザーを使用しないことで

112

Page 120: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドアクセスコントロールとは

す。代わりに、最初の IAM ユーザーを作成するためだけに ルートユーザー を使用するというベストプラクティスに従います。その後、ルートユーザー認証情報を安全な場所に保管し、それらを使用して少数のアカウントおよびサービス管理タスクのみを実行します。

• IAM ユーザー – IAM ユーザーは、特定のアクセス許可を持つ、AWS アカウント内のエンティティです。AWS RoboMaker supports 署名バージョン 4 は、インバウンド API リクエストを認証するためのプロトコルです。リクエストの認証の詳細については、『AWS General Reference』の「署名バージョン4 の署名プロセス」を参照してください。

• IAM ロール – IAM ロールは、特定のアクセス権限を持ち、アカウントで作成できる IAM アイデンティティです。IAM ロールは、AWS で許可/禁止する操作を決めるアクセス権限ポリシーが関連付けられている AWS アイデンティティであるという点で、IAM ユーザーと似ています。ただし、ユーザーは 1 人の特定の人に一意に関連付けられますが、ロールはそれを必要とする任意の人が引き受けるようになっています。また、ロールには標準の長期認証情報 (パスワードやアクセスキーなど) も関連付けられません。代わりに、ロールを引き受けると、ロールセッション用の一時的なセキュリティ認証情報が提供されます。 IAM ロールと一時的な認証情報は、次の状況で役立ちます。• フェデレーティッドユーザーアクセス – IAM ユーザーを作成する代わりに、AWS Directory Service、

エンタープライズユーザーディレクトリ、またはウェブ ID プロバイダーに既存のアイデンティティを使用できます。このようなユーザーはフェデレーティッドユーザーと呼ばれます。AWS では、IDプロバイダーを通じてアクセスがリクエストされたとき、フェデレーティッドユーザーにロールを割り当てます。フェデレーティッドユーザーの詳細については、IAM ユーザーガイドの「フェデレーティッドユーザーとロール」を参照してください。

• 一時的なユーザーアクセス許可 – IAM ユーザーは、特定のタスクに対して複数の異なるアクセス許可を一時的にロールで引き受けることができます。

• クロスアカウントアクセス – IAM ロールを使用して、自分のアカウントのリソースにアクセスすることを別のアカウントの信頼済みプリンシパルに許可できます。ロールは、クロスアカウントアクセスを許可する主な方法です。ただし、AWS の一部のサービスでは、(ロールをプロキシとして使用する代わりに) リソースに直接ポリシーをアタッチできます。AWS RoboMaker does not supportロールとリソースベースのポリシーのいずれを使用してクロスアカウントアクセスを許可するかの詳細については、「別のアカウント内のプリンシパルに対するアクセスコントロール (p. 116)」を参照してください。

• AWS のサービスのアクセス – サービスロールは、サービスがお客様に代わってお客様のアカウントでアクションを実行するために引き受ける IAM ロールです。一部の AWS のサービス環境を設定するときに、サービスが引き受けるロールを定義する必要があります。このサービスロールには、サービスが必要とする AWS のリソースにサービスがアクセスするために必要なすべてのアクセス権限を含める必要があります。サービスロールはサービスによって異なりますが、多くのサービスロールでは、そのサービスの文書化された要件を満たしている限り、アクセス権限を選択することができます。サービスロールは、お客様のアカウント内のみでアクセスを提供します。他のアカウントのサービスへのアクセス権を付与するためにサービスロールを使用することはできません。IAM 内部からロールを作成、修正、削除できます。たとえば、Amazon Redshift がお客様に代わって Amazon S3 バケットにアクセスし、バケットからデータを Amazon Redshift クラスターにロードすることを許可するロールを作成できます。詳細については、IAM ユーザーガイドのAWS サービスにアクセス権限を委任するロールの作成を参照してください。

• Amazon EC2 で実行中のアプリケーション – IAM ロールを使用して、EC2 インスタンスで実行され、AWS CLI または AWS API リクエストを作成しているアプリケーションの一時的な認証情報を管理できます。これは、EC2 インスタンス内でのアクセスキーの保存に推奨されます。AWS ロールを EC2 インスタンスに割り当て、そのすべてのアプリケーションで使用できるようにするには、インスタンスにアタッチされたインスタンスプロファイルを作成します。インスタンスプロファイルにはロールが含まれ、EC2 インスタンスで実行されるプログラムは一時認証情報を取得することができます。詳細については、IAM ユーザーガイドの「Amazon EC2 インスタンスで実行されるアプリケーションに IAM ロールを使用してアクセス権限を付与する」を参照してください。

アクセスコントロールとはAWS にサインイン (認証) した後では、AWS リソースおよびオペレーションへのアクセスはポリシーを使用してコントロールされます。アクセスコントロールは承認とも呼ばれます。

113

Page 121: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドアクセスコントロールとは

Note

すぐに開始するには、このページを無視できます。最初に、「AWS RoboMaker に対する認証とアクセスコントロール (p. 105)」で基本的な情報を確認し、次に「IAM の開始方法 (p. 121)」を参照してください。

承認の際に、AWS はリクエストコンテキストの値を使用して該当するポリシーを確認します。次に、ポリシーを使用してリクエストの許可または拒否を決定します。大半のポリシーは、JSON ドキュメントとして AWS に保存され、プリンシパルに対して許可または拒否するアクセス許可を指定します。JSON ポリシードキュメントの構造と内容の詳細については、「ポリシーとは (p. 116)」を参照してください。

ポリシーにより、管理者は AWS リソースへのアクセスを許可するユーザーと、これらのリソースに対してユーザーが実行できるアクションを指定できます。すべての IAM エンティティ (ユーザーまたはロール) は、アクセス許可のない状態からスタートします。言い換えると、デフォルト設定では、ユーザーは何もできず、そのユーザーのアクセスキーを参照することすらできません。何かを実行するアクセス許可をユーザーに付与するには、管理者がユーザーにアクセス許可ポリシーをアタッチする必要があります。または、必要なアクセス許可がアタッチ済みであるグループにユーザーを追加できます。次に、管理者がグループにアクセス許可を付与すると、このアクセス許可はグループ内のすべてのユーザーに付与されます。

リクエストを認証できる有効な認証情報がある場合でも、管理者からアクセス許可が付与されない限り、AWS RoboMaker リソースを作成したり、これらのリソースにアクセスしたりすることはできません。たとえば、AWS RoboMaker robot application を作成するには明示的なアクセス許可が必要です。

管理者は、以下へのアクセスをコントロールするポリシーを作成できます。

• AWS (プリンシパル対象) (p. 114) – リクエスト者 (プリンシパル) に許可する操作をコントロールします。

• IAM アイデンティティ (p. 114) – どの IAM アイデンティティ (グループ、ユーザー、ロール) にどのようにアクセスできるかをコントロールします。

• IAM ポリシー (p. 115) – だれがカスタマー管理ポリシーを作成、編集、削除でき、だれがすべての管理ポリシーをアタッチおよびデタッチできるかをコントロールします。

• AWS リソース (p. 115) – アイデンティティベースのポリシーまたはリソースベースのポリシーを使用してだれがリソースにアクセスできるかをコントロールします。

• AWS アカウント (p. 116) – リクエストを特定のアカウントのメンバーにのみ許可するかどうかをコントロールします。

プリンシパルのアクセスコントロールアクセス許可ポリシーは、プリンシパルに実行することを許可する操作をコントロールします。管理者は、アクセス許可を付与するアイデンティティ (ユーザー、グループ、またはロール) に対して、アイデンティティベースのアクセス許可ポリシーをアタッチする必要があります。アクセス許可ポリシーでは、AWS へのアクセスを許可または拒否します。管理者は、IAM エンティティ (ユーザーまたはロール)のアクセス許可の境界を設定して、エンティティに付与できるアクセス許可の上限を定義することもできます。アクセス許可の境界は IAM のアドバンスド機能です。アクセス許可の境界の詳細については、IAMユーザーガイドの「IAM アイデンティティのアクセス許可の境界」を参照してください。

AWS へのプリンシパルのアクセスコントロールの詳細と例については、IAM ユーザーガイドの「プリンシパルのアクセスコントロール」を参照してください。

アイデンティティへのアクセスコントロール管理者は、ポリシーを作成して IAM アイデンティティ (ユーザー、グループ、またはロール) に対する操作をコントロールできます。このポリシーにより、アイデンティティに対して実行できる操作や、アイデン

114

Page 122: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドアクセスコントロールとは

ティティにアクセスできるユーザーを制限します。次に、このポリシーを、アクセス許可を付与するアイデンティティにアタッチします。

たとえば、管理者は、特定の 3 ユーザーのパスワードをリセットすることを許可できます。この場合、管理者は IAM ユーザーにポリシーをアタッチします。このポリシーにより、ユーザー自身と特定の 3 ユーザーの ARN を持つユーザーのパスワードに限り、リセットすることを許可します。これにより、チームメンバーのパスワードはリセットできますが、他の IAM ユーザーのパスワードはリセットできません。

ポリシーを使用したアイデンティティへの AWS アクセスコントロールの詳細と例については、IAM ユーザーガイドの「アイデンティティへのアクセスコントロール」を参照してください。

ポリシーへのアクセスコントロール管理者は、だれがカスタマー管理ポリシーを作成、編集、削除でき、だれがすべての管理ポリシーをアタッチおよびデタッチできるかをコントロールできます。ポリシーを確認する場合、そのポリシー内の各サービスのアクセスレベルの要約を含むポリシー概要を表示できます。AWS は、各サービスのアクションを、各アクションが実行する内容に基づいて、4 つのアクセスレベル(List、Read、Write、Permissions management) のいずれかに分類します。これらのアクセスレベルを使用して、ポリシーに含めるアクションを判断できます。詳細については、IAM ユーザーガイドの「ポリシー概要内のアクセスレベルの概要について」を参照してください。

Warning

アカウントの Permissions Management アクセスレベルのアクセス許可は、制限する必要があります。制限しないと、アカウントのメンバーは各自のポリシーを作成するときに必要以上のアクセス許可を使用できるようになります。または、AWS へのフルアクセスを使用して個別のユーザーを作成できます。

ポリシーへの AWS アクセスコントロールの詳細と例については、IAM ユーザーガイドの「ポリシーへのアクセスコントロール」を参照してください。

リソースへのアクセスコントロール管理者は、アイデンティティベースのポリシーまたはリソースベースのポリシーを使用してリソースへのアクセスをコントロールできます。アイデンティティベースのポリシーでは、ポリシーをアイデンティティにアタッチし、そのアイデンティティがアクセスできるリソースを指定します。リソースベースのポリシーでは、制御するリソースにポリシーをアタッチします。ポリシーでは、リソースにアクセスできるプリンシパルを指定します。

詳細については、IAM ユーザーガイドの「リソースへのアクセスコントロール」を参照してください。

リソース作成者であっても自動的にアクセス許可を有するわけではない

アカウントのすべてのリソースは、その作成者を問わず、アカウントが所有します。AWS アカウントのルートユーザー はアカウント所有者です。アカウント内のリソースに対してあらゆるアクションを実行するアクセス許可を持ちます。

Important

日常的なタスクには (それが管理者タスクであっても)、ルートユーザー を使用しないよう強くお勧めします。代わりに、最初の IAM ユーザーを作成するためだけに ルートユーザー を使用するというベストプラクティスに従います。その後、ルートユーザー認証情報を安全な場所に保管し、それらを使用して少数のアカウントおよびサービス管理タスクのみを実行します。ルートユーザー としてサインインする必要があるタスクを確認するには、「AWS アカウントのルートユーザーが必要な AWS のタスク」を参照してください。

アカウントのエンティティ (ユーザーまたはロール) には、リソースを作成するためのアクセス権を付与する必要があります。ただし、リソースを作成しても、そのリソースへのフルアクセスが自動的に許可され

115

Page 123: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドポリシーとは

るわけではありません。アクションごとに明示的にアクセス許可を付与する必要があります。ユーザーとロールのアクセス許可を管理する権限を保持する管理者は、アクセス許可をいつでも却下できます。

別のアカウント内のプリンシパルに対するアクセスコントロール管理者は、AWS リソースベースのポリシー、IAM クロスアカウントロール、または AWS Organizationsサービスを使用して、自分のアカウント内のリソースにアクセスすることを別のアカウント内のプリンシパルに許可できます。

一部の AWS サービスでは、リソースに対するクロスアカウントアクセス許可を付与できます。これを行うには、プロキシとしてロールを使用する代わりに、共有するリソースに直接ポリシーをアタッチします。このポリシータイプをサービスでサポートしている場合、共有するリソースもリソースベースのポリシーをサポートしている必要があります。ユーザーベースのポリシーとは異なり、リソースベースのポリシーでは、だれがリソースにアクセスできるかを、AWS アカウント ID 番号のリストの形式で指定します。リソースベースのポリシーは、AWS RoboMaker does not support。

クロスアカウントアクセスには、ロールを使うよりも、リソースベースのポリシーを使うほうがいくつかの点で有利です。リソースベースのポリシーによってリソースにアクセスする場合、プリンシパル (人またはアプリケーション) は依然として信頼されたアカウントで作業を行います。ロールのアクセス許可を取得する代わりに自身のアクセス許可が無効になることはありません。つまり、プリンシパルは、信頼される側のアカウントおよび信頼する側のアカウントの両方で、同時にリソースへのアクセス権を保持します。これは、2 つのアカウント間で情報をコピーする場合などに便利です。クロスアカウントのロールの使用の詳細については、IAM ユーザーガイドの「所有している別の AWS アカウントへのアクセスを IAMユーザーに許可」を参照してください。

AWS Organizations は、ユーザーが所有している複数の AWS アカウントに対してポリシーベースの管理を提供します。Organizations では、アカウントのグループを作成し、アカウントの作成を自動化して、これらのグループにポリシーを適用して管理することができます。Organizations により、カスタムスクリプトや手動プロセスを必要とすることなく、複数のアカウントをまたいでポリシーを一元管理できます。AWS Organizations では、複数の AWS アカウントをまたいで AWS のサービスの使用を一元管理するサービスコントロールポリシー (SCP) を作成できます。詳細については、AWS Organizations ユーザーガイドの「AWS Organizations とは」を参照してください。

ポリシーとはAWS でアクセスをコントロールするには、ポリシーを作成して IAM アイデンティティや AWS リソースにアタッチします。

Note

すぐに開始するには、このページを無視できます。最初に、「AWS RoboMaker に対する認証とアクセスコントロール (p. 105)」で基本的な情報を確認し、次に「IAM の開始方法 (p. 121)」を参照してください。

ポリシー は AWS のオブジェクトであり、エンティティやリソースに関連付けて、これらのアクセス許可を定義します。AWS は、ユーザーなどのプリンシパルがリクエストを行ったときに、それらのポリシーを評価します。ポリシーでのアクセス許可により、リクエストが許可されるか拒否されるかが決まります。大半のポリシーは JSON ドキュメントとして AWS に保存されます。

IAM ポリシーは、オペレーションの実行方法を問わず、アクションのアクセス許可を定義します。たとえば、GetUser アクションを許可するポリシーを適用されたユーザーは、AWS マネジメントコンソール、AWS CLI、または AWS API からユーザー情報を取得できます。IAM ユーザーを作成したら、コンソールまたはプログラムによるアクセスを許可するようにユーザーを設定できます。IAM は、ユーザー名とパスワードを使用してコンソールにサインインできます。または、アクセスキーを使用して CLI またはAPI を操作できます。

以下のポリシータイプ (頻度順) は、リクエストが承認されるかどうかに影響する場合があります。詳細については、IAM ユーザーガイドの「ポリシータイプ」を参照してください。

116

Page 124: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドポリシーとは

• アイデンティティベースのポリシー – 管理ポリシーとインラインポリシーを IAM アイデンティティ(ユーザー、ユーザーの所属グループ、およびロール) にアタッチできます。

• リソースベースのポリシー – AWS の一部のサービスのリソースにインラインポリシーをアタッチできます。リソースベースのポリシーとして最も一般的な例は、Amazon S3 バケットポリシーと IAM ロールの信頼ポリシーです。リソースベースのポリシーは、AWS RoboMaker does not support。

• 組織の SCP – AWS Organizations サービスコントロールポリシー (SCP) を使用して、アクセス許可の境界を AWS Organizations 組織または組織単位 (OU) に適用できます。これらのアクセス許可は、メンバーアカウント内のすべてのエンティティに適用されます。

• アクセスコントロールリスト (ACL) – ACL を使用してリソースにアクセスできるプリンシパルをコントロールできます。ACL は、リソースベースのポリシーと似ていますが、JSON ポリシードキュメント構造を使用しない唯一のポリシータイプです。ACL は、AWS RoboMaker does not support。

これらのポリシータイプは、アクセス許可ポリシーまたはアクセス許可の境界として分類できます。

• アクセス許可ポリシー – AWS 内のリソースにアクセス許可ポリシーをアタッチし、そのリソースのアクセス許可を定義できます。AWS では、1 つのアカウント内のすべてのアクセス許可ポリシーがまとめて評価されます。アクセス許可ポリシーは、最も一般的なポリシーです。アクセス許可ポリシーとして、以下のポリシータイプを使用できます。• アイデンティティベースのポリシー – 管理ポリシーまたはインラインポリシーを IAM ユーザー、グ

ループ、またはロールにアタッチすると、そのエンティティに対するアクセス許可がポリシーで定義されます。

• リソースベースのポリシー – JSON ポリシードキュメントをリソースにアタッチするときに、そのリソースに対するアクセス許可を定義します。サービスでリソースベースのポリシーをサポートしている必要があります。

• アクセスコントロールリスト (ACL) – ACL をリソースにアタッチするときに、そのリソースに対するアクセス許可を持つプリンシパルのリストを定義します。リソースで ACL をサポートしている必要があります。

• アクセス許可の境界 – ポリシーを使用してエンティティ (ユーザーまたはロール) のアクセス許可の境界を定義できます。アクセス許可の境界では、エンティティに付与できるアクセス許可の上限をコントロールします。アクセス許可の境界は AWS のアドバンスド機能です。複数のアクセス許可の境界がリクエストに適用される場合、AWS は各アクセス許可の境界を個別に評価します。アクセス許可の境界は以下の状況で適用できます。• 組織 – AWS Organizations サービスコントロールポリシー (SCP) を使用して、アクセス許可の境界を

AWS Organizations 組織または組織単位 (OU) に適用できます。• IAM ユーザーまたはロール – ユーザーまたはロールのアクセス許可の境界として管理ポリシーを使用

できます。詳細については、IAM ユーザーガイドの「IAM エンティティのアクセス許可の境界」を参照してください。

トピック• アイデンティティベースのポリシー (p. 117)• リソースベースのポリシー (p. 118)• ポリシーのアクセスレベルの分類 (p. 118)

アイデンティティベースのポリシーポリシーを IAM アイデンティティにアタッチできます。たとえば、次の操作を実行できます。

• アカウントのユーザーまたはグループにアクセス許可ポリシーをアタッチする – a robot applications などの AWS RoboMaker リソースを作成するアクセス許可を付与するには、ユーザーまたはユーザーが所属するグループにアクセス許可ポリシーをアタッチできます。

• アクセス許可ポリシーをロールにアタッチする (クロスアカウントのアクセス許可を付与する) – アイデンティティベースのアクセス許可ポリシーを IAM ロールにアタッチして、クロスアカウントのアクセス

117

Page 125: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドポリシーとは

許可を付与することができます。たとえば、アカウント A の管理者は、次のように別の AWS アカウント (たとえば、アカウント B) または AWS サービスにクロスアカウントアクセス許可を付与するロールを作成できます。1. アカウント A の管理者は、IAM ロールを作成して、アカウント A のリソースへのアクセスを許可す

るアクセス許可ポリシーをそのロールにアタッチします。2. アカウント A の管理者は、アカウント B をそのロールを引き受けるプリンシパルとして識別する

ロールに、信頼ポリシーをアタッチします。3. アカウント B の管理者は、アカウント B のユーザーにロールを引き受ける権限を委任できるように

なります。これにより、アカウント B のユーザーはアカウント A のリソースの作成とアクセスができます。ロールを引き受ける権限を AWS のサービスに付与すると、信頼ポリシー内のプリンシパルも AWS のサービスのプリンシパルとなることができます。

IAM を使用したアクセス許可の委任の詳細については、『IAM ユーザーガイド』の「アクセス管理」を参照してください。

ユーザー、グループ、ロール、アクセス権限の詳細については、IAM ユーザーガイド の「アイデンティティ (ユーザー、グループ、ロール)」を参照してください。

リソースベースのポリシーリソースベースのポリシーは、リソースにアタッチする JSON ポリシードキュメントです。これらのポリシーでは、指定されたプリンシパルがリソースに対して実行できるアクションと実行条件を指定できます。リソースベースのポリシーとして最も広く知られているのは Amazon S3 バケットです。リソースベースのポリシーは、リソース固有のインラインポリシーです。マネージド型のリソースベースのポリシーはありません。

リソースベースのポリシーを使用して他の 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 アクセスレベルがあります。

ヒント

AWS アカウントのセキュリティを強化するには、Permissions management アクセスレベル分類を含むポリシーを制限したり定期的にモニタリングしたりします。

118

Page 126: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドサービスにリンクされたロールの使用

• Tagging – サービス内のリソースにアタッチされているタグを作成、削除、または変更するアクセス許可を提供します。たとえば、Amazon EC2 の CreateTags アクションおよび 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 サービス」を参照の上、「サービスにリンクされたロール」列が「はい」になっているサービスを検索してください。サービスにリンクされたロールに関するドキュメントをサービスで表示するには、[はい] リンクを選択します。

AWS RoboMaker のサービスにリンクされたロールのアクセス許可AWS RoboMaker では、サービスにリンクされたロールとして AWSServiceRoleForRoboMaker – AllowsRoboMaker to access EC2, Greengrass, and Lambda resources on your behalf を使用します。

AWSServiceRoleForRoboMaker サービスにリンクされたロールは、ロールを引き受ける上で次のサービスを信頼します。

• robomaker.amazonaws.com

ロールのアクセス権限ポリシーは、指定したリソースに対して以下のアクションを実行することを AWSRoboMaker に許可します。

• シミュレーションジョブバッチの一部として作成されたシミュレーションジョブを作成および取り消す• Amazon EC2 ネットワーキングリソースを管理する• AWS IoT Greengrass デプロイを管理する

IAM エンティティ (ユーザー、グループ、ロールなど) がサービスにリンクされたロールを作成、編集、削除できるようにするには、アクセス権限を設定する必要があります。詳細については、IAM ユーザーガイドの「サービスにリンクされたロールのアクセス許可」を参照してください。

119

Page 127: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドサービスにリンクされたロールの使用

AWS RoboMaker のサービスにリンクされたロールの作成サービスにリンクされたロールを手動で作成する必要はありません。SimulationJob またはDeploymentJob を AWS マネジメントコンソール、AWS CLI、AWS API のいずれかで実行すると、AWSRoboMaker でサービスにリンクされたロールが自動的に作成されます。

このサービスにリンクされたロールを削除した後で再度作成する必要が生じた場合は、同じ方法でアカウントにロールを再作成できます。SimulationJob、SimulationJobBatch、または DeploymentJob を作成すると、AWS RoboMaker でサービスにリンクされたロールが自動的に再作成されます。

[RoboMaker] ユースケースでサービスにリンクされたロールを作成するには、IAM コンソールを使用します。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 Regions and Endpoints」を参照してください。

AWS RoboMaker は、サービスを利用できるすべてのリージョンで、サービスにリンクされたロールの使用をサポートしているわけではありません。以下のリージョンでは、AWSServiceRoleForRoboMaker ロールを使用できます。

リージョン名 リージョン識別子 AWS RoboMakerでのサポート

米国東部(バージニア北部) us-east-1 はい

120

Page 128: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドIAM の開始方法

リージョン名 リージョン識別子 AWS RoboMakerでのサポート

米国東部 (オハイオ) us-east-2 はい

米国西部 (北カリフォルニア) us-west-1 あり

米国西部 (オレゴン) us-west-2 あり

アジアパシフィック (ムンバイ) ap-south-1 あり

アジアパシフィック (大阪: ローカル) 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 いいえ

IAM の開始方法AWS Identity and Access Management (IAM) は、サービスとリソースへのアクセスを安全に管理できるAWS のサービスです。IAM は、追加料金なしで提供される AWS アカウントの機能です。

Note

IAM を開始する前に、「AWS RoboMaker に対する認証とアクセスコントロール (p. 105)」の基本情報に目を通してください。

AWS アカウントを初めて作成する場合は、このアカウントのすべての AWS サービスとリソースに対して完全なアクセス権限を持つシングルサインインアイデンティティで始めます。このアイデンティティはAWS アカウント ルートユーザー と呼ばれ、アカウントの作成に使用した E メールアドレスとパスワードでのサインインによりアクセスします。強くお勧めしているのは、日常的なタスクには、それが管理者タスクであっても、ルートユーザーを使用しないことです。代わりに、最初の IAM ユーザーを作成するためだけに ルートユーザー を使用するというベストプラクティスに従います。その後、ルートユーザー認証情報を安全な場所に保管し、それらを使用して少数のアカウントおよびサービス管理タスクのみを実行します。

IAM 管理者ユーザーを作成する自分用の管理者ユーザーを作成し、そのユーザーを管理者グループに追加するには (コンソール)

1. ルートユーザー を選択し AWS アカウントの E メールアドレスを入力して、アカウントの所有者としてIAM コンソールにサインインします。次のページでパスワードを入力します。

121

Page 129: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドIAM の開始方法

Note

以下のAdministratorIAMユーザーの使用に関するベストプラクティスに従い、ルートユーザー認証情報を安全な場所に保管しておくことを強くお勧めします。ルートユーザーとしてサインインして、少数のアカウントおよびサービス管理タスクのみを実行します。

2. ナビゲーションペインで [Users]、[Add user] の順に選択します。3. [ユーザー名] に「Administrator」と入力します。4. [AWS マネジメントコンソール access (アクセス)] の横にあるチェックボックスをオンにします。

[Custom password (カスタムパスワード)] を選択し、その後テキストボックスに新しいパスワードを入力します。

5. (オプション) AWS では、デフォルトで、新しいユーザーに対して初回のサインイン時に新しいパスワードを作成することが必要です。必要に応じて [User must create a new password at next sign-in(ユーザーは次回のサインイン時に新しいパスワードを作成する必要がある)] のチェックボックスをオフにして、新しいユーザーがサインインしてからパスワードをリセットできるようにできます。

6. [Next: Permissions (次へ: アクセス許可)] を選択します。7. [Set permissions (アクセス許可の設定)] で、[Add user to group (ユーザーをグループに追加)] を選択し

ます。8. [Create group] を選択します。9. [グループの作成] ダイアログボックスで、[グループ名] に「Administrators」と入力します。10. [Filter policies (フィルタポリシー)] を選択し、その後 [AWS managed -job function (AWS 管理ジョブ

の機能] を選択してテーブルのコンテンツをフィルタリングします。11. ポリシーリストで、[AdministratorAccess] のチェックボックスをオンにします。次に、[Create group]

を選択します。

Note

AdministratorAccess アクセス許可を使用して、AWS Billing and Cost Management コンソールを使用する前に、IAM ユーザーおよびロールの請求へのアクセスをアクティブ化する必要があります。これを行うには、請求コンソールへのアクセスの委任に関するチュートリアルのステップ 1 の手順に従ってください。

12. グループのリストに戻り、新しいグループのチェックボックスをオンにします。必要に応じて[Refresh] を選択し、リスト内のグループを表示します。

13. [次へ: タグ] を選択します。14. (オプション) タグをキー - 値のペアとしてアタッチして、メタデータをユーザーに追加します。IAM

でのタグの使用の詳細については、『IAM ユーザーガイド』の「IAM エンティティのタグ付け」を参照してください。

15. [Next: Review] を選択して、新しいユーザーに追加するグループメンバーシップのリストを表示します。続行する準備ができたら、[Create user] を選択します。

この同じプロセスを繰り返して新しいグループとユーザーを作成し、AWS アカウントのリソースへのアクセス権をユーザーに付与できます。ポリシーを使用して特定の AWS リソースに対するユーザーのアクセス許可を制限する方法については、「アクセス管理」と「ポリシーの例」を参照してください。

AWS RoboMaker の委任ユーザーを作成するAWS アカウントの複数のユーザーをサポートするには、許可するアクションのみ他のユーザーが実行できるようにアクセス許可を委任する必要があります。そのためには、そのようなユーザーが必要なアクセス許可を持つ IAM グループを作成し、IAM ユーザーの作成時に必要なグループに追加します。このプロセスを使用して、AWS アカウント全体のグループ、ユーザー、およびアクセス許可を設定できます。このソリューションは、AWS 管理者が手動でユーザーやグループを管理する中小企業で最もよく使用されます。大規模な組織では、カスタムの IAM ロール、フェデレーション、またはシングルサインオンを使用できます。

122

Page 130: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドIAM の開始方法

次のタスクでは、arnav、carlos、martha という 3 つのユーザーを作成し、my-example-robot-application という grants permission to create a robot application ポリシーをアタッチします。ただし、このポリシーの存続期間は 30 日以内です。以下に示す手順を使用して、さまざまなアクセス許可を持つユーザーを追加できます。

委任ユーザーを作成するには (コンソール)

1. AWS マネジメントコンソール にサインインし、IAM コンソール(https://console.aws.amazon.com/iam/)を開きます。

2. ナビゲーションペインで [ユーザー]、[ユーザーを追加] の順に選択します。3. [ユーザー名] に「arnav」と入力します。4. [別のユーザーの追加] を選択し、2 番目のユーザーの名前として「carlos」と入力します。さらに

[別のユーザーの追加] を選択し、3 番目のユーザーの名前として「martha」と入力します。5. [AWS マネジメントコンソール アクセス] の横にあるチェックボックスをオンにし、[Autogenerated

password (自動生成パスワード)] を生成します。6. 新しいユーザーがサインインしてからパスワードをリセットできるようにするには、必要に応じて

[User must create a new password at next sign-in (ユーザーは次回のサインイン時に新しいパスワードを作成する必要がある)] のチェックボックスをオフにします。

7. [Next: Permissions (次へ: アクセス許可)] を選択します。8. [Attach existing policies directly (既存のポリシーを直接アタッチ)] を選択します。ユーザーの新しい管

理ポリシーを作成します。9. [ポリシーの作成] を選択します。

[ポリシーの作成] ウィザードが新しいタブまたはブラウザウィンドウで開きます。10. [Visual editor (ビジュアルエディタ)] タブで、[Choose a service (サービスの選択)] を選択します。次

に、[AWS RoboMaker] を選択します。上部の検索ボックスを使用して、サービスのリストの結果を制限することができます。

[Service (サービス)] セクションが閉じ、[Actions (アクション)] セクションが自動的に開きます。11. 許可する AWS RoboMaker のアクションを選択します。たとえば、grants permission to create

a robot application するには、[Filter actions (アクションのフィルタ)] テキストボックスに「CreateRobotApplication」と入力します。AWS RoboMaker アクションのリストがフィルタ処理されたら、[CreateRobotApplication] の横にあるチェックボックスをオンにします。

AWS RoboMaker のアクションがアクセスレベル別にグループ化され、各アクションが提供するアクセスのレベルをすばやく簡単に判断できます。詳細については、「ポリシーのアクセスレベルの分類 (p. 118)」を参照してください。

12. 前のステップで選択したアクションが特定のリソースの選択をサポートしていない場合は、[Allresources (すべてのリソース)] が選択されます。その場合、このセクションを編集することはできません。

リソースレベルのアクセス許可をサポートするアクションを 1 つ以上選択すると、これらのリソースタイプがビジュアルエディタの [Resources (リソース)] セクションに一覧表示されます。[You choseactions that require the robot application resource type (ワークロードのリソースタイプを必要とするアクションを選択しました)] を選択し、ポリシーの特定の robot application を入力するかどうかを選択します。

13. すべてのリソースに対する CreateRobotApplication アクションを許可する場合は、[Allresources (すべててのリソース)] を選択します。

リソースを指定する場合は、[Add ARN (ARN の追加)] を選択します。region and account ID(or account ID) を指定 (または [Any (すべて)] を選択) して、リソースの my-example-robot-application を入力します。次に、[Add (追加)] を選択します。

14. [Specify request conditions (optional) (リクエスト条件の指定 (省略可能))] を選択します。15. [Add condition (条件の追加)] を選択し、以後 7 日間以内に grants permission to create a robot

application します。今日の日付が 2019 年 1 月 1 日であるとします。

123

Page 131: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドIAM の開始方法

16. [Condition Key (条件キー)] で、[aws:CurrentTime] を選択します。この条件キーでは、ユーザーによるリクエストの日時をチェックします。日時が指定した範囲内にある場合に限り、true が返されます (したがって、CreateRobotApplication アクションが許可されます)。

17. [Qualifier (限定条件)] は、デフォルト値のままにします。18. 許可された日時範囲の開始を指定するには、[Operator (演算子)] の [DateGreaterThan] を選択します。

次に、[Value (値)] に「2019-01-01T00:00:00Z」と入力します。19. [Add (追加)] を選択して条件を保存します。20. [Add another condition (別の条件の追加)] を選択して終了日を指定します。21. 同様のステップに従って、許可された日時範囲の終了を指定します。[Condition Key (条件キー)] で、

[aws:CurrentTime] を選択します。[Operator (演算子)] で、[DateLessThan] を選択します。[Value (値)]に、最初の日から 7 日後の日付である「2019-01-06T23:59:59Z」を入力します。次に [Add (追加)] を選択して条件を保存します。

22. (省略可能) 作成するポリシーの JSON ポリシードキュメントを表示するには、[JSON] タブを選択します。いつでも [Visual editor (ビジュアルエディタ)] タブと [JSON] タブを切り替えることができます。ただし、[Visual editor (ビジュアルエディタ)] タブで [ポリシーの確認] を変更または選択した場合、IAM はポリシーを再構成してビジュアルエディタに合わせて最適化することがあります。詳細については、IAM ユーザーガイドの「ポリシーの再構成」を参照してください。

23. 完了したら、[ポリシーの確認] を選択します。24. [Review policy (ポリシーの確認)] ページで、[Name (名前)] に

「CreateRobotApplicationPolicy」と入力し、[Description (説明)] に「Policy to grantspermission to create a robot application」と入力します。ポリシー概要を確認して、目的のアクセス許可を付与していることを確認し、[ポリシーの作成] を選択して新しいポリシーを保存します。

25. 元のタブまたはウィンドウに戻り、ポリシーのリストを更新します。26. 検索ボックスに「CreateRobotApplicationPolicy」と入力します。新しいポリシーの横の

チェックボックスをオンにします。次に、[Next Step (次のステップ)] を選択します。27. [Next: Review (次へ: 確認)] を選択し、新しいユーザーをプレビューします。続行する準備ができた

ら、[ユーザーの作成] を選択します。28. 新しいユーザーのパスワードをダウンロードまたはコピーし、安全にユーザーに配布します。各ユー

ザーに IAM ユーザーコンソールページへのリンクと、先ほど作成したユーザー名を伝えます。

認証情報の自己管理をユーザーに許可するMFA を設定するには、ユーザーの仮想 MFA デバイスをホストするハードウェアに物理的にアクセスできる必要があります。たとえば、スマートフォンで実行される仮想 MFA デバイスを使用するユーザー用にMFA を設定するとします。その場合、ウィザードを完了するには、そのスマートフォンを利用できる必要があります。このため、ユーザーが自分の仮想 MFA デバイスを構成して管理できるようにすることをお勧めします。この場合、必要な IAM アクションを実行する権限をユーザーに付与する必要があります。

認証情報の自己管理を許可するポリシーを作成するには (コンソール)

1. AWS マネジメントコンソール にサインインし、IAM コンソール(https://console.aws.amazon.com/iam/)を開きます。

2. ナビゲーションペインで、[Policies (ポリシー)] を選択し、次に [Create policy (ポリシーの作成)] を選択します。

3. [JSON] タブを選択し、以下の JSON ポリシードキュメントからテキストをコピーします。このテキストを [JSON] ボックスに貼り付けます。

Important

次のポリシー例では、サインイン時のパスワードのリセットをユーザーに許可しません。新しいユーザーおよびパスワードの期限が切れているユーザーは、これを行う場合があります。この操作を許可するには、iam:ChangePassword と iam:CreateLoginProfile

124

Page 132: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドIAM の開始方法

をステートメント 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}", "arn:aws:iam::*:user/${aws:username}" ] }, { "Sid": "AllowIndividualUserToDeactivateOnlyTheirOwnMFAOnlyWhenUsingMFA", "Effect": "Allow", "Action": [ "iam:DeactivateMFADevice" ], "Resource": [

125

Page 133: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドIAM の開始方法

"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 コンソールで表示できます。この 3 つのアクセス許可は独自のステートメントにある必要があります。これは、アクセス許可が特定のリソース ARN の指定をサポートせず、また指定する必要もなく、その代わりに "Resource" : "*" を指定するためです。

• AllowIndividualUserToSeeAndManageOnlyTheirOwnAccountInformation ステートメントにより、ユーザーは自分のユーザー、パスワード、アクセスキー、署名証明書、SSH パブリックキー、および MFA 情報を IAM コンソールで管理できます。また、これにより、ユーザーは管理者から初回パスワードの設定を求められたときに初めてサインインを許可されます。リソース ARNは、これらのアクセス許可の使用をユーザー独自の IAM ユーザーエンティティにのみ制限します。

• AllowIndividualUserToViewAndManageTheirOwnMFA ステートメントでは、ユーザーが各自の MFA デバイスを表示または管理できます。このステートメントのリソース ARN は、現在サインインしているユーザーと名前が一致するユーザーや MFA デバイスにのみアクセスを許可することに注意してください。ユーザーは、各自の MFA デバイス以外の MFA デバイスを作成または変更することはできません。

• AllowIndividualUserToDeactivateOnlyTheirOwnMFAOnlyWhenUsingMFA ステートメントでは、MFA を使用してユーザーがサインインした場合に限り、ユーザーが各自の MFA デバイスのみを無効化できます。これにより、他者がアクセスキー (MFA デバイスではなく) のみを使用してMFA デバイスを無効化したり、アカウントにアクセスしたりできなくなります。

• BlockMostAccessUnlessSignedInWithMFA ステートメントでは、ユーザーが MFA でサインインしていない場合、"Deny" と "NotAction" の組み合わせを使用して、IAM と他の AWS のサービスのすべてのアクション (数例を除く) へのアクセスを拒否します。このステートメントのロジッ

126

Page 134: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドIAM の開始方法

クの詳細については、IAM ユーザーガイドの「Deny での NotAction の使用」を参照してください。ユーザーが 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 devicesbut nothing else unless they authenticate with MFA.」と入力します。ポリシーの[Summary (概要)] で、ポリシーで付与されたアクセス許可を確認し、[ポリシーの作成] を選択して作業を保存します。

新しいポリシーが管理ポリシーの一覧に表示され、アタッチの準備ができます。

ポリシーをユーザーにアタッチするには (コンソール)

1. ナビゲーションペインで [Users (ユーザー)] を選択します。2. 編集するユーザーの名前 (チェックボックスではなく) を選択します。3. [Permissions (アクセス許可)] タブで、[Add permissions (アクセス許可の追加)] を選択します。4. [Attach existing policies directly (既存のポリシーを直接アタッチ)] を選択します。5. 検索ボックスに「Force」と入力し、リストの [Force_MFA] の横にあるチェックボックスをオンにし

ます。続いて、[Next: Review (次へ: 確認)] を選択します。6. 変更内容を確認し、[Add permissions (アクセス許可の追加)] を選択します。

IAM ユーザーの MFA を有効にするセキュリティを強化するために、すべての IAM ユーザーが多要素認証 (MFA) を設定して AWSRoboMaker リソースを保護することをお勧めします。MFA では、さらなるセキュリティが追加されます。ユーザーは、通常のサインイン認証情報に加えて、AWS でサポートされている MFA デバイスから一意の認証情報を提供することを求められるためです。最も安全な AWS MFA デバイスは U2F セキュリティキーです。貴社にすでに U2F デバイスがある場合は、これらのデバイスを AWS 用に有効にしてください。それ以外の場合は、ユーザーごとにデバイスを購入し、ハードウェアが到着するまで待つ必要があります。詳細については、IAM ユーザーガイドの「U2F セキュリティキーの有効化」を参照してください。

U2F デバイスがまだない場合は、仮想 MFA デバイスを有効にすることで迅速に低コストで開始できます。これには、ソフトウェアアプリケーションを既存の電話や他のモバイルデバイスにインストールする必要があります。このデバイスは、時間同期されるワンタイムパスワードアルゴリズムに基づいて 6 桁の数値コードを生成します。ユーザーは、AWS にサインインする際にデバイスからコードを入力することを求められます。ユーザーに割り当てられた各仮想 MFA デバイスは一意であることが必要です。ユーザーは、別のユーザーの仮想 MFA デバイスからコードを入力して認証することはできません。仮想 MFA デバイスとして使用できるサポートされるアプリケーションのリストについては、「多要素認証」を参照してください。

Note

IAM ユーザーの MFA を設定するには、ユーザーの仮想 MFA デバイスをホストするモバイルデバイスに物理的にアクセスできる必要があります。

127

Page 135: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドログ記録とモニタリング

IAM ユーザーの仮想 MFA デバイスを有効にするには (コンソール)

1. AWS マネジメントコンソール にサインインし、IAM コンソール(https://console.aws.amazon.com/iam/)を開きます。

2. ナビゲーションペインで [ユーザー] を選択します。3. [ユーザー名] リストから対象の MFA ユーザーの名前を選択します。4. [Security credentials] タブを選択します。[Assigned MFA device (割り当て済み MFA デバイス)] の横

で、[管理] を選択します。5. [MFA デバイスの管理] ウィザードで、[仮想 MFA デバイス]、[Continue (続行)] の順に選択します。

IAM が QR コードを含む仮想 MFA デバイスの設定情報を生成して表示します。図は、QR コードに対応していないデバイスでの手動入力に利用できる「シークレット設定キー」を示しています。

6. 仮想 MFA アプリを開きます。

仮想 MFA デバイスをホストするために使用できるアプリケーションのリストについては、「多要素認証」を参照してください。仮想 MFA アプリが複数のアカウント (複数の仮想 MFA デバイス) をサポートしている場合は、新しいアカウント (新しい仮想 MFA デバイス) を作成するオプションを選択します。

7. MFA アプリが QR コードをサポートしているかどうかを確認してから、次のいずれかを実行します。

• ウィザードから [Show QR code (QR コードの表示)] を選択し、アプリを使用して QR コードをスキャンします。たとえば、カメラアイコンまたは [Scan code (スキャンコード)] に似たオプションを選択し、デバイスのカメラを使用してコードをスキャンします。

• [MFA デバイスの管理] ウィザードで [Show secret key (シークレットキーの表示)] を選択し、MFAアプリにシークレットキーを入力します。

これで仮想 MFA デバイスはワンタイムパスワードの生成を開始します。8. [MFA デバイスの管理] ウィザードの [MFA Code 1 (MFA コード 1)] ボックスに、現在仮想 MFA デバ

イスに表示されているワンタイムパスワードを入力します。デバイスが新しいワンタイムパススワードを生成するまで待ちます (最長 30 秒)。生成されたら [MFA Code 2 (MFA コード 2)] ボックスに 2 つ目のワンタイムパススワードを入力します。[Assign MFA (MFA の割り当て)] を選択します。

Important

コードを生成したら、即時にリクエストを送信します。コードを生成した後にリクエストを送信するまで時間がかかりすぎる場合、MFA デバイスはユーザーとは正常に関連付けられますが、その MFA デバイスは同期されません。これは、時刻ベースのワンタイムパスワード(TOTP) の有効期間が短いために起こります。その場合は、デバイスを再同期できます。詳細については、IAM ユーザーガイドの「仮想デバイスとハードウェア MFA デバイスの再同期」を参照してください。

これで仮想 MFA デバイスを AWS で使用できます。

AWS RoboMaker でのログ記録とモニタリングモニタリングは、AWS RoboMaker および AWS ソリューションの信頼性、可用性、パフォーマンスを維持する上で重要な部分です。マルチポイント障害が発生した場合は、その障害をより簡単にデバッグできるように、AWS ソリューションのすべての部分からモニタリングデータを収集する必要があります。

トピック• Amazon CloudWatch を使用した AWS RoboMaker のモニタリング (p. 129)• AWS CloudTrail を使用した AWS RoboMaker API コールのログ作成 (p. 131)

128

Page 136: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドAmazon CloudWatch を使用し

た AWS RoboMaker のモニタリング

Amazon CloudWatch を使用した AWS RoboMaker のモニタリングAWS RoboMaker はメトリクスを Amazon CloudWatch に送信します。AWS マネジメントコンソール、AWS CLI、または API を使用して、AWS RoboMaker が CloudWatch に送信するメトリクスをリスト表示できます。

メトリクスは作成されたリージョンにのみ存在します。メトリクスは削除できませんが、それらに対して新しいデータが発行されない場合、15 か月後に自動的に有効期限切れになります。

Amazon CloudWatch の詳細については、「Amazon CloudWatch ユーザーガイド」を参照してください。

トピック• AWS RoboMaker シミュレーションメトリクス (p. 129)• AWS RoboMaker 使用状況メトリクス (p. 129)

AWS RoboMaker シミュレーションメトリクスAmazon CloudWatch を使用して AWS RoboMaker シミュレーションジョブをモニタリングすることで、シミュレーションジョブから情報を収集し、リアルタイムに近い読み取り可能なメトリクスに加工することができます。情報は 1 分間隔で提供されます。

SimulationJobId ディメンションで表示されるメトリクスは、以下のとおりです。

メトリクス 説明

RealTimeFactor シミュレートされた時間と実時間の比率。たとえば、30 分をシミュレートするために 1 時間を要した場合、係数は 0.5 です。

シミュレーションが複雑になるほど、実時間係数が低くなります。

vCPU* シミュレーションジョブで使用される仮想 CPU コアの数

単位: 個

Memory* シミュレーションジョブで使用される GB 単位のメモリの量

単位: GB

SimulationUnit* SimulationUnit は、シミュレーションジョブのvCPU およびメモリの消費量に基づいて計算されます。

単位: 個

Important

* でマークされているメトリクスは予測を目的としています。AWS RoboMaker はシミュレーションジョブの実行準備中にメトリクスを発行します。シミュレーションジョブが Running 状態になるまで料金は発生しません。

129

Page 137: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドAmazon CloudWatch を使用し

た AWS RoboMaker のモニタリング

AWS RoboMaker 使用状況メトリクスCloudWatch 使用状況メトリクスを使用して、アカウントのリソースの使用状況を把握できます。これらのメトリクスを使用して、CloudWatch グラフやダッシュボードで現在のサービスの使用状況を可視化できます。

AWS RoboMaker 使用状況メトリクスは、AWS のサービスクォータに対応しています。使用量がサービスクォータに近づいたときに警告するアラームを設定することもできます。サービスクォータとCloudWatch の統合の詳細については、「サービスクォータの統合と使用状況のメトリクス」を参照してください。

AWS/Usage ディメンションで表示されるメトリクスは、以下のとおりです。

メトリクス 説明

ResourceCount アカウントで実行されている指定されたリソースの数。リソースは、メトリクスに関連付けられたディメンションによって定義されます。

このメトリクスで最も役に立つ統計は MAXIMUM です。これは、1 分間の期間中に使用されるリソースの最大数を表します。

以下のディメンションは、AWS RoboMaker によって発行される使用状況メトリクスを絞り込むために使用されます。

ディメンション 説明

Service リソースを含む AWS のサービスの名前。AWSRoboMaker 使用状況メトリクスの場合、このディメンションの値は RoboMaker です。

Type レポートされるエンティティのタイプ。現在、AWS RoboMaker 使用状況メトリクスの有効な値は Resource のみです。

Resource 実行中のリソースのタイプ。現在、AWSRoboMaker 使用状況メトリクスの有効な値はRobotApplication、SimulationApplication、ActiveSimulationJob、および ActiveSimulationJobBatchです。

Class 追跡されるリソースのクラス。Resource ディメンションの値として ActiveSimulationJob を使用する AWS RoboMaker 使用状況メトリクスの場合、有効な値は CPU です。このディメンションの値は、そのメトリクスによって報告されるSimulationJobs で使用されるコンピューティングリソースの種類を定義します。その他の場合、クラス値は None です。

これらのメトリクスは、毎分発行されます。これらのメトリクスを使用して使用量をモニタリングしてから、必要に応じて対応する制限の引き上げをリクエストします。使用量のモニタリングの詳細については、「サービスクォータの視覚化とアラームの設定」を参照してください。

130

Page 138: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドAWS CloudTrail を使用した AWSRoboMaker API コールのログ作成

AWS CloudTrail を使用した AWS RoboMaker APIコールのログ作成AWS RoboMaker は、AWS CloudTrail のユーザーやロール、または AWS のサービスによって実行されたアクションを記録するサービスである AWS RoboMaker と統合されています。CloudTrail は、AWSRoboMaker のすべての API コールをイベントとしてキャプチャします。キャプチャされた呼び出しには、AWS RoboMaker コンソールの呼び出しと、AWS RoboMaker API オペレーションへのコード呼び出しが含まれます。証跡を作成する場合は、AWS RoboMaker のイベントなど、Amazon S3 バケットへのCloudTrail イベントの継続的な配信を有効にすることができます。証跡を設定しない場合でも、CloudTrailコンソールの [Event history (イベント履歴)] で最新のイベントを表示できます。CloudTrail によって収集された情報を使用して、リクエストの作成元の IP アドレス、リクエストの実行者、リクエストの実行日時などの詳細を調べて、AWS RoboMaker に対してどのようなリクエストが行われたかを判断できます。

CloudTrail の詳細については、「AWS CloudTrail User Guide」を参照してください。

CloudTrail 内の AWS RoboMaker 情報CloudTrail は、アカウント作成時に AWS アカウントで有効になります。AWS RoboMaker でアクティビティが発生すると、そのアクティビティは [Event history (イベント履歴)] の AWS の他のサービスのイベントとともに CloudTrail イベントに記録されます。最近のイベントは、AWS アカウントで表示、検索、ダウンロードできます。詳細については、「CloudTrail イベント履歴でのイベントの表示」を参照してください。

AWS RoboMakerのイベントなど、AWS アカウントのイベントの継続的な記録については、証跡を作成します。証跡により、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 ログファイルにエントリが生成されます。

各イベントまたはログエントリには、リクエストの生成者に関する情報が含まれます。この ID 情報は以下のことを確認するのに役立ちます。

• リクエストが、ルートまたは AWS Identity and Access Management (IAM) ユーザー認証情報のどちらを使用して送信されたかどうか。

• リクエストが、ロールとフェデレーティッドユーザーのどちらの一時的なセキュリティ認証情報を使用して送信されたか.

• リクエストが、別の AWS サービスによって送信されたかどうか。

詳細については、「CloudTrail userIdentity 要素」を参照してください。

131

Page 139: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドセキュリティコンプライアンス

AWS RoboMaker ログファイルエントリの概要証跡は、指定した Amazon S3 バケットにイベントをログファイルとして配信できる設定です。CloudTrailログファイルには、1 つ以上のログエントリが含まれます。イベントは任意の送信元からの単一のリクエストを表し、リクエストされたアクション、アクションの日時、リクエストのパラメータなどに関する情報が含まれます。CloudTrail ログファイルは、パブリック API コールの順序付けられたスタックトレースではないため、特定の順序では表示されません。

次の例は、DescribeRobot アクションを表す CloudTrail ログエントリの例です。

{ "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 コンプライアンスプログラムには、HIPAA 対応サービスとして AWS RoboMaker が含まれています。AWS の PCI DSS コンプライアンスプログラムには、PCI 準拠サービスとして AWSRoboMaker が含まれています。

AWS クラウドおよび HIPAA コンプライアンスの概要については、以下を参照してください。

• HIPAA コンプライアンス• Architecting for HIPAA Security and Compliance on Amazon Web Services

AWS RoboMaker の耐障害性AWS のグローバルインフラストラクチャは AWS リージョンとアベイラビリティーゾーンを中心として構築されます。AWS リージョンには、低レイテンシー、高いスループット、そして高度の冗長ネットワークで接続されている複数の物理的に独立・隔離されたアベイラビリティーゾーンがあります。アベイラビリティーゾーンでは、ゾーン間で中断することなく自動的にフェイルオーバーするアプリケーションとデー

132

Page 140: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドインフラストラクチャセキュリティ

タベースを設計および運用することができます。アベイラビリティーゾーンは、従来の単一または複数のデータセンターインフラストラクチャよりも可用性、耐障害性、および拡張性が優れています。

AWS リージョンとアベイラビリティーゾーンの詳細については、「AWS グローバルインフラストラクチャ」を参照してください。

AWS RoboMaker では、AWS グローバルインフラストラクチャに加えて、データの耐障害性とバックアップのニーズに対応できるように複数の機能を提供しています。

AWS RoboMaker のインフラストラクチャセキュリティ

マネージド型サービスとして、AWS RoboMaker は、ホワイトペーパー「Amazon Web Services: AWS セキュリティプロセスの概要」に記載されているAWS グローバルネットワークセキュリティの手順で保護されています。

AWS が公開した API コールを使用して、ネットワーク経由で AWS RoboMaker にアクセスします。クライアントで Transport Layer Security (TLS) 1.0 以降がサポートされている必要があります。TLS 1.2 以降が推奨されています。また、Ephemeral Diffie-Hellman (DHE) や Elliptic Curve Ephemeral Diffie-Hellman(ECDHE) などの Perfect Forward Secrecy (PFS) を使用した暗号スイートもクライアントでサポートされている必要があります。これらのモードは、Java 7 以降など、最近のほとんどのシステムでサポートされています。

また、リクエストは、アクセスキー ID と、IAM プリンシパルに関連付けられているシークレットのアクセスキーを使用して署名する必要があります。または、AWS Security Token Service (AWS STS) を使用して、一時的なセキュリティ認証情報を生成し、リクエストに署名することもできます。

133

Page 141: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドタグの基本

AWS RoboMaker リソースにタグを付ける

フリート、ロボット、ロボットアプリケーション、シミュレーションアプリケーション、シミュレーションジョブ、およびデプロイを管理および整理しやすいように、必要に応じて、タグの形式でこれらの各リソースに独自のメタデータを割り当てることができます。このセクションでは、タグとその作成方法について説明します。

タグの基本タグを使用すると、AWS RoboMaker リソースを用途、所有者、環境などのさまざまな方法で分類できます。これは、同じ型のリソースが多数ある場合に役立ちます。割り当てたタグに基づいて特定のリソースをすばやく識別できます。タグはそれぞれ、1 つのキーとオプションの値で構成され、どちらもユーザーが定義します。たとえば、機能ごとにデバイスを追跡するのに役立つ、ロボット用の一連のタグを定義できます。リソースの種類ごとのニーズを合わせて一連のタグキーを作成することをお勧めします。一貫性のあるタグキーセットを使用することで、リソースの管理が容易になります。

追加または適用したタグに基づいて、リソースを検索およびフィルター処理できます。また、「IAM ポリシーでのタグの使用 (p. )」で説明しているように、タグを使用してリソースへのアクセスを制御することもできます。

使いやすいように、AWS マネジメントコンソールのタグエディタでは、統一された方法で一元的にタグを作成および管理できます。詳細については、「AWS マネジメントコンソールの操作」の「タグエディタの使用」を参照してください。

AWS CLI および AWS RoboMaker API を使用してタグを操作することもできます。モノのグループ、モノのタイプ、トピックルール、ジョブ、セキュリティプロファイル、および請求グループの作成時に、以下のコマンドで "Tags" フィールドを使用してタグを関連付けることができます。

• CreateDeploymentJob• CreateFleet• CreateRobot• CreateRobotApplication• CreateSimulationApplication• CreateSimulationJob• StartSimulationJobBatch

以下のコマンドを使用して、タグ付けがサポートされている既存のリソースに対してタグを追加、変更、または削除できます。

• TagResource• ListTagsForResource• UntagResource

タグのキーと値は編集でき、タグはリソースからいつでも削除できます。タグの値を空の文字列に設定することはできますが、タグの値を null に設定することはできません。特定のリソースについて既存のタグ

134

Page 142: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドタグの制約と制限

と同じキーを持つタグを追加した場合、古い値は新しい値によって上書きされます。リソースを削除すると、リソースに関連付けられているすべてのタグも削除されます。

詳細については、「AWS タグ付け戦略」を参照してください。

タグの制約と制限タグには以下のような基本制限があります。

• リソースあたりのタグの最大数: 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 を使用します。

• タグが許可されているリソースを作成または変更する API リクエストを作成する場合に、特定のタグが使用されている (または、使用されていない) ことを要求するには、aws:RequestTag/tag-key:tag-value を使用します。

• タグが許可されているリソースを作成または変更する API リクエストを作成する場合に、特定の一連のタグが使用されている (または、使用されていない) ことを要求するには、aws:TagKeys: [tag-key, ...] を使用します。

Note

IAM ポリシーの条件コンテキストのキーと値は、タグ付け可能なリソースの ID が必須パラメータである AWS RoboMaker アクションにのみ適用されます。たとえば、このリクエストではタグ付け可能なリソース (フリート、ロボット、ロボットアプリケーション、シミュレーションアプリケーション、シミュレーションジョブ、デプロイジョブ) が参照されないため、ListFleets の使用は条件コンテキストキーおよび値に基づいて許可または拒否されることはありません。

AWS Identity and Access Management ユーザーガイドの「タグを使用したアクセス制御」には、タグの使用に関する追加情報が記載されています。そのガイドの「IAM JSON ポリシーリファレンス」セクションには、IAM での JSON ポリシーの要素、変数、および評価ロジックの詳細な構文、説明、および例が記載されています。

次のポリシー例では、タグベースの 2 つの制約が適用されています。このポリシーによって制限されている IAM ユーザーは、次のように制限されます。

135

Page 143: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド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" : { "StringEquals" : { "aws:ResourceTag/env" : "prod" } } }, { "Effect": "Allow", "Action": [ "robomaker:*" ], "Resource": "*" } ]}

次のようにタグ値を 1 つのリストとして指定して、1 つのタグキーに対して複数のタグ値を指定することもできます。

"StringEquals" : { "aws:ResourceTag/env" : ["dev", "test"] }

Note

タグに基づいてリソースへのユーザーのアクセスを許可または拒否する場合は、ユーザーが同じリソースに対してそれらのタグを追加または削除することを明示的に拒否することを検討する必要があります。そうしないと、ユーザーはそのリソースのタグを変更することで、制限を回避してリソースにアクセスできてしまいます。

136

Page 144: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドシミュレーションジョブのトラブルシューティング

トラブルシューティングAWS RoboMaker によるロボットアプリケーションの開発に伴う一般的な問題を解決します。

トピック• シミュレーションジョブのトラブルシューティング (p. 137)• 開発環境のトラブルシューティング (p. 140)• デプロイのトラブルシューティング (p. 140)• colcon でのビルドとバンドルのトラブルシューティング (p. 143)

シミュレーションジョブのトラブルシューティングこのセクションは、AWS RoboMaker シミュレーションジョブの問題を修正するのに役立ちます。

シミュレーションジョブが失敗しましたシミュレーションジョブが失敗した場合は、以下の一般的な解決方法を参照してください。

Amazon S3 リソースは AWS RoboMaker と同じリージョンにありますか?ロボットアプリケーション、シミュレーションアプリケーション、および出力は、AWS RoboMaker と同じリージョンにあることが必要です。アプリケーションのソースとシミュレーションジョブの出力の場所を確認してください。

ロボットアプリケーションは異常終了しましたか?シミュレーション用にロボットアプリケーションをセットアップするときに問題がありました。AmazonCloudWatch でシミュレーションジョブのロボットアプリケーションを確認してください。

ログにはシミュレーションジョブの詳細画面からアクセスします。[Logs (ログ)] を選択し、ログストリームを選択します。特定の問題を見つけるには、フィルターを使用します。たとえば、WARNING またはERROR を使用します。

アプリケーションの .so ファイルが欠落していませんか?アプリケーションがクラッシュした場合、依存する共有オブジェクト (.so) ファイルが欠落している場合があります。環境のアプリケーションバンドルを抽出し、必要な共有オブジェクトライブラリが /usr/local/lib または /usr/lib に存在することを確認してください。依存関係がパッケージ .xml ファイルに追加されていることを確認します。

CLI でロールの ARN を使用しましたか?AWS CLI から create-simulation-job を呼び出す場合は、ロール名だけでなく、ロールの完全な Amazon リソースネーム (ARN) を使用します。

ロールには AWS RoboMaker の信頼ポリシーがありますか?AWS CLI から create-simulation-job を呼び出して IAM ロールの完全な Amazon リソースネーム (ARN) を渡す場合、信頼ポリシーの特権が十分ではない可能性があります。ロールにrobomaker.amazonaws.com と信頼関係があることを確認します。

137

Page 145: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドシミュレーションジョブが失敗しました

IAM ロールへのアクセスの表示および信頼ポリシーの追加の詳細については、「ロールの変更」を参照してください。

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 に発行するアクセス許可がありますか?IAM ロールのアクセス許可ポリシーを更新して CloudWatch へのアクセスを含めてください。

{ "Effect": "Allow", "Action": [ "logs:CreateLogGroup", "logs:CreateLogStream", "logs:PutLogEvents", "logs:DescribeLogStreams" ], "Resource": "*"}

アプリケーションに不一致のエンティティタグがありませんか?エンティティタグ (ETag) は、シミュレーションの作成時に提供される Amazon S3 オブジェクトのハッシュです。ETag は、オブジェクトのコンテンツに加えた変更のみを反映し、メタデータに加えた変更は反映しません。ロボットアプリケーションやシミュレーションバンドルの内容を、AWS RoboMaker で使用する前に Amazon S3 で変更すると、バージョンの不一致が発生します。

138

Page 146: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドシミュレーションジョブが失敗しました

この問題を解決するには、ロボットアプリケーションやシミュレーションアプリケーションの新しいバージョンを作成し、更新したアプリケーションバンドルのキーの場所を指定します。詳細については、「アプリケーションバージョンの作成 (p. 54)」または「シミュレーションアプリケーションバージョンの作成 (p. 54)」を参照してください。

サブネット ENI の制限を超えていませんか?AWS RoboMaker は、シミュレーションジョブの実行先であるサブネットの同時実行シミュレーションジョブごとに 1 つの Elastic Network Interface (ENI) を使用します。これらの ENI ごとに IP アドレスを割り当てる必要があります。この問題を解決する方法は以下のとおりです。

• 未使用の ENI を削除し、サブネットの IP アドレスを解放します。未使用の ENI を削除するには、「ネットワークインターフェイスの削除」を参照してください。

• 該当する AWS リージョンで ENI に対するサービスの上限緩和を申請します。

起動コマンドは適切に設定されていますか?シミュレーションが複雑な場合は、Gazebo が起動するまで数分かかることがあります。AWS RoboMakerでシミュレーションジョブの準備に 10 分以上かかる場合は、起動コマンドに問題がある可能性があります。

ジョブをキャンセルして新しいシミュレーションジョブを作成します。問題が解決しない場合は、AWS サポートまでお問い合わせください。

ROS ノードのいずれかが起動していないか、問題が発生している可能性があります。シミュレーションログでエラーを確認してください。ターミナルシミュレーションを使用して実行中のシミュレーションジョブに接続し、トラブルシューティングを行うこともできます。

サブネットは、AWS RoboMaker がサポートするゾーンにありますか?AWS RoboMaker がサポートしている AWS アベイラビリティーゾーンの 2 つでサブネットを指定してください。サポートされている AWS アベイラビリティーゾーンのリストは、API レスポンスに記載されています。

起動ファイルとパッケージ名は正しいですか?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

139

Page 147: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド開発環境のトラブルシューティング

間違った起動ファイルを含めていませんか?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[""]Error [parser.cc:581] Unable to find uri[model://model_name]

開発環境のトラブルシューティングこのセクションは、AWS RoboMaker 環境でのアプリケーションの作成に関する問題を修正するのに役立ちます。

サンプルコードに問題があるサンプルコードに問題がある場合は、以下の解決方法を参照してください。

サンプルをインストールできませんでしたか?AWS Cloud9 がバックグラウンド更新を実行している場合、サンプルはインストールされないことがあります。IDE がリポジトリの依存関係を更新しようとしたときに、問題が発生する可能性があります。数分後にもう一度お試しください。

デプロイのトラブルシューティングこのセクションは、ロボットアプリケーションをフリートにデプロイする際の問題を修正するのに役立ちます。

デプロイに失敗しました以下のトピックで示す一般的な解決方法を参照してください。

ロボットはフリートに属していますか?デプロイを受け取るには、ロボットがフリートに属している必要があります。AWS RoboMaker コンソールでロボットのステータスを確認するには、[Fleet management (フリート管理)]、[Robots (ロボット)] の順に選択します。フリートに登録済みのロボットは、[Fleet name (フリート名)] に表示されます。

140

Page 148: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドデプロイに失敗しました

ロボットで AWS IoT Greengrass が実行されていますか?AWS IoT Greengrass コアソフトウェアを設定して実行するには、「モジュール 1: Greengrass の環境設定」の手順に従います。次に、「コアデバイスでの AWS IoT Greengrass の起動」の手順に従います。

リソースが欠落していませんか?デプロイの詳細ページで、[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: Certificate signed by unknown authority (不明な権限によって署名された証明書)」が表示される場合このエラーは、AWS RoboMaker またはロボットの AWS IoT Greengrass から認定または設定ファイルを最近更新した場合に発生することがあります。エラーはログ /greengrass/ggc/var/log/system/runtime.log に表示されます。解決するには、ロボットの root.ca.pem をアップグレードします。アップグレードするには、「コアデバイスでの AWS IoT Greengrass の起動」のステップ 5 に従います。

失敗のしきい値を超過していますか?失敗のしきい値を超過すると、デプロイは停止します。しきい値を上げて、フリート内のデプロイ先を増やすことができます。

デプロイに予想以上の時間がかかっていますか?デプロイ時間は、ロボットアプリケーションのパッケージサイズによって異なります。ロボットのネットワーク条件によって異なる場合もあります。多数のロボットがあり、いくつかを同時にデプロイしている場合、デプロイは長引くことがあります。

単一のロボットのデプロイを開始した場合、タイムアウトは 5 時間です。デプロイの詳細ページで、デプロイ中のロボットを確認できます。接続するには SSH を使用します。AWS IoT Greengrass が実行中であることを確認するには、コマンド ps aux | grep '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-robot architecture_DO_NOT_DELETE.log) でエラーをチェックします。

141

Page 149: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドデプロイに失敗しました

ログにエラーがない場合は、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 IoTGreengrass のトラブルシューティング」を参照してください。

オフラインのロボットは、正常な動作のために最新のデプロイまたは前回のデプロイを取得しますか?ロボットが使用可能でないため、新しいデプロイで RobotAgentResponseTimeoutException を受け取った場合、ロボットが使用可能になると、最新の(タイムアウトになった)デプロイがダウンロードされます。ロボットのステータスは、ロボットがデプロイを終了した後に更新されます。ステータスがNoResponse から InSync に変わります。

バンドルセットアップスクリプトから渡される環境変数が上書きしようとしていませんか?バンドルセットアップスクリプトから渡される環境変数は、ジョブの作成時に定義された同様の変数を上書きすることがあります。この問題を回避するには、新しい一意の環境変数を定義するか、セットアップスクリプトで使用されている値を変更します。

ROS がデバイスの再起動時に再起動しない再起動の失敗は、AWS IoT Greengrass デーモンが再起動時に実行されるよう設定されていない場合に発生します。AWS IoT Greengrass デーモンを実行するようにデバイスの init システムを変更するには、「Init システムを設定して Greengrass デーモンを開始する」を参照してください。

ROS から root 権限を求められる/etc/passwd にある Linux ユーザープロファイルを設定することで、ggc_user root 権限を付与できます。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

RoboApplication およびデフォルトの ROS HOME ディレクトリを管理するggc_user の作成時にロボットアプリケーションを作成すると、AWS IoT Greengrassは /home/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 に付与されている必要があります。

142

Page 150: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドロボットのローカルライブラリを使用する方法

/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. 28)」を参照してください。

colcon でのビルドとバンドルのトラブルシューティング

colcon によるアプリケーションのビルドとバンドルに役立ちます。バンドル形式の詳細およびその他の技術的な詳細については、AWS Open Source ブログの「Building and Bundling a ROS Application for AWSRoboMaker」を参照してください。

Colcon でのビルドの失敗以下のトピックで示す一般的な解決方法を参照してください。

ネストされたフォルダに CMakeLists.txt ファイルはありますか?catkin_make で構築された ROS1 アプリケーションを構築している場合、colcon はワークスペースのすべてのパッケージを正しく列挙しない可能性があります。通常これは、1 つ以上の中間ディレクトリにCMakeLists.txt がある、ネストされたフォルダ構造によって発生します。colcon は、ネストされたフォルダ構造をサポートし、パッケージを自動的に見つけます。

たとえば、intermediate_directory の CMakeLists.txt は必須ではありません。

src/### package_1/# ### package.xml

143

Page 151: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドcolcon バンドルの失敗

| ### 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 ディレクトリにインストールされるため、すべての cmakeinstall() ディレクティブが実行されます。

[my_launchfile] is neither a launch file in package [my_package] nor is[my_package] a launch file name や [rosrun] Couldn't find executable namedmy_node below /opt/ros/$ROS_DISTRO/share/my_package のようなエラーが発生した場合は、CMakeLists.txt で install() への呼び出しを追加すると、問題が解決する可能性があります。

この問題を修正する方法のその他の例については、ROS に関する Wiki を参照してください。

colcon バンドルの失敗以下のトピックで示す一般的な解決方法を参照してください。

[package_name] の rosdep 定義が見つからない依存するパッケージの正しい ROS パッケージ名を使用していることを確認します。たとえば、パッケージは apt で ros-kinetic-packagename という名前になっている可能性がありますが、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 に依存関係を追加します。bundle コマンドを再試行します。

アプリケーションが独自の apt または pip リポジトリから依存関係を使用する場合は、colcon bundle を呼び出すときにそれらのレポジトリを含める必要があります。この問題を解決するには、以下の手順を実行します。

• colcon bundle に対して apt インストーラによって使用される sources.lst を、--apt-sources-list 引数で上書きします。基本オペレーティングシステムと ROS パッケージの解決エラーを回避す

144

Page 152: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド不足している依存関係があります。

るには、現在使用中のすべてのソースを含めることをお勧めします。詳細については、GitHub のexamplesources.list を参照してください。

• pip または pip3 ソースを上書きするには、--pip-args および --pip3-args 引数を使用します。これらの引数の後の文字列は、pip に直接渡されます。たとえば、--extra-index-url https://my-custom-pip-repo/indexと指定します。

145

Page 153: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドActions

API リファレンスこのセクションには、API リファレンスドキュメントが含まれています。

ActionsThe following actions are supported:

• BatchDescribeSimulationJob (p. 148)• CancelDeploymentJob (p. 152)• CancelSimulationJob (p. 154)• CancelSimulationJobBatch (p. 156)• CreateDeploymentJob (p. 158)• CreateFleet (p. 164)• CreateRobot (p. 167)• CreateRobotApplication (p. 171)• CreateRobotApplicationVersion (p. 175)• CreateSimulationApplication (p. 179)• CreateSimulationApplicationVersion (p. 184)• CreateSimulationJob (p. 188)• DeleteFleet (p. 198)• DeleteRobot (p. 200)• DeleteRobotApplication (p. 202)• DeleteSimulationApplication (p. 204)• DeregisterRobot (p. 206)• DescribeDeploymentJob (p. 209)• DescribeFleet (p. 213)• DescribeRobot (p. 217)• DescribeRobotApplication (p. 221)• DescribeSimulationApplication (p. 225)• DescribeSimulationJob (p. 229)• DescribeSimulationJobBatch (p. 236)• ListDeploymentJobs (p. 243)• ListFleets (p. 247)• ListRobotApplications (p. 250)• ListRobots (p. 253)• ListSimulationApplications (p. 256)• ListSimulationJobBatches (p. 259)• ListSimulationJobs (p. 262)• ListTagsForResource (p. 265)• RegisterRobot (p. 267)• RestartSimulationJob (p. 270)• StartSimulationJobBatch (p. 272)

146

Page 154: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドActions

• SyncDeploymentJob (p. 281)• TagResource (p. 286)• UntagResource (p. 288)• UpdateRobotApplication (p. 290)• UpdateSimulationApplication (p. 294)

147

Page 155: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドBatchDescribeSimulationJob

BatchDescribeSimulationJobDescribes one or more simulation jobs.

Request SyntaxPOST /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. 148)

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 SyntaxHTTP/1.1 200Content-type: application/json

{ "jobs": [ { "arn": "string", "clientRequestToken": "string", "compute": { "simulationUnitLimit": number }, "dataSources": [ { "name": "string", "s3Bucket": "string", "s3Keys": [ { "etag": "string", "s3Key": "string" } ]

148

Page 156: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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 }

149

Page 157: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドBatchDescribeSimulationJob

} ], "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. 148)

A list of simulation jobs.

Type: Array of SimulationJob (p. 339) objectsunprocessedJobs (p. 148)

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. 355).

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.

150

Page 159: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 152)

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. 355).

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.

152

Page 160: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

153

Page 161: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 154)

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. 355).

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.

154

Page 162: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

155

Page 163: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 156)

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. 355).

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.

156

Page 164: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

157

Page 165: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 158)

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

158

Page 166: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドCreateDeploymentJob

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-zA-Z0-9_\-=]*

Required: YesdeploymentApplicationConfigs (p. 158)

The deployment application configuration.

Type: Array of DeploymentApplicationConfig (p. 305) objects

Array Members: Fixed number of 1 item.

Required: YesdeploymentConfig (p. 158)

The requested deployment configuration.

Type: DeploymentConfig (p. 306) object

Required: Nofleet (p. 158)

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. 158)

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",

159

Page 167: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 159)

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. 159)

The time, in milliseconds since the epoch, when the fleet was created.

Type: TimestampdeploymentApplicationConfigs (p. 159)

The deployment application configuration.

Type: Array of DeploymentApplicationConfig (p. 305) objects

Array Members: Fixed number of 1 item.

160

Page 168: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドCreateDeploymentJob

deploymentConfig (p. 159)

The deployment configuration.

Type: DeploymentConfig (p. 306) objectfailureCode (p. 159)

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 |

161

Page 169: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドCreateDeploymentJob

MissingRobotDeploymentResource | GreengrassGroupVersionDoesNotExist| LambdaDeleted | ExtractingBundleFailure | PreLaunchFileFailure |PostLaunchFileFailure | BadPermissionError | DownloadConditionFailed |InternalServerError

failureReason (p. 159)

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. 159)

The target fleet for the deployment job.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*status (p. 159)

The status of the deployment job.

Type: String

Valid Values: Pending | Preparing | InProgress | Failed | Succeeded | Canceledtags (p. 159)

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. 355).

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.

162

Page 170: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

163

Page 171: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 164)

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. 164)

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

164

Page 172: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 164)

The Amazon Resource Name (ARN) of the fleet.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*createdAt (p. 164)

The time, in milliseconds since the epoch, when the fleet was created.

Type: Timestampname (p. 164)

The name of the fleet.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*tags (p. 164)

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. 355).

165

Page 173: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

166

Page 174: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 167)

The target architecture of the robot.

Type: String

Valid Values: X86_64 | ARM64 | ARMHF

Required: YesgreengrassGroupId (p. 167)

The Greengrass group id.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: .*

Required: Yesname (p. 167)

The name for the robot.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*

Required: Yes

167

Page 175: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドCreateRobot

tags (p. 167)

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. 168)

The target architecture of the robot.

Type: String

Valid Values: X86_64 | ARM64 | ARMHFarn (p. 168)

The Amazon Resource Name (ARN) of the robot.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*createdAt (p. 168)

The time, in milliseconds since the epoch, when the robot was created.

168

Page 176: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドCreateRobot

Type: TimestampgreengrassGroupId (p. 168)

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. 168)

The name of the robot.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*tags (p. 168)

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. 355).

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.

169

Page 177: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

170

Page 178: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 171)

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. 171)

The robot software suite (ROS distribuition) used by the robot application.

Type: RobotSoftwareSuite (p. 333) object

Required: Yessources (p. 171)

The sources of the robot application.

Type: Array of SourceConfig (p. 352) objects

171

Page 179: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドCreateRobotApplication

Required: Yestags (p. 171)

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. 172)

The Amazon Resource Name (ARN) of the robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

172

Page 180: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドCreateRobotApplication

Pattern: arn:.*lastUpdatedAt (p. 172)

The time, in milliseconds since the epoch, when the robot application was last updated.

Type: Timestampname (p. 172)

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. 172)

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. 172)

The robot software suite (ROS distribution) used by the robot application.

Type: RobotSoftwareSuite (p. 333) objectsources (p. 172)

The sources of the robot application.

Type: Array of Source (p. 351) objectstags (p. 172)

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. 172)

The version of the robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: (\$LATEST)|[0-9]*

173

Page 181: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドCreateRobotApplication

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 355).

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• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

174

Page 182: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 175)

The application information for the robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: YescurrentRevisionId (p. 175)

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": {

175

Page 183: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 175)

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. 175)

The time, in milliseconds since the epoch, when the robot application was last updated.

Type: Timestampname (p. 175)

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. 175)

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. 175)

The robot software suite (ROS distribution) used by the robot application.

Type: RobotSoftwareSuite (p. 333) objectsources (p. 175)

The sources of the robot application.

176

Page 184: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドCreateRobotApplicationVersion

Type: Array of Source (p. 351) objectsversion (p. 175)

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. 355).

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• AWS SDK for JavaScript• AWS SDK for PHP V3

177

Page 186: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 179)

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. 179)

The rendering engine for the simulation application.

Type: RenderingEngine (p. 325) object

179

Page 187: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドCreateSimulationApplication

Required: NorobotSoftwareSuite (p. 179)

The robot software suite (ROS distribution) used by the simulation application.

Type: RobotSoftwareSuite (p. 333) object

Required: YessimulationSoftwareSuite (p. 179)

The simulation software suite used by the simulation application.

Type: SimulationSoftwareSuite (p. 350) object

Required: Yessources (p. 179)

The sources of the simulation application.

Type: Array of SourceConfig (p. 352) objects

Required: Yestags (p. 179)

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": {

180

Page 188: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 180)

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. 180)

The time, in milliseconds since the epoch, when the simulation application was last updated.

Type: Timestampname (p. 180)

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. 180)

The rendering engine for the simulation application.

Type: RenderingEngine (p. 325) objectrevisionId (p. 180)

The revision id of the simulation application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 40.

Pattern: [a-zA-Z0-9_.\-]*

181

Page 189: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドCreateSimulationApplication

robotSoftwareSuite (p. 180)

Information about the robot software suite (ROS distribution).

Type: RobotSoftwareSuite (p. 333) objectsimulationSoftwareSuite (p. 180)

The simulation software suite used by the simulation application.

Type: SimulationSoftwareSuite (p. 350) objectsources (p. 180)

The sources of the simulation application.

Type: Array of Source (p. 351) objectstags (p. 180)

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. 180)

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. 355).

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.

182

Page 190: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

183

Page 191: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 184)

The application information for the simulation application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: YescurrentRevisionId (p. 184)

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",

184

Page 192: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 184)

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. 184)

The time, in milliseconds since the epoch, when the simulation application was last updated.

Type: Timestampname (p. 184)

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. 184)

The rendering engine for the simulation application.

Type: RenderingEngine (p. 325) objectrevisionId (p. 184)

The revision ID of the simulation application.

Type: String

185

Page 193: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドCreateSimulationApplicationVersion

Length Constraints: Minimum length of 1. Maximum length of 40.

Pattern: [a-zA-Z0-9_.\-]*robotSoftwareSuite (p. 184)

Information about the robot software suite (ROS distribution).

Type: RobotSoftwareSuite (p. 333) objectsimulationSoftwareSuite (p. 184)

The simulation software suite used by the simulation application.

Type: SimulationSoftwareSuite (p. 350) objectsources (p. 184)

The sources of the simulation application.

Type: Array of Source (p. 351) objectsversion (p. 184)

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. 355).

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.

186

Page 195: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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 Syntax

POST /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": {

188

Page 196: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドCreateSimulationJob

"environmentVariables": { "string" : "string" }, "launchFile": "string", "packageName": "string", "portForwardingConfig": { "portMappings": [ { "applicationPort": number, "enableOnPublicIp": boolean, "jobPort": number } ] }, "streamUI": boolean } } ], "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. 188)

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. 188)

Compute information for the simulation job.

Type: Compute (p. 301) object

Required: NodataSources (p. 188)

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.

189

Page 197: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドCreateSimulationJob

Type: Array of DataSourceConfig (p. 304) objects

Array Members: Minimum number of 1 item. Maximum number of 5 items.

Required: NofailureBehavior (p. 188)

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. 188)

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. 188)

The logging configuration.

Type: LoggingConfig (p. 318) object

Required: NomaxJobDurationInSeconds (p. 188)

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. 188)

Location for output files generated by the simulation job.

Type: OutputLocation (p. 320) object

Required: NorobotApplications (p. 188)

The robot application to use in the simulation job.

Type: Array of RobotApplicationConfig (p. 328) objects

190

Page 198: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドCreateSimulationJob

Array Members: Fixed number of 1 item.

Required: NosimulationApplications (p. 188)

The simulation application to use in the simulation job.

Type: Array of SimulationApplicationConfig (p. 336) objects

Array Members: Fixed number of 1 item.

Required: Notags (p. 188)

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. 188)

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. 353) object

Required: No

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" } ]

191

Page 199: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドCreateSimulationJob

} ], "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 } } ], "simulationTimeMillis": number, "status": "string", "tags": { "string" : "string" },

192

Page 200: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドCreateSimulationJob

"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. 191)

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. 191)

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. 191)

Compute information for the simulation job.

Type: ComputeResponse (p. 302) objectdataSources (p. 191)

The data sources for the simulation job.

Type: Array of DataSource (p. 303) objectsfailureBehavior (p. 191)

the failure behavior for the simulation job.

Type: String

Valid Values: Fail | ContinuefailureCode (p. 191)

The failure code of the simulation job if it failed:InternalServiceError

Internal service error.RobotApplicationCrash

Robot application exited abnormally.

193

Page 201: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドCreateSimulationJob

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 |WrongRegionS3Bucket | WrongRegionS3Output | WrongRegionRobotApplication |WrongRegionSimulationApplication

iamRole (p. 191)

The IAM role that allows the simulation job to call the AWS APIs that are specified in its associatedpolicies on your behalf.

Type: String

194

Page 202: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドCreateSimulationJob

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: arn:aws:iam::\w+:role/.*lastStartedAt (p. 191)

The time, in milliseconds since the epoch, when the simulation job was last started.

Type: TimestamplastUpdatedAt (p. 191)

The time, in milliseconds since the epoch, when the simulation job was last updated.

Type: TimestamploggingConfig (p. 191)

The logging configuration.

Type: LoggingConfig (p. 318) objectmaxJobDurationInSeconds (p. 191)

The maximum simulation job duration in seconds.

Type: LongoutputLocation (p. 191)

Simulation job output files location.

Type: OutputLocation (p. 320) objectrobotApplications (p. 191)

The robot application used by the simulation job.

Type: Array of RobotApplicationConfig (p. 328) objects

Array Members: Fixed number of 1 item.simulationApplications (p. 191)

The simulation application used by the simulation job.

Type: Array of SimulationApplicationConfig (p. 336) objects

Array Members: Fixed number of 1 item.simulationTimeMillis (p. 191)

The simulation job execution duration in milliseconds.

Type: Longstatus (p. 191)

The status of the simulation job.

Type: String

Valid Values: Pending | Preparing | Running | Restarting | Completed | Failed |RunningFailed | Terminating | Terminated | Canceled

tags (p. 191)

The list of all tags added to the simulation job.

195

Page 203: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドCreateSimulationJob

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. 191)

Information about the vpc configuration.

Type: VPCConfigResponse (p. 354) object

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 355).

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.

196

Page 205: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 198)

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. 355).

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.

198

Page 206: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

199

Page 207: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 200)

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. 355).

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.

200

Page 208: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

201

Page 209: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 202)

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. 202)

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. 355).

202

Page 210: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

203

Page 211: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 204)

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. 204)

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. 355).

204

Page 212: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

205

Page 213: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 206)

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. 206)

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"}

206

Page 214: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 206)

The Amazon Resource Name (ARN) of the fleet.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*robot (p. 206)

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. 355).

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

207

Page 216: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 209)

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,

209

Page 217: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 209)

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. 209)

The time, in milliseconds since the epoch, when the deployment job was created.

Type: TimestampdeploymentApplicationConfigs (p. 209)

The deployment application configuration.

Type: Array of DeploymentApplicationConfig (p. 305) objects

Array Members: Fixed number of 1 item.deploymentConfig (p. 209)

The deployment configuration.

210

Page 218: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドDescribeDeploymentJob

Type: DeploymentConfig (p. 306) objectfailureCode (p. 209)

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. 209)

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. 209)

The Amazon Resource Name (ARN) of the fleet.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*robotDeploymentSummary (p. 209)

A list of robot deployment summaries.

Type: Array of RobotDeployment (p. 331) objectsstatus (p. 209)

The status of the deployment job.

Type: String

Valid Values: Pending | Preparing | InProgress | Failed | Succeeded | Canceledtags (p. 209)

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.

211

Page 219: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドDescribeDeploymentJob

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 355).

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• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

212

Page 220: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 213)

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" } ],

213

Page 221: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 213)

The Amazon Resource Name (ARN) of the fleet.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*createdAt (p. 213)

The time, in milliseconds since the epoch, when the fleet was created.

Type: TimestamplastDeploymentJob (p. 213)

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. 213)

The status of the last deployment.

Type: String

Valid Values: Pending | Preparing | InProgress | Failed | Succeeded | CanceledlastDeploymentTime (p. 213)

The time of the last deployment.

Type: Timestampname (p. 213)

The name of the fleet.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*robots (p. 213)

A list of robots.

Type: Array of Robot (p. 326) objects

214

Page 222: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドDescribeFleet

Array Members: Minimum number of 0 items. Maximum number of 1000 items.tags (p. 213)

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. 355).

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• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python

215

Page 223: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドDescribeFleet

• AWS SDK for Ruby V3

216

Page 224: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 217)

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.

217

Page 225: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドDescribeRobot

The following data is returned in JSON format by the service.

architecture (p. 217)

The target architecture of the robot application.

Type: String

Valid Values: X86_64 | ARM64 | ARMHFarn (p. 217)

The Amazon Resource Name (ARN) of the robot.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*createdAt (p. 217)

The time, in milliseconds since the epoch, when the robot was created.

Type: TimestampfleetArn (p. 217)

The Amazon Resource Name (ARN) of the fleet.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*greengrassGroupId (p. 217)

The Greengrass group id.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: .*lastDeploymentJob (p. 217)

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. 217)

The time of the last deployment job.

Type: Timestampname (p. 217)

The name of the robot.

Type: String

218

Page 226: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドDescribeRobot

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*status (p. 217)

The status of the fleet.

Type: String

Valid Values: Available | Registered | PendingNewDeployment | Deploying |Failed | InSync | NoResponse

tags (p. 217)

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. 355).

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

219

Page 228: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 221)

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. 221)

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"

221

Page 229: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 221)

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. 221)

The time, in milliseconds since the epoch, when the robot application was last updated.

Type: Timestampname (p. 221)

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. 221)

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. 221)

The robot software suite (ROS distribution) used by the robot application.

Type: RobotSoftwareSuite (p. 333) objectsources (p. 221)

The sources of the robot application.

222

Page 230: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドDescribeRobotApplication

Type: Array of Source (p. 351) objectstags (p. 221)

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. 221)

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. 355).

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

223

Page 232: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 225)

The application information for the simulation application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: YesapplicationVersion (p. 225)

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"

225

Page 233: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 225)

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. 225)

The time, in milliseconds since the epoch, when the simulation application was last updated.

Type: Timestampname (p. 225)

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. 225)

The rendering engine for the simulation application.

Type: RenderingEngine (p. 325) objectrevisionId (p. 225)

The revision id of the simulation application.

226

Page 234: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドDescribeSimulationApplication

Type: String

Length Constraints: Minimum length of 1. Maximum length of 40.

Pattern: [a-zA-Z0-9_.\-]*robotSoftwareSuite (p. 225)

Information about the robot software suite (ROS distribution).

Type: RobotSoftwareSuite (p. 333) objectsimulationSoftwareSuite (p. 225)

The simulation software suite used by the simulation application.

Type: SimulationSoftwareSuite (p. 350) objectsources (p. 225)

The sources of the simulation application.

Type: Array of Source (p. 351) objectstags (p. 225)

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. 225)

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. 355).

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.

227

Page 235: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

228

Page 236: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 229)

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",

229

Page 237: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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 } } ], "simulationTimeMillis": number, "status": "string",

230

Page 238: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドDescribeSimulationJob

"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. 229)

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. 229)

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. 229)

Compute information for the simulation job.

Type: ComputeResponse (p. 302) objectdataSources (p. 229)

The data sources for the simulation job.

Type: Array of DataSource (p. 303) objectsfailureBehavior (p. 229)

The failure behavior for the simulation job.

Type: String

Valid Values: Fail | ContinuefailureCode (p. 229)

The failure code of the simulation job if it failed:InternalServiceError

Internal service error.RobotApplicationCrash

Robot application exited abnormally.

231

Page 239: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドDescribeSimulationJob

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 |WrongRegionS3Bucket | WrongRegionS3Output | WrongRegionRobotApplication |WrongRegionSimulationApplication

failureReason (p. 229)

Details about why the simulation job failed. For more information about troubleshooting, seeTroubleshooting.

Type: String

232

Page 240: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドDescribeSimulationJob

Length Constraints: Minimum length of 0. Maximum length of 1024.

Pattern: .*iamRole (p. 229)

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. 229)

The time, in milliseconds since the epoch, when the simulation job was last started.

Type: TimestamplastUpdatedAt (p. 229)

The time, in milliseconds since the epoch, when the simulation job was last updated.

Type: TimestamploggingConfig (p. 229)

The logging configuration.

Type: LoggingConfig (p. 318) objectmaxJobDurationInSeconds (p. 229)

The maximum job duration in seconds. The value must be 8 days (691,200 seconds) or less.

Type: Longname (p. 229)

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. 229)

The network interface information for the simulation job.

Type: NetworkInterface (p. 319) objectoutputLocation (p. 229)

Location for output files generated by the simulation job.

Type: OutputLocation (p. 320) objectrobotApplications (p. 229)

A list of robot applications.

Type: Array of RobotApplicationConfig (p. 328) objects

Array Members: Fixed number of 1 item.

233

Page 241: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドDescribeSimulationJob

simulationApplications (p. 229)

A list of simulation applications.

Type: Array of SimulationApplicationConfig (p. 336) objects

Array Members: Fixed number of 1 item.simulationTimeMillis (p. 229)

The simulation job execution duration in milliseconds.

Type: Longstatus (p. 229)

The status of the simulation job.

Type: String

Valid Values: Pending | Preparing | Running | Restarting | Completed | Failed |RunningFailed | Terminating | Terminated | Canceled

tags (p. 229)

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. 229)

The VPC configuration.

Type: VPCConfigResponse (p. 354) object

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 355).

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.

234

Page 242: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドDescribeSimulationJob

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• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

235

Page 243: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 236)

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": [

236

Page 244: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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 } ]

237

Page 245: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドDescribeSimulationJobBatch

}, "streamUI": boolean } } ], "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 } ] }, "streamUI": boolean } } ], "simulationApplications": [

238

Page 246: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドDescribeSimulationJobBatch

{ "application": "string", "applicationVersion": "string", "launchConfig": { "environmentVariables": { "string" : "string" }, "launchFile": "string", "packageName": "string", "portForwardingConfig": { "portMappings": [ { "applicationPort": number, "enableOnPublicIp": boolean, "jobPort": number } ] }, "streamUI": boolean } } ], "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. 236)

The Amazon Resource Name (ARN) of the batch.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*batchPolicy (p. 236)

The batch policy.

Type: BatchPolicy (p. 300) objectclientRequestToken (p. 236)

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

239

Page 247: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドDescribeSimulationJobBatch

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-zA-Z0-9_\-=]*createdAt (p. 236)

The time, in milliseconds since the epoch, when the simulation job batch was created.

Type: TimestampcreatedRequests (p. 236)

A list of created simulation job summaries.

Type: Array of SimulationJobSummary (p. 348) objects

Array Members: Minimum number of 0 items. Maximum number of 100 items.failedRequests (p. 236)

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. 311) objectsfailureCode (p. 236)

The failure code of the simulation job batch.

Type: String

Valid Values: InternalServiceErrorfailureReason (p. 236)

The reason the simulation job batch failed.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1024.

Pattern: .*lastUpdatedAt (p. 236)

The time, in milliseconds since the epoch, when the simulation job batch was last updated.

Type: TimestamppendingRequests (p. 236)

A list of pending simulation job requests. These requests have not yet been created into simulationjobs.

Type: Array of SimulationJobRequest (p. 345) objects

Array Members: Minimum number of 1 item.status (p. 236)

The status of the batch.Pending

The simulation job batch request is pending.

240

Page 248: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドDescribeSimulationJobBatch

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. 236)

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.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 355).

241

Page 249: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドDescribeSimulationJobBatch

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• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

242

Page 250: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 243)

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. 313) objects

Array Members: Fixed number of 1 item.

Required: NomaxResults (p. 243)

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. 243)

The nextToken value returned from a previous paginated ListDeploymentJobs request wheremaxResults was used and the results exceeded the value of that parameter. Pagination continuesfrom the end of the previous results that returned the nextToken value.

243

Page 251: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 244)

A list of deployment jobs that meet the criteria of the request.

244

Page 252: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドListDeploymentJobs

Type: Array of DeploymentJob (p. 307) objects

Array Members: Minimum number of 0 items. Maximum number of 200 items.nextToken (p. 244)

The nextToken value to include in a future ListDeploymentJobs request. When the results of aListDeploymentJobs request exceed maxResults, this value can be used to retrieve the nextpage of results. This value is null when there are no more results to return.

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. 355).

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• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

245

Page 253: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドListDeploymentJobs

246

Page 254: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 247)

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. 313) objects

Array Members: Fixed number of 1 item.

Required: NomaxResults (p. 247)

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. 247)

The nextToken value returned from a previous paginated ListFleets request where maxResultswas used and the results exceeded the value of that parameter. Pagination continues from the end ofthe previous results that returned the nextToken value.

247

Page 255: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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 SyntaxHTTP/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. 248)

A list of fleet details meeting the request criteria.

Type: Array of Fleet (p. 314) objects

Array Members: Minimum number of 0 items. Maximum number of 200 items.nextToken (p. 248)

The nextToken value to include in a future ListDeploymentJobs request. When the results of aListFleets request exceed maxResults, this value can be used to retrieve the next page of results.This value is null when there are no more results to return.

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. 355).

248

Page 256: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドListFleets

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• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

249

Page 257: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 250)

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. 313) objects

Array Members: Fixed number of 1 item.

Required: NomaxResults (p. 250)

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. 250)

The nextToken value returned from a previous paginated ListRobotApplications request wheremaxResults was used and the results exceeded the value of that parameter. Pagination continuesfrom the end of the previous results that returned the nextToken value.

250

Page 258: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドListRobotApplications

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: [a-zA-Z0-9_.\-\/+=]*

Required: NoversionQualifier (p. 250)

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. 251)

The nextToken value to include in a future ListRobotApplications request. When the resultsof a ListRobotApplications request exceed maxResults, this value can be used to retrieve thenext page of results. This value is null when there are no more results to return.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: [a-zA-Z0-9_.\-\/+=]*robotApplicationSummaries (p. 251)

A list of robot application summaries that meet the criteria of the request.

251

Page 259: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドListRobotApplications

Type: Array of RobotApplicationSummary (p. 329) 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. 355).

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• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

252

Page 260: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドListRobots

ListRobotsReturns a list of robots. You can optionally provide filters to retrieve specific robots.

Request Syntax

POST /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. 253)

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. 313) objects

Array Members: Fixed number of 1 item.

Required: NomaxResults (p. 253)

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. 253)

The nextToken value returned from a previous paginated ListRobots request where maxResultswas used and the results exceeded the value of that parameter. Pagination continues from the end ofthe previous results that returned the nextToken value.

253

Page 261: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 254)

The nextToken value to include in a future ListRobots request. When the results of a ListRobotrequest exceed maxResults, this value can be used to retrieve the next page of results. This value isnull when there are no more results to return.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: [a-zA-Z0-9_.\-\/+=]*robots (p. 254)

A list of robots that meet the criteria of the request.

Type: Array of Robot (p. 326) 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. 355).

254

Page 262: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

255

Page 263: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 256)

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. 313) objects

Array Members: Fixed number of 1 item.

Required: NomaxResults (p. 256)

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. 256)

The nextToken value returned from a previous paginated ListSimulationApplications requestwhere maxResults was used and the results exceeded the value of that parameter. Paginationcontinues from the end of the previous results that returned the nextToken value.

256

Page 264: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドListSimulationApplications

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: [a-zA-Z0-9_.\-\/+=]*

Required: NoversionQualifier (p. 256)

The version qualifier of the simulation application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: ALL

Required: No

Response Syntax

HTTP/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. 257)

The nextToken value to include in a future ListSimulationApplications request. When theresults of a ListRobot request exceed maxResults, this value can be used to retrieve the next pageof results. This value is null when there are no more results to return.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

257

Page 265: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドListSimulationApplications

Pattern: [a-zA-Z0-9_.\-\/+=]*simulationApplicationSummaries (p. 257)

A list of simulation application summaries that meet the criteria of the request.

Type: Array of SimulationApplicationSummary (p. 337) 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. 355).

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• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

258

Page 266: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドListSimulationJobBatches

ListSimulationJobBatchesReturns a list simulation job batches. You can optionally provide filters to retrieve specific simulation batchjobs.

Request SyntaxPOST /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. 259)

Optional filters to limit results.

Type: Array of Filter (p. 313) objects

Array Members: Fixed number of 1 item.

Required: NomaxResults (p. 259)

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. 259)

The nextToken value returned from a previous paginated ListSimulationJobBatches requestwhere maxResults was used and the results exceeded the value of that parameter. Paginationcontinues from the end of the previous results that returned the nextToken value.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: [a-zA-Z0-9_.\-\/+=]*

259

Page 267: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドListSimulationJobBatches

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. 260)

The nextToken value to include in a future ListSimulationJobBatches request. When the resultsof a ListSimulationJobBatches request exceed maxResults, this value can be used to retrievethe next page of results. This value is null when there are no more results to return.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: [a-zA-Z0-9_.\-\/+=]*simulationJobBatchSummaries (p. 260)

A list of simulation job batch summaries.

Type: Array of SimulationJobBatchSummary (p. 343) objects

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 355).

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.

260

Page 269: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 262)

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. 313) objects

Array Members: Fixed number of 1 item.

Required: NomaxResults (p. 262)

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. 262)

The nextToken value returned from a previous paginated ListSimulationJobs request wheremaxResults was used and the results exceeded the value of that parameter. Pagination continuesfrom the end of the previous results that returned the nextToken value.

262

Page 270: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドListSimulationJobs

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

{ "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. 263)

The nextToken value to include in a future ListSimulationJobs request. When the results of aListRobot request exceed maxResults, this value can be used to retrieve the next page of results.This value is null when there are no more results to return.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: [a-zA-Z0-9_.\-\/+=]*simulationJobSummaries (p. 263)

A list of simulation job summaries that meet the criteria of the request.

Type: Array of SimulationJobSummary (p. 348) objects

Array Members: Minimum number of 0 items. Maximum number of 100 items.

263

Page 271: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドListSimulationJobs

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 355).

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• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

264

Page 272: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 265)

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. 265)

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.

265

Page 273: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドListTagsForResource

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

ErrorsFor information about the errors that are common to all actions, see Common Errors (p. 355).

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• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

266

Page 274: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 267)

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. 267)

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"}

267

Page 275: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 267)

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. 267)

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. 355).

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

268

Page 277: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 270)

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. 355).

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.

270

Page 278: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

271

Page 279: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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": [ {

272

Page 280: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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 } } ], "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. 272)

The batch policy.

Type: BatchPolicy (p. 300) object

Required: NoclientRequestToken (p. 272)

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: No

273

Page 281: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドStartSimulationJobBatch

createSimulationJobRequests (p. 272)

A list of simulation job requests to create in the batch.

Type: Array of SimulationJobRequest (p. 345) objects

Array Members: Minimum number of 1 item.

Required: Yestags (p. 272)

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 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": [ { "failedAt": number, "failureCode": "string", "failureReason": "string", "request": { "compute": { "simulationUnitLimit": number }, "dataSources": [ {

274

Page 282: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドStartSimulationJobBatch

"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 } } ], "tags": { "string" : "string" }, "useDefaultApplications": boolean, "vpcConfig": {

275

Page 283: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドStartSimulationJobBatch

"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 } } ], "simulationApplications": [ { "application": "string", "applicationVersion": "string", "launchConfig": { "environmentVariables": { "string" : "string" }, "launchFile": "string", "packageName": "string", "portForwardingConfig": { "portMappings": [

276

Page 284: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドStartSimulationJobBatch

{ "applicationPort": number, "enableOnPublicIp": boolean, "jobPort": number } ] }, "streamUI": boolean } } ], "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. 274)

The Amazon Resource Name (arn) of the batch.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*batchPolicy (p. 274)

The batch policy.

Type: BatchPolicy (p. 300) objectclientRequestToken (p. 274)

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. 274)

The time, in milliseconds since the epoch, when the simulation job batch was created.

Type: Timestamp

277

Page 285: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドStartSimulationJobBatch

createdRequests (p. 274)

A list of created simulation job request summaries.

Type: Array of SimulationJobSummary (p. 348) objects

Array Members: Minimum number of 0 items. Maximum number of 100 items.failedRequests (p. 274)

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. 311) objectsfailureCode (p. 274)

The failure code if the simulation job batch failed.

Type: String

Valid Values: InternalServiceErrorfailureReason (p. 274)

The reason the simulation job batch failed.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1024.

Pattern: .*pendingRequests (p. 274)

A list of pending simulation job requests. These requests have not yet been created into simulationjobs.

Type: Array of SimulationJobRequest (p. 345) objects

Array Members: Minimum number of 1 item.status (p. 274)

The status of the simulation job 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).

278

Page 286: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドStartSimulationJobBatch

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. 274)

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. 355).

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.

279

Page 287: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドStartSimulationJobBatch

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• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

280

Page 288: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 281)

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. 281)

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": [ {

281

Page 289: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 281)

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. 281)

The time, in milliseconds since the epoch, when the fleet was created.

Type: TimestampdeploymentApplicationConfigs (p. 281)

Information about the deployment application configurations.

Type: Array of DeploymentApplicationConfig (p. 305) objects

Array Members: Fixed number of 1 item.deploymentConfig (p. 281)

Information about the deployment configuration.

Type: DeploymentConfig (p. 306) object

282

Page 290: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドSyncDeploymentJob

failureCode (p. 281)

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

283

Page 291: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドSyncDeploymentJob

failureReason (p. 281)

The failure reason if the job fails.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1024.

Pattern: .*fleet (p. 281)

The Amazon Resource Name (ARN) of the fleet.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*status (p. 281)

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. 355).

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

284

Page 292: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

285

Page 293: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 286)

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. 286)

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

286

Page 294: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 355).

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• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

287

Page 295: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 288)

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. 288)

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. 355).

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500

288

Page 296: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

289

Page 297: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 290)

The application information for the robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: YescurrentRevisionId (p. 290)

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. 290)

The robot software suite (ROS distribution) used by the robot application.

290

Page 298: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドUpdateRobotApplication

Type: RobotSoftwareSuite (p. 333) object

Required: Yessources (p. 290)

The sources of the robot application.

Type: Array of SourceConfig (p. 352) 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. 291)

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. 291)

The time, in milliseconds since the epoch, when the robot application was last updated.

Type: Timestampname (p. 291)

The name of the robot application.

291

Page 299: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドUpdateRobotApplication

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_\-]*revisionId (p. 291)

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. 291)

The robot software suite (ROS distribution) used by the robot application.

Type: RobotSoftwareSuite (p. 333) objectsources (p. 291)

The sources of the robot application.

Type: Array of Source (p. 351) objectsversion (p. 291)

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. 355).

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.

292

Page 300: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V3

293

Page 301: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 294)

The application information for the simulation application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

Required: YescurrentRevisionId (p. 294)

The revision id for the robot application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 40.

294

Page 302: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドUpdateSimulationApplication

Pattern: [a-zA-Z0-9_.\-]*

Required: NorenderingEngine (p. 294)

The rendering engine for the simulation application.

Type: RenderingEngine (p. 325) object

Required: NorobotSoftwareSuite (p. 294)

Information about the robot software suite (ROS distribution).

Type: RobotSoftwareSuite (p. 333) object

Required: YessimulationSoftwareSuite (p. 294)

The simulation software suite used by the simulation application.

Type: SimulationSoftwareSuite (p. 350) object

Required: Yessources (p. 294)

The sources of the simulation application.

Type: Array of SourceConfig (p. 352) 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"

295

Page 303: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 295)

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. 295)

The time, in milliseconds since the epoch, when the simulation application was last updated.

Type: Timestampname (p. 295)

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. 295)

The rendering engine for the simulation application.

Type: RenderingEngine (p. 325) objectrevisionId (p. 295)

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. 295)

Information about the robot software suite (ROS distribution).

Type: RobotSoftwareSuite (p. 333) objectsimulationSoftwareSuite (p. 295)

The simulation software suite used by the simulation application.

Type: SimulationSoftwareSuite (p. 350) object

296

Page 304: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドUpdateSimulationApplication

sources (p. 295)

The sources of the simulation application.

Type: Array of Source (p. 351) objectsversion (p. 295)

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. 355).

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

297

Page 305: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドData Types

• 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. 300)• Compute (p. 301)• ComputeResponse (p. 302)• DataSource (p. 303)• DataSourceConfig (p. 304)• DeploymentApplicationConfig (p. 305)• DeploymentConfig (p. 306)• DeploymentJob (p. 307)• DeploymentLaunchConfig (p. 309)• FailedCreateSimulationJobRequest (p. 311)• Filter (p. 313)• Fleet (p. 314)• LaunchConfig (p. 316)• LoggingConfig (p. 318)• NetworkInterface (p. 319)• OutputLocation (p. 320)• PortForwardingConfig (p. 321)• PortMapping (p. 322)• ProgressDetail (p. 323)• RenderingEngine (p. 325)• Robot (p. 326)• RobotApplicationConfig (p. 328)• RobotApplicationSummary (p. 329)• RobotDeployment (p. 331)• RobotSoftwareSuite (p. 333)• S3KeyOutput (p. 334)• S3Object (p. 335)• SimulationApplicationConfig (p. 336)• SimulationApplicationSummary (p. 337)• SimulationJob (p. 339)• SimulationJobBatchSummary (p. 343)• SimulationJobRequest (p. 345)• SimulationJobSummary (p. 348)• SimulationSoftwareSuite (p. 350)• Source (p. 351)• SourceConfig (p. 352)

298

Page 306: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドData Types

• VPCConfig (p. 353)• VPCConfigResponse (p. 354)

299

Page 307: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for Ruby V3

300

Page 308: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for Ruby V3

301

Page 309: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for Ruby V3

302

Page 310: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 334) 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• AWS SDK for Ruby V3

303

Page 311: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for Ruby V3

304

Page 312: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 309) 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• AWS SDK for Ruby V3

305

Page 313: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 335) 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• AWS SDK for Ruby V3

306

Page 314: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 305) objects

Array Members: Fixed number of 1 item.

Required: NodeploymentConfig

The deployment configuration.

Type: DeploymentConfig (p. 306) 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

307

Page 315: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for Ruby V3

308

Page 316: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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.

309

Page 317: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for Ruby V3

310

Page 318: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 345) 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++

311

Page 320: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for Ruby V3

313

Page 321: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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.

314

Page 322: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for Ruby V3

315

Page 323: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 321) 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

316

Page 324: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for Ruby V3

317

Page 325: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for Ruby V3

318

Page 326: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for Ruby V3

319

Page 327: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for Ruby V3

320

Page 328: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドPortForwardingConfig

PortForwardingConfigConfiguration information for port forwarding.

ContentsportMappings

The port mappings for the configuration.

Type: Array of PortMapping (p. 322) 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• AWS SDK for Ruby V3

321

Page 329: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for Ruby V3

322

Page 330: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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

323

Page 331: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for Ruby V3

324

Page 332: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for Ruby V3

325

Page 333: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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.

326

Page 334: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for Ruby V3

327

Page 335: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 316) 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• AWS SDK for Ruby V3

328

Page 336: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 333) 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:

329

Page 338: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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

331

Page 339: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドRobotDeployment

progressDetail

Information about how the deployment is progressing.

Type: ProgressDetail (p. 323) 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• AWS SDK for Ruby V3

332

Page 340: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for Ruby V3

333

Page 341: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for Ruby V3

334

Page 342: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for Ruby V3

335

Page 343: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 316) 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• AWS SDK for Ruby V3

336

Page 344: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 333) object

Required: NosimulationSoftwareSuite

Information about a simulation software suite.

Type: SimulationSoftwareSuite (p. 350) 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]*

337

Page 345: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for Ruby V3

338

Page 346: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 302) object

Required: NodataSources

The data sources for the simulation job.

Type: Array of DataSource (p. 303) 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

339

Page 347: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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.

340

Page 348: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドSimulationJob

Type: LoggingConfig (p. 318) 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. 319) object

Required: NooutputLocation

Location for output files generated by the simulation job.

Type: OutputLocation (p. 320) object

Required: NorobotApplications

A list of robot applications.

Type: Array of RobotApplicationConfig (p. 328) objects

Array Members: Fixed number of 1 item.

Required: NosimulationApplications

A list of simulation applications.

Type: Array of SimulationApplicationConfig (p. 336) objects

Array Members: Fixed number of 1 item.

Required: NosimulationTimeMillis

The simulation job execution duration in milliseconds.

Type: Long

341

Page 349: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 354) 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• AWS SDK for Ruby V3

342

Page 350: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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.

343

Page 351: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for Ruby V3

344

Page 352: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドSimulationJobRequest

SimulationJobRequestInformation about a simulation job request.

Contentscompute

Compute information for the simulation job

Type: Compute (p. 301) 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. 304) 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.

345

Page 353: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドSimulationJobRequest

Type: LoggingConfig (p. 318) 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. 320) object

Required: NorobotApplications

The robot applications to use in the simulation job.

Type: Array of RobotApplicationConfig (p. 328) objects

Array Members: Fixed number of 1 item.

Required: NosimulationApplications

The simulation applications to use in the simulation job.

Type: Array of SimulationApplicationConfig (p. 336) 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

346

Page 354: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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. 353) 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• AWS SDK for Ruby V3

347

Page 355: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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.

348

Page 356: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for Ruby V3

349

Page 357: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for Ruby V3

350

Page 358: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for Ruby V3

351

Page 359: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for Ruby V3

352

Page 360: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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• AWS SDK for Ruby V3

353

Page 361: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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

354

Page 362: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドCommon Errors

• AWS SDK for Java• AWS SDK for Ruby V3

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.

355

Page 363: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイドCommon Parameters

HTTP Status Code: 400MissingAuthenticationToken

The request must contain either a valid (registered) AWS access key ID or X.509 certificate.

HTTP Status Code: 403MissingParameter

A required parameter for the specified action is not supplied.

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.

356

Page 364: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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.

357

Page 365: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

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

358

Page 366: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド

制限とサポートされているリージョン

AWS RoboMaker サービスの制限については、「AWS RoboMaker の制限」を参照してください。

AWS リソースの制限引き上げリクエストについては、「AWS のサービス制限」を参照してください。

AWS RoboMaker をサポートする AWS リージョンのリストについては、「AWS RoboMaker のリージョン」を参照してください。

359

Page 367: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド

AWS RoboMaker のドキュメント履歴

次の表は、今回リリースされた AWS RoboMaker に関するドキュメントの説明です。

変更 説明 日付

新しいサービスとガイド これは AWS RoboMaker の最初のリリースおよび AWSRoboMaker 開発者ガイドです。

11/07/2018

タグのサポート 多くの AWS RoboMaker リソースにタグのサポートが追加されました。

1/24/2019

360

Page 368: AWS RoboMaker - 開発者ガイド › ja_jp › robomaker › latest › ... · AWS RoboMaker 開発者ガイド AWS RoboMaker を初めて使用する場合 AWS RoboMaker とは

AWS RoboMaker 開発者ガイド

AWS の用語集最新の AWS の用語については、『AWS General Reference』の「AWS の用語集」を参照してください。

361