ROS container FAQs - AWS RoboMaker

ROS container FAQs

This page lists common questions and answers related to migrating ROS-based robot and simulation applications to Docker containers suitable for running in AWS RoboMaker.

Our workflow submits simulation jobs using colcon-bundled robot and simulation applications. Do I need to migrate?

Yes, you must migrate. The steps to migrate are located at Migrating ROS applications to containers.

I am not sure if my robot and simulation applications need to be migrated. How can I tell?

You can check via the AWS console or the AWS CLI. For instructions, choose the following applicable tab.

Using the console
  1. Sign in to the AWS RoboMaker console.

  2. In the left navigation pane, choose Development, and then choose Simulation applications.

  3. Select the Name of a simulation application to see its details.

    If you see General and Simulation runtime, migration is not necessary. If you see any ROS or Gazebo specific values, you must migrate.

Using the AWS CLI

The following is an example AWS CLI command that performs the equivalent of the console-based steps.

aws robomaker describe-simulation-application --application YOUR-SIM-APP-ARN

This command returns output that indicates the simulationSoftwareSuite, the robotSoftwareSuite (if applicable), and the environment URI. If you see Simulation Runtime as the simulationSoftwareSuite and General as the robotSoftwareSuite, and your environment URI is set, your simulation applications do not require migration.

How do the robot and simulation application containers communicate with each other?

It is no different from how ROS-based applications typically communicate with each other using ROS middleware. However, you must set some ROS-specific environment variables within the launch configuration objects of your simulation job request.

The following is an example snippet of the settings you must use for the robot application launchConfig.

"robotApplications": [ { "application": "YOUR-ROBOT-APP-ARN", "applicationVersion": "$LATEST", "launchConfig": { "environmentVariables": { "ROS_IP": "ROBOMAKER_ROBOT_APP_IP", "ROS_MASTER_URI": "http://ROBOMAKER_ROBOT_APP_IP:11311", "GAZEBO_MASTER_URI": "http://ROBOMAKER_SIM_APP_IP:11345" }, ... # Removed extra data for clarity } ]

The following is an example snippet of the settings you must use for the simulation application launchConfig.

"simulationApplications": [ { "application": "YOUR-SIM-APP-ARN", "applicationVersion": "$LATEST", "launchConfig": { "environmentVariables": { "ROS_IP": "ROBOMAKER_SIM_APP_IP", "ROS_MASTER_URI": "http://ROBOMAKER_ROBOT_APP_IP:11311", "GAZEBO_MASTER_URI": "http://ROBOMAKER_SIM_APP_IP:11345" }, ... # Removed extra data for clarity } ]

The containers communicate with each other as expected if you use the provided ROBOMAKER_* strings and port numbers to set ROS_IP, ROS_MASTER_URI, and GAZEBO_MASTER_URI.

For more information, see Running a simulation.

Where did my Real-Time Factor (RTF) metric go? How can I restore it?

AWS RoboMaker no longer publishes this metric automatically. If you want to publish this metric to CloudWatch, you must import the AWS RoboMaker CloudWatch Publisher package into your simulation application and modify your simulation launch file using the instructions provided in the README.md file.

How do I cancel and tag my simulation jobs?

You can use the VPC configuration to self-tag or self-cancel your AWS RoboMaker simulation jobs using the generic AWS APIs. To use the following approach, the container must be running in a VPC with a public route through a NAT or IGW to the AWS APIs. The simplest approach is to use a public subnet in your default VPC to connect to AWS APIs. If you'd like to run simulations in a private subnet, you could alternatively set up a NAT or set up an interface VPC endpoint. For more information, see AWS RoboMaker and interface VPC endpoints (AWS PrivateLink).

Note

If you are using the IGW, make sure to set assignPublicIp=True as described in the documentation below. If you are using a public IP, ensure that your security groups are sufficiently locked down.

You must add the following block to the request parameters.

vpcConfig={ 'subnets': [ 'string', ], 'securityGroups': [ 'string', ], 'assignPublicIp': True|False },

In addition, the AWS RoboMaker simulation job must have an IAM role with permissions to tag and cancel simulation jobs.

In your simulation job, you can either use the AWS CLI or the boto3 Python library to call public AWS RoboMaker APIs. You must have the AWS CLI and boto3 library preinstalled in your container before you can use them in a AWS RoboMaker simulation job. The following Python sample code shows how to cancel a simulation job.

class RoboMakerUtils: def __init__(self): self.job_arn = os.getenv('AWS_ROBOMAKER_SIMULATION_JOB_ARN') self.client = boto3.client('robomaker', region_name=os.getenv('AWS_ROBOMAKER_REGION', 'us-east-1')) def tag_robomaker_sim_job(self, key, value): self.client.tag_resource( resourceArn=self.job_arn, tags={ key: str(value) } ) def cancel_robomaker_sim_job(self): self.tag_robomaker_sim_job("END_TIME", time.time()) response = self.client.cancel_simulation_job( job=self.job_arn )

How do I import Simulation WorldForge worlds into the simulation job?

If you need to import Simulation WorldForge assets into your simulation job, use the DataSource API. This allows you to import world assets from the Amazon S3 output directory of the world export job into a destination of your choosing within your simulation job container.

For more information, see Using exported worlds in simulation.

My application's log files are not being created. What's going on?

Make sure you have created all the output directories you rely on for debugging related artifacts in your Dockerfile. For example, you can add the following line to your Dockerfile.

RUN mkdir -p $YOUR_LOG_DIR

For more information, see Adding a custom upload configuration.

My simulation application failed with 'run_id on parameter server does not match declared run_id'. What should I do?

If you are launching your ROS simulation job with both robot application and simulation application, you should add --wait to the roslaunch commands.