-
Notifications
You must be signed in to change notification settings - Fork 1
Setting up
Setting up your code to interact with our simulation takes 3 steps:
- Step 1: Setup the Assembly Server Docker Image
- Step 2: Dockerize your Code
- Step 3: Simulate Our Evaluation Process
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_serveror
FROM s4dx/assembly_server as basefor 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:=somevalueto 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.
Home / Setup Guide / Interfacing the Sim
Copyright © 2023 Universität Bielefeld, Fraunhofer Institute for Manufacturing Engineering and Automation IPA