Skip to content

Quickstart

Simulated example

The fastest way to try out the LARA suite is by running the simulated example provided by the adaptation template.

There are two ways to run the example: using Docker or running it directly with Python.

Cloning the repository

Whether you choose to run the example with Docker or Python, you first need to clone the repository:

git clone https://gitlab.com/OpenLabAutomation/adaption-template.git
cd adaption-template

Running with Docker

Running the example with docker is straightforward, but it does require that you have the Docker Desktop or Docker Engine installed on your machine.

To run the example with Docker, go to the root directory of the cloned repository and run the following command:

docker-compose up

Running with Python

First, use your favorite tool to create and activate a new Python environment with Python 3.11 or higher. For example with pyvenv on linux:

   Python -m venv labautomation
   source labautomation/bin/activate
3. Install all necessary packages: - to install all mandatory dependencies, run:
    pip install -r requirements.txt -e .
- to also install the example sila servers (necessary for the demo examples to run) add:
    pip install -r requirements_servers.txt
- to also install requirements for stronger scheduling algorithms, run:
    pip install -r requirements_mip_cp.txt
4. Install and set up the database

Installation: Run

    git clone https://gitlab.com/OpenLabAutomation/lab-automation-packages/platform_status_db.git
    pip install -e platform_status_db/.
Setup: Run and follow the instructions to create an admin login to Django. On Windows you will have execute the steps manually.

    bash scripts/init_db.sh

Fill the database: Run

    Python scripts/add_lab_setup_to_db.py
This adds the lab setup as described in platform_config.yml to the database. Rerun this script after you customized the config file.

Startup

Call from different console tabs

Option 1: In gnome terminal you could start all four of the following services in different tabs by running

bash scripts/run_services.sh

Option 2: Otherwise use individual commands (remember activating the virtual environment):

To start the scheduler:

labscheduler
To start the django database view (optional). If you changed directory, adapt the path:
run_db_server
To start the orchestrator:

laborchestrator

To start demo servers:

start_sila_servers

Usage

You can access the GUI for different components: - database of present labware at http://127.0.0.1:8000/job_logs/present_labware/ - orchestrator at http://127.0.0.1:8050/ - the human interaction sila server: http://127.0.0.1:8054/ - view and manual control of the robotic arm: http://127.0.0.1:8055/

To see how the example servers are controlled from the orchestrator, go to the the orchestrator GUI and load and start one of the example processes. - GreeterTest: Sends a Hello-World to the sila2-example-server - MoverTest: You can view the robots movements in the robot GUI - HumanTest: you will have to finish the tasks in the human interaction GUI - InterestingExample: A more complex workflow with runtime decisions based on human interaction

Orchestrator UI
Orchestrator UI

Loading and running a process

  1. Go to the left dropdown menu and choose a process to load.
  2. Click on "Load Process"
  3. The corresponding workflow graph should appear below. You can zoom in/out and move it. Clicking on nodes dumps its data structure as string into the textfield above (you might have to move the graph a bit down, so it gets visible).
  4. Your loaded process should appear in the second dropdown menu. Choose it.
  5. Click on "Add Containers to DB". This creates entries for all labware in that process in the positions described in the process in case there isn't already labware. Existing labware is considered to belong to that process. You can see all present labware in the database view which updates automatically.
  6. (Optional) Click on "Schedule Process" to get a predicted schedule. It will appear the Gantt chart.
  7. Click on "Start Process". This will update the schedule and will execute steps accordingly. You can monitor the progress in the orchestrator GUI and the labware movements in the database view.

Things to observe during the process

While the process runs you can observe different features of our framework.

  1. Live updates of the process in the orchestrator:
  2. The Gantt chart has a moving bar of where in time you currently are
  3. Process step nodes in the graph turn yellow while they are being executed and green when they are finished. Pink means there was an error.
  4. If a barcode for any labware equipment is read or assigned, it is shown in the Gantt chart
  5. Live updates of the database
  6. In the database view (which auto-reloads to reflect modifications), all labware is listed with its barcode and current position.
  7. The admin view of the database allows you to see the results and the labware involved, as well as to change the duration and starting time of each step. The credentials are the ones you chose during the installation process for the superuser.