Skip to content

Source code, containers & Helm charts enabling users to leverage the core of Google Cloud Robotics to automate fulfilment warehouse orders & tasks commissioned by SAP EWM

License

Notifications You must be signed in to change notification settings

etoster/ewm-cloud-robotics

 
 

Repository files navigation

🤖 ewm-cloud-robotics 🤖 - Build Status

Description

Human-safe collaborative robots ("Cobots") are widely available from hundreds of low-cost vendors, leading to heterogenous fleets of cobots that need to easily integrate with corresponding management systems. ewm-cloud-robotics represents such an integration, leveraging the core of Google Cloud Robotics (repo, doc) to package and distribute applications for autonomous fulfilment of warehouse orders & tasks commissioned by SAP EWM (Extended Warehouse Management) just like in the video below.

EWM Cloud Robotics

Table of Contents

Repository outline

The abap/ folder holds code to extend running SAP EWM systems with a custom OData interface, which is explained here. python-modules/ are used to build containers (docker/) for six different applications, which are packaged into Helm charts (helm/) and can subsequently be deployed in the Cloud Robotics application management(applayer-yaml/) as described here.

Sample process

If all components are installed to their target location and linked as depicted below, process automation can start:

  1. ewm-robot-controller recognizes that the robot is available and asks for work by creating a robotrequest in their local cluster
  2. robotrequests are K8s Custom Resources, which are synced between cloud/robot cluster by Cloud Robotics' federation system
  3. ewm-order-manager notices the new robotrequest and queries the EWM OData interface for a new warehouseorder
  4. EWM checks open warehouseorders and one is assigned to the given robot in the system and the order sent in the response body
  5. ewm-order-manager creates a corresponding warehouseorder in the cloud
  6. warehouseorders are CRs, thus it is synced to the desired robot
  7. ewm-robot-controller notices the new warehouseorder and start processing it by creating new missions for the robot
  8. <ROBOT>-mission-controller interprets the missions, executes the required actions and reports back
  9. [etc.] Status changes and confirmations as well as errors are propagated back to SAP EWM
architecture_overview.png

Instructions

Prerequisites

ewm-cloud-robotics can be developed and deployed on macOS or Linux, it requires the following components to be installed:

If you have not yet set up a Cloud Robotics cluster, it is also required to install bazel to build it from source (ref. Cloud Robotics cluster). Building Cloud Robotics was tested running Debian (Stretch) or Ubuntu (16.04 and 18.04) Linux. Build adaptations for macOS are not planned, thus Linux (e.g. Ubuntu 18.04) is mandatory if you're required deploy Cloud Robotics as well.

macOS

## Install Docker🐳, follow: https://runnable.com/docker/install-docker-on-macos

# Using Homebrew🍺 (https://brew.sh/):
# kubectl
brew install kubernetes-cli
# Helm
brew install kubernetes-helm
# skaffold
brew install skaffold

# Proceed by installing container-structure-test
curl -LO https://storage.googleapis.com/container-structure-test/latest/container-structure-test-darwin-amd64 && chmod +x container-structure-test-darwin-amd64 && sudo mv container-structure-test-darwin-amd64 /usr/local/bin/container-structure-test

Ubuntu Linux

## Install Docker🐳, follow: https://runnable.com/docker/install-docker-on-linux

# kubectl
sudo apt-get update && sudo apt-get install -y apt-transport-https
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
sudo apt-get install -y kubectl

# Helm (for specific versions refer to https://helm.sh/docs/using_helm/#from-the-binary-releases)
sudo snap install helm --classic

# skaffold
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64
chmod +x skaffold
sudo mv skaffold /usr/local/bin

# container-structure-test
curl -LO https://storage.googleapis.com/container-structure-test/latest/container-structure-test-linux-amd64 && chmod +x container-structure-test-linux-amd64 && sudo mv container-structure-test-linux-amd64 /usr/local/bin/container-structure-test

Cloud Robotics cluster

Follow the instructions given here to set up your Google Cloud Platform (GCP) project containing the Cloud Robotics Core. Pay attention to the fact that the build scripts are designed for usage on Debian (Stretch) or Ubuntu (16.04 and 18.04) Linux.

Deployment

Container registry

If you have modified the images and would like to use the GCR of your project you can either use the predefined skaffold profile to build, test & push all images (1), or build images required for single cloud robotics applications (2). Within both options the container registry is dynamically generated based upon your gcloud configuration (gcloud config get-value project - configurable via gcloud config set project <GCP_PROJECT>) and host eu.gcr.io. Consequently, images are pushed to eu.gcr.io/<GCP_PROJECT>/<IMAGE_NAME>. You can also use a specific container registry (3), it is assumed that access has been established beforehand.

# (1)
skaffold run --profile gcp

# (2)
./deploy.sh build ewm-order-manager

# (3)
./deploy.sh --registry=eu.gcr.io/my-gcp-project build ewm-order-manager

Configuration

In order to customize the settings of any of the Cloud Robotics applications, adjust the YAML of the AppRollout. By default the deploy.sh script uses the approllout.yaml/app.yaml files at ~/.config/ewm-cloud-robotics-deployments/<GCP_PROJECT>/<APP>/, thus one gets the best user experience by doing the following:

