Coder Social home page Coder Social logo

robo-demo's Introduction

robo-demo

This is an adapter between a demo Robot API and a Ditto feature. This adapter is developed to be used with Eclipse Kanto. When it is connected to the local MQTT broker that is being used by Kanto, a cloud connector of your choice will create a digital twin of the robot on the cloud backend.

Prerequisites:

  1. Install dependencies using:

    pip3 install -r requirements.txt
    
  2. Depending on your git version you may need to run

    git submodule update --init --recursive
    
  3. Install Eclipse Ditto

    cd lib/ditto-clients && make install
    

Build:

Before building, you may need to change the platform to match your device.

docker build -t 'your repo'/robot-controller:'tag' .

Deploy on Eclipse Kanto

  1. [Install eclise Kanto](https://eclipse.dev/kanto/docs/getting-started/install/
  2. Run the container using minimum configuration and host network.
kanto-cm create -n robot-controller --network host  docker.io/'your container repo'/robot-controller:0.0.1
kanto-cm start -n robot-controller

Example using environment variable

kanto-cm create -n robot-controller --network host --e=ROBOT_HOSTNAME=roboendpoint --e=DEVICE_ID="$FQ_DEVICE_ID" docker.io/'your container repo'/robot-controller:0.0.1

Environment Variables

Variable Default Description
LOCAL_MQTT_HOST localhost Local MQTT broker host name
LOCAL_MQTT_PORT 1883 Local MQTT broker port
LOCAL_MQTT_USERNAME Local MQTT broker username
LOCAL_MQTT_PASSWORD Local MQTT broker password
ROBOT_HOSTNAME localhost Hostname of the robot's http endpoint
ROBOT_PORT 3000 Port of the robot's http endpoint
ROBOT_DEFAULT_PROCESS_ID 1 Default process which will be triggered on command
ROBOT_REFRESH_TIMEOUT 60 Refresh timeout on which the Ditto feature will be updated
DEVICE_ID demo:robot:1.0.0 Device id which will be used in the robot's feature namespace

Command Format

{
    "topic": "demo/robot/things/live/messages/request",
    "headers": {
        "correlation-id": "test",
        "content-type": "application/json"
    },
      "path": "/features/Robo/inbox/messages/request",
      "value": {
            "program_id": 1,
            "iterations": 1,
            "velocity": 1
        }
    }

robo-demo's People

Contributors

ivanovt avatar k-gostev avatar

Watchers

 avatar

Forkers

ivanovt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.