Job processing pipeline for the KUKA Robot Learning Lab at KIT.
- RESTful web API for submitting jobs and retrieving job data
- For an interactive documentation, see the RLL API doc page
- Includes an example web frontend page
- Server runs on port 8888 by default
- Worker for processing jobs
- Uses Docker to isolate client code; see the docker directory for the Docker setups of the available projects
- Can be configured to use a simulation or the real robot
- Test framework with a collection of intengration tests for the server and the worker
See also the test framework Readme and Docker container Readme for more information on the test framework and the Docker containers.
Please note that the RLL stack is only tested with ROS Kinetic and Melodic.
-
Create a workspace and clone the core repositories:
mkdir -p rll_ws/src && cd rll_ws catkin_init_workspace cd src git clone https://github.com/KITrobotics/rll_stack.git cd ..
-
Install dependencies:
rosdep install --from-paths src --ignore-src -r -y
Some dependencies are too outdated when installed from rosdep, so install with pip:
pip install -r rll_common/requirements.txt
This will also install a MongoDB database for storing job, user and other system data.
The
rll_server
is a Python3 application and requires some additional dependencies. Please follow the instructions in the Readme to install these dependencies. -
Build the workspace and source it:
catkin build source devel/setup.bash
-
Copy the sample config in
rll_common/config/rll.yaml.sample
torll_common/config/rll.yaml
and adapt the config for your setup. Do the same for the server config inrll_server/config/server.yaml.sample
and the worker config in
rll_worker/config/worker.yaml.sample
. It is also recommended to make the server and common config files only readable by your user as it contains passwords and other secrets. This can be done e.g. by runningchmod 0600 rll.yaml
. -
Use a ROS Master IP that is different from localhost. It has to be an IP address that is reachable from your local system and from the Docker network running on your system. You can do this by adding these lines to your
bashrc
:export ROS_IP=IP.OF.MY.MASCHINE export ROS_MASTER_URI=http://$ROS_IP:11311
Database access is configured in the server config file. The directories for storing job data need to be set there, too. You also need a webserver that has access to the job data directory and can serve the files. We recommend configuring Apache for this purpose. You can also use Apache as a proxy in front of the RLL server and the webcams.
Some project settings need to be set in the database. You can get started by using the default settings. These can be set by running a script:
./rll_common/scripts/edit_projects.py set_defaults
The script also allows you to modify the project settings. See its help text for more information.
The server and worker can be launched in production or test mode. The
mode is set with the optional parameter production
(default:
false
) for the launch file.
Additionally, the worker can be launched with the following arguments:
robot
: Namespace the worker should be started in; default:iiwa
project
: Name of the project the worker should process; default:robot_playground_project
manual
: Iftrue
, the next job is only executed whenEnter
is pressed; default:false
mode
:sim
for simulation,real
for the real robot; default:sim
sim_check
: if mode isreal
, the previous check in simulation can be disabled when setting tofalse
; default:true
To test if jobs are processed correctly, you can use the Git submission option from the command line, e.g. for the Robot Playground project:
curl -X POST -F "op=submit_git" -F "username=1"
-F "secret=SET_YOUR_SECRET_HERE"
-F "project=rll_robot_playground_project"
-F "git_url=https://gitlab.ipr.kit.edu/rll/rll_robot_playground_project.git"
-F "git_tag=greetings-v0.4" -F "ros_distro=melodic"
http://localhost:8888/jobs