This flask application controls ROS robot from a gamepad or browser.
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.
python 3.6 or higer
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 | '' |
-
/gamepad/
(application/json){ "data": [ { "button": { "value": "requested_cmd", }, }, ], }
-
/web/
(application/x-www-form-urlencoded)move=requested_cmd
-
Pull container roboticbase/fiware-cmd-proxy from DockerHub.
$ docker pull roboticbase/fiware-cmd-proxy:latest
-
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
-
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
Copyright (c) 2018 TIS Inc.