Batching simulations - AWS RoboMaker

Batching simulations

This section provides information about how you can start and manage simulation job batches. Using a simulation job batch, you can launch and run many simulations using a single API call to perform regression testing, parameter optimization, machine learning model training, and synthetic data generation.

Note

Simulation job batches can only be started using the AWS RoboMaker SDK or AWS CLI. You can view, clone, and cancel simulation batches using the AWS RoboMaker console.

Starting a simulation job batch

Simulation job batches are started from the AWS SDK or AWS CLI. A simulation job batch includes one or more simulation job requests. Each simulation job request identifies which applications to use in each simulation, the maximum duration of the job, and other information. You can apply tags to the simulation job batch and each simulation job request.

To start a simulation job batch, you must do the following:
  1. Install the AWS Command Line Interface. For more information about installing the AWS CLI, see Installing the AWS CLI.

  2. Copy the following JSON into a file named startsimjobbatch.json. Modify the file to match your desired configuration, and then save it.

    { "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": { "command": [ "roslaunch", "hello_world_robot", "rotate.launch" ] } } ], "tags": { "myRequestTagKey" : "myRequestTagValue" } }, { "maxJobDurationInSeconds": 300, "iamRole": "arn:aws:iam::111111111111:role/MyRole", "failureBehavior": "Fail", "simulationApplications": [ { "application": "arn:aws:robomaker:us-east-1:111111111111:simulation-applicationMySimulationApplicationArn", "launchConfig": { "command": [ "roslaunch", "hello_world_simulation", "empty_world.launch" ] } } ] } ], "tags": { "myBatchTagKey" : "myBatchTagValue" } }
  3. Open a command prompt, then run the following AWS CLI command:

    $ aws robomaker start-simulation-job-batch --cli-input-json file://startsimjobbatch.json

    To view the simulation job batch, see View a simulation job batch.

View a simulation job batch

You can view information about a simulation job batch including details about simulation job requests in the batch.

To see the details of a simulation job batch

Follow the steps under one of the following tabs:

Using the console
  1. Sign in to the AWS RoboMaker console at https://console.aws.amazon.com/robomaker/.

  2. In the left navigation pane, choose Simulations, then choose Simulation job batches.

  3. Select the Id of a simulation job batch to view its details.

Using the AWS CLI

The following is an example AWS CLI command that performs the equivalent of the console-based view simulation job on the other tab.

aws robomaker list-simulation-job-batches aws robomaker describe-simulation-job-batch --job my-simulation-job-batch-arn

Cancelling a simulation job batch

A simulation job can be cancelled if it is running and no longer needed.

To cancel a simulation job

Follow the steps under one of the following tabs:

Using the console
  1. Sign in to the AWS RoboMaker console at https://console.aws.amazon.com/robomaker/.

  2. In the left navigation pane, choose Simulations, then choose Simulation job batches.

  3. Select the Id of the simulation job batch you want to cancel.

  4. In the Simulation job batch detail page, under Batch actions, choose Cancel batch.

  5. In the Cancel simulation job batch page, select Cancel.

Using the AWS CLI

The following is an example AWS CLI command that performs the equivalent of the console-based cancel simulation job batch on the other tab.

$ aws robomaker list-simulation-job-batches $ aws robomaker cancel-simulation-job-batch --job my-simulation-job-batch-arn

Cloning a simulation job batch

You can start a new simulation job batch by cloning an existing batch. When you clone, you can include all of the simulation job requests or select a subset of requests.

Note

Simulation job batches with ROS and Gazebo software suite is not available for cloning. For more information, see Support policy.

To clone a simulation job batch:
  1. Sign in to the AWS RoboMaker console at https://console.aws.amazon.com/robomaker/.

  2. In the left navigation pane, choose Simulations, then choose Simulation job batches.

  3. Select the Id of the simulation job batch you want to clone.

  4. To clone the entire batch, in the Simulation job batch detail page, under Batch actions, choose Clone batch.

    To clone specific simulation job requests from the batch, under Simulation job requests, check the simulation job requests you want to clone, then select Request actions and choose Clone request.

  5. In the Clone simulation job batch page, select Submit.