-
Notifications
You must be signed in to change notification settings - Fork 97
qual_cloudsim
This tutorial describes how to submit a Docker image to the Portal for the Tunnel Qualification (Virtual STIX) and Tunnel Circuit.
Docker images are required, and teams will be provided a private Docker repository. Alternatively, a team is more than welcome to use other Docker repositories, such as Dockerhub.
-
Make sure you have registered on the Portal.
-
Create and test your Docker image. This docker image should contain your solution. There are numerous resources online that describe how to install, setup, and use Docker. If you want a good starting point, please look at this tutorial.
-
Upload your Docker image to a repository. The following instructions assume you are using the provided AWS ERC based repository.
Make sure you have installed the AWS CLI tool, and configured it with your team's credentials. These credentials will be provided to you. If you don't have credentials, then please contact us at [email protected].
Use the provided
subt_docker.bash
script to tag and upload your docker image. Usage of this script is$ ./install/share/subt_ign/scripts/subt_docker.bash <team_name> <local_docker_image> <local_tag> <upstream_tag> team_name: This is the name of your team. This is also the name of your Docker repository. local_tag: This is the tag associated with your docker image. A common tag is 'latest'. upstream_tag: This is the tag you want associated with your image when uploaded to the repository. This will let you version your docker images.
For example, if your team name is
foo
, you have a docker image calledsolution_bar:latest
, and you want to version this image with the namevirtual_stix
:subt_docker.bash foo solution_bar latest virtual_stix
This script will log you into docker, tag your image, and push the image to your repository. The final output of the script is the URL of your Docker image. Use this URL when "Uploading a Simulation" on the Portal.
-
Log into the Portal.
-
Click on the "Upload a Simulation" button.
-
Give your submission a name. This name is just for bookkeeping, and must contain only alpha-numeric characters.
-
Choose the event for your submission using the dropdown box.
-
Add robots to your team.
-
Each robot must have a unique name. The name must have only alpha-numeric characters.
-
Specify the URL of your Docker image for the robot. This can the URL provided from the
subt_docker.bash
script, or from another source such as DockerHub. -
Choose the robot type from the dropdown box.
-
Click the Add button, and continue adding more robots until you have built your entire team.
-
-
Click Submit
-
You should now see a new entry in the "Simulations" card. This entry will receive status updates as the simulation instance runs.
-
Once the simulation instance completes, download the log files using the download button located at the far right of the simulation entry.
-
Review these log files. If you like the results, then upload these log files using the "Upload a log file" button.
-
The cloudsim bridge instance runs the
ROS_MASTER
, refer to the cloudsim architecture. While you can create a multi-master setup, chances are you should not run your own ROS master. -
The
/subt/start
and/subt/finish
ROS service calls are optional, refer to the API documentation. -
Use the docker compose guide to re-create the cloudsim setup on your local computer.
-
Your docker images must run forever (not exit).
-
Gazebo state information and server console messages are logged on the Ignition Gazebo instance. ROS console messages are captured in the Bridge Container on each Robot instance. Additionally, a rosbag of the
/rosout_agg
topic is captured in the Bridge Container in a file calledrosout_agg.bag
. All of these log files are available for download following a successful simulation run.
If you are using the provided Docker repository, then you can make use of the following scripts.
To list all the images that you have uploaded to your repository:
$ ./install/share/subt_ign/scripts/subt_docker_list.bash <team_name>
Pay attention to the imageTag
field, which should be used when submitting a cloud simulation solution. Use the subt_docker_uri.bash
script to convert an imageTag
to a full URI.
To convert an image tag to a full URI, which can be used when submitting a cloud simulation solution:
$ ./install/share/subt_ign/scripts/subt_docker_list.bash <team_name> <image_tag>
The <image_tag>
can be acquired from the subt_docker_list.bash
script.