Skip to content

Setting up

Balázs András Bálint edited this page Mar 17, 2023 · 5 revisions

HOME > Setup Guide

Setting up your code to interact with our simulation takes 3 steps:

First download the Assembly Docker Image from here (the password was provided to you in the mail announcing the docker image release). And then import the docker image to your local machine by running docker load < docker.assembly_sever-vVERSION, replacing VERSION with the version you donwloaded. Then tag the downlaoded image with the latest tag by running docker tag s4dx/assembly_server:VERSION s4dx/assembly_server:latest.

Verify you are able to launch it by running docker run --rm -it s4dx/assembly_server. The container should now start and show some INFO prints in your terminal. You can stop the container by pressing C-c (Ctr+c).

You can now proceed to step 2: dockerize your code

As example code, we provide provide the assembly_example ROS package. For guidance on how to write code that interacts with the simulation, please see interfacing the simulation. Here we only describe how your code should be packaged.

Your submission will be of the form of two docker images: one for the screw task, and one for the plugging task. To this end, create two Dockerfiles adhering to the best practices for writing Dockerfiles in order to keep the resulting images as small as possible, and compile them into images.

Note, that your image should use the s4dx/assembly_server as base image, because you need to source the ROS message definitions of the server workspace in order to communicate over ROS. Thus, the first line of your Dockerfile must be

FROM s4dx/assembly_server

or

FROM s4dx/assembly_server as base

for a multi-stage build.

Furthermore, your Dockerfile should define an entrypoint which directly launches your application without any further commandline arguments. And please use a unique identifier as repository name for your docker images, e.g. YOURTEAMNAME/assembly_screw and YOURTEAMNAME/assembly_plug.

Tip: use roslaunch --wait your_package your_launchfile your_arg:=somevalue to make the launchscript wait for a roscore, instead of creating one!

See screw.Dockerile, and plug.Dockerfile as an example of how to build your docker images as multi-stage builds where only the entrypoint differs.

Once you have built your docker images, you can proceed with [step 3: ]

To simulate our scoring and evaluation process, copy one of our example docker-compose files (screwing, plugging) and replace s4dx/assembly_screw_example:latest with the identifier of the image you want to evaluate. Then run docker-compose -f PATH_TO_YOUR_COMPOSE_FILE up. Once the task is completed or the timeout condition is met, the score of your task will be printed in the terminal and the container will shutdown on its own.

Clone this wiki locally