Difference between revisions of "Rest api"
From RobotinoWiki
(→/data/analoginputarray) |
(→PUT) |
||
Line 61: | Line 61: | ||
"omega" : "rot-vel in rad/s" | "omega" : "rot-vel in rad/s" | ||
} | } | ||
+ | </pre> | ||
+ | |||
+ | ===/data/digitaloutputarray=== | ||
+ | <pre> | ||
+ | { | ||
+ | [val0,val1,....val7] | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | ===/data/relayarray=== | ||
+ | <pre> | ||
+ | { | ||
+ | [val0,val1] | ||
+ | } | ||
+ | val0,val1 being 0 or 1 | ||
</pre> | </pre> | ||
Revision as of 12:28, 21 February 2019
Contents
Installation
REST-API is already running at http://RobotinoIP. |
Package linksThe restapid is part of robotino-daemons package. |
---|
GET
/cam0
Get camera image from cam0. The response is image/jpeg.
/data/festoolcharger
Get data from Festool Li-Ion batteries.
/data/powermanagement
Get information about voltage and system current.
/data/charger0
Data for build in charger 0
/data/charger1
Data for build in charger 1
/data/controllerinfo
HW and SW version.
/data/services
Data of Robotino specific services.
/data/servicestatus/xxx
Status of service xxx.
/data/analoginputarray
Data of all analog inputs.
{ [val0,val1,val2,...,val7] }
/data/digitalinputarray
Data of all digital inputs.
{ [val0,val1,val2,...,val7] }
PUT
/data/omnidrive
Set forwward and rotational velocity. You have to send data periodically at least every 200ms. If no data is received for more than 200ms Robotino will stop.
{ "vx": "x-vel in m/s", "vy" : "y-vel in m/s", "omega" : "rot-vel in rad/s" }
/data/digitaloutputarray
{ [val0,val1,....val7] }
/data/relayarray
{ [val0,val1] } val0,val1 being 0 or 1
/data/uploadProgram
Upload Robotino View program to /home/robotino/programs.
{ "name" : "filename with extension", "size" : size of raw (unencoded) binary data, "data" : file data base64 encoded }
Response
{ "message" : "message what happend on the server", "success" : boolean showing if operation was successfull }