[RoboMaker] Where to get ROBOMAKER_ROBOT_APP_IP and ROBOMAKER_SIM_APP_IP when running a simulation job with images

0

I'm following the tutorial in https://docs.aws.amazon.com/robomaker/latest/dg/run-hello-world-ros.html and have successfully build the images, pushed to ECR and created simulation job with them.

However when running the simulation job, both instances needs to be told where their respective IP are beforehand, which it's usually available after the simulation job is running.

So is it possible to know which IP the instances is getting assigned before the instances are up and running?

質問済み 2年前328ビュー
1回答
0

Hello @AWS-User-0325661

We recently published a new blog article that describes in depth the process to create and run ROS docker containers in AWS RoboMaker. Hopefully this can be a helpful resource!

Once a VPC is configured, the IP of the underlying simulation job should be available when using Type: General (your container image) via the environment variables ROBOMAKER_SIM_APP_IP and ROBOMAKER_ROBOT_APP_IP.

In the blog, we include a sample JSON file with parameters for create-simulation-job. Here, we set the following environment variables.

"ROS_IP": "ROBOMAKER_SIM_APP_IP",
"ROS_MASTER_URI": "http://ROBOMAKER_ROBOT_APP_IP:11311",
"GAZEBO_MASTER_URI": "http://ROBOMAKER_SIM_APP_IP:11345"

In ROS1, this will enable you to connect the Robot and Simulation Application containers together, on a shared ROS core.

If it is an external process requiring the IP address, you could use AWS Step Functions to launch the simulation jobs (either individually, or in a batch) - then run DescribeSimulationJob API call (through a Lambda function using boto3 as an example) to get the list of IPs for a given job in the networkInterface attribute.

AWS
jer
回答済み 2年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