Skip to content
This repository was archived by the owner on Sep 26, 2023. It is now read-only.

This flask application controls ROS robot from a gamepad or browser.

License

Notifications You must be signed in to change notification settings

RoboticBase/fiware-cmd-proxy

Repository files navigation

fiware-cmd-proxy

This flask application controls ROS robot from a gamepad or browser.

TravisCI Status Docker image size

Description

This application works as a component of FIWARE.

When this application is called from fiware orion context broker or browser, this application extracts a 'command' from request and sends a request to orion in order to control a ROS robot.

Requirement

python 3.6 or higer

Environment Variables

This application accepts the Environment Variables like below:

Environment Variable Summary Default
LOG_LEVEL log level(DEBUG, INFO, WARNING, ERRRO, CRITICAL) INFO
LISTEN_PORT listen port of this service 3000
ORION_ENDPOINT endpoint url of orion context broker http://127.0.0.1:1026
PREFIX the prefix specified as the ambassador's annotation ''
FIWARE_SERVICE the value of 'Fiware-Service' HTTP Header ''
FIWARE_SERVICEPATH the value of 'Fiware-Servicepath' HTTP Header ''
ROBOT_ID the id specified when registering robot entity to orion ''
ROBOT_TYPE the type specified when registering robot entity to orion ''

Request Payload

  • /gamepad/ (application/json)

    {
        "data": [
            {
                "button": {
                    "value": "requested_cmd",
                },
            },
        ],
    }
  • /web/ (application/x-www-form-urlencoded)

    move=requested_cmd
    

API specification

see docs/swagger.yaml

Run as Docker container

  1. Pull container roboticbase/fiware-cmd-proxy from DockerHub.

    $ docker pull roboticbase/fiware-cmd-proxy:latest
  2. Run Container.

    • Set environment variable(s) if you want to change exposed port, orion endpoint, and so on.
    $ env ORION_ENDPOINT="http://192.168.0.3:1026" LISTEN_PORT="3000" docker run -d -p 3000:3000 roboticbase/fiware-cmd-proxy

Run from source code

  1. start main.py

    • Set environment variable(s) if you want to change exposed port, orion endpoint, and so on.
    $ env ORION_ENDPOINT="http://192.168.0.3:1026" LISTEN_PORT="3000" docker run -d -p 3000:3000 python app/main.py

License

Apache License 2.0

Copyright

Copyright (c) 2018 TIS Inc.

About

This flask application controls ROS robot from a gamepad or browser.

Resources

License

Stars

Watchers

Forks

Packages

No packages published