# (1) create the dir
mkdir -p ~/.config/ewm-cloud-robotics-deployments/$(gcloud config get-value project)

# (2) copy the templates to the created dir
cp -R applayer-yaml/ ~/.config/ewm-cloud-robotics-deployments/$(gcloud config get-value project)

# (3) verify that app folders are in the correct place (expected print: 6 app directories)
ls ~/.config/ewm-cloud-robotics-deployments/$(gcloud config get-value project)

If you work on multiple projects, switch your gcloud project configuration and repeat the steps above. This way you do not interfer with any of your previous configurations. Alternatively copy the AppRollout template files to adjust the values and continue using the copy within the installation process by specifying the path via the corresponding flag (./deploy.sh -f <path> rollout <APP>).

Installation

Installing the apps to your Google Cloud Robotics cluster is a two-step process (ref. Cloud Robotics Appliction Management):

  1. Make your application available in the Google Cloud Robotics cluster by creating an App that describes which Helm charts should run in the respective cloud/robot targets.
  2. Instantiate your application by creating an AppRollout referencing the previously created App. The AppRollout contains your specific configurations for your ewm-cloud-robotics deployment.

If you have complected the configuration steps, you can leverage the deploy.sh script as follows:

# Example: ewm-order-manager

# (1) Register 'dev' version of the ewm-order-manager App
./deploy.sh push ewm-order-manager

# (2) Create a corresponding AppRollout
./deploy.sh rollout ewm-order-manager

Otherwise you need to specify approllout.yaml/app.yaml files for push and rollout. You can get examples and further information about this by running ./deploy.sh help.

SAP EWM Cloud Robotics applications

This repository includes the applications to run the outlined SAP EWM scenarios. This chapter describes these applications which can be divided in SAP S/4 HANA based ABAP developments and containerized applications to be run in Cloud Robotics Kubernetes clusters.

SAP EWM extension

SAP EWM extension for Cloud Robotics includes all developments required to run Cloud Robotics enabled robots in an SAP EWM controlled warehouse. It consists of an OData interface, several robot specific master data and some process enhancements. It supports two different process types:

  1. The Move Handling Unit process meant for robots which are able to move a Handling Unit, such as mobile shelves, autonomously
  2. The Pick, Pack and Pass scenario designed for collaboration of human pickers and robots. In this scenario warehouse orders are assigned to a robot which is waiting for the picker at the source bins. The picker scans the robot to start the picking process.

All foundations and the Move Handling Unit process are part of this repository. The robot enabled Pick, Pack and Pass scenario can be found in a separate repository, because it includes some modifications of the system. Both repositories can be deployed to a SAP system using abapGit.

This document describes the configuration steps in SAP EWM after the deployment of the code.

Cloud Robotic apps

ewm-order-manager

The ewm-order-manager runs in the cloud cluster and represents the interface between an SAP EWM system and Cloud Robotics. It watches for available robots with free capacities and subsequently requests warehouse orders from SAP EWMs OData interface. It also processes warehouse order confirmations by robots and propagates the new status to SAP EWM.

ewm-robot-controller

The ewm-robot-controller is an app which should run on the robot and includes the business logic for robots to process SAP EWM warehouse orders autonomously. It currently supports the Move Handling Unit and the robot enabled Pick, Pack and Pass scenario including error handling capabilities. It uses the Cloud Robotics mission API to control the robots.

ewm-sim

🚧🚧 The ewm-sim application is currently being redesigned in order to make it slimmer and remove obsolete parts. For further information/questions refer to this issue.

Mission controllers

A mission controller watches and interprets mission CRs and calls the corresponding robot APIs. Consequently, a separate mission controller is required per robot manufacturer/model. This repository contains sample implementations for a small choice of robots as well as a basic mission controller, meant for development/testing that simply confirms every mission generated.

mir-mission-controller

🚧🚧 The mir-mission-controller is currently under construction and will be added within the next couple of weeks (status June 18th, 2019). For further information/questions refer to this issue.

fetch-mission-controller

🚧🚧 The fetch-mission-controller is currently under construction and will be added within the next couple of weeks (status June 18th, 2019). For further information/questions refer to this issue.

dummy-mission-controller

🚧🚧 The dummy-mission-controller is currently under construction and will be added within the next couple of weeks (status June 18th, 2019). For further information/questions refer to this issue.

Known issues & limitations

Please see Issues list.

Upcoming changes

Please refer to the Github issue board. For upcoming features check the "enhancement" label.

Get involved

You are welcome to join forces with us in the quest to increase the number of warehouse orders & tasks fulfilled by 🤖! Simply check the Contribution Guidelines.

License

Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v.2 except as noted in the LICENSE file.

About

Source code, containers & Helm charts enabling users to leverage the core of Google Cloud Robotics to automate fulfilment warehouse orders & tasks commissioned by SAP EWM

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 50.5%
  • ABAP 36.8%
  • JavaScript 9.7%
  • Shell 2.1%
  • Other 0.9%