-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Conflicts: deps/testfixtures
- Loading branch information
Showing
372 changed files
with
1,100 additions
and
1,607 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,45 @@ | ||
[submodule "rostful/deps/Rester"] | ||
path = rostful/deps/Rester | ||
[submodule "deps/Rester"] | ||
path = deps/Rester | ||
url = https://github.com/asmodehn/Rester.git | ||
[submodule "rostful/deps/testfixtures"] | ||
path = rostful/deps/testfixtures | ||
[submodule "deps/testfixtures"] | ||
path = deps/testfixtures | ||
url = https://github.com/Simplistix/testfixtures.git | ||
[submodule "deps/flask-cors"] | ||
path = deps/flask-cors | ||
url = https://github.com/corydolphin/flask-cors.git | ||
[submodule "deps/flask-restful"] | ||
path = deps/flask-restful | ||
url = https://github.com/flask-restful/flask-restful.git | ||
[submodule "deps/Flask-Migrate"] | ||
path = deps/Flask-Migrate | ||
url = https://github.com/miguelgrinberg/Flask-Migrate.git | ||
[submodule "deps/flask-security"] | ||
path = deps/flask-security | ||
url = https://github.com/asmodehn/flask-security.git | ||
[submodule "deps/click"] | ||
path = deps/click | ||
url = https://github.com/mitsuhiko/click.git | ||
[submodule "deps/webargs"] | ||
path = deps/webargs | ||
url = https://github.com/sloria/webargs.git | ||
[submodule "deps/marshmallow"] | ||
path = deps/marshmallow | ||
url = https://github.com/marshmallow-code/marshmallow.git | ||
[submodule "deps/flask-login"] | ||
path = deps/flask-login | ||
url = https://github.com/maxcountryman/flask-login.git | ||
[submodule "deps/flask-principal"] | ||
path = deps/flask-principal | ||
url = https://github.com/mattupstate/flask-principal.git | ||
[submodule "deps/flask-mail"] | ||
path = deps/flask-mail | ||
url = https://github.com/mattupstate/flask-mail.git | ||
[submodule "deps/flask-wtf"] | ||
path = deps/flask-wtf | ||
url = https://github.com/lepture/flask-wtf.git | ||
[submodule "deps/flask-sqlalchemy"] | ||
path = deps/flask-sqlalchemy | ||
url = https://github.com/mitsuhiko/flask-sqlalchemy.git | ||
[submodule "deps/passlib"] | ||
path = deps/passlib | ||
url = https://github.com/asmodehn/passlib.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Changelog | ||
========= | ||
|
||
|
||
0.1.0 | ||
----- | ||
* now working with pyros 0.1.0 | ||
* Added Rester tests to validate API behavior on ROS systems | ||
* ... | ||
|
||
0.0.8 | ||
----- | ||
* Extracted multiprocess mess from this package. Trying to keep this a neat python (flask) web REST backend. | ||
|
||
0.0.2 | ||
----- | ||
* Converted to Catkin | ||
* Migrated from raw python to Flask | ||
* Added Celery Support for async tasks | ||
* Experimental Rocon support |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,41 @@ | ||
[![Build Status](https://travis-ci.org/asmodehn/rostful.svg?branch=indigo-devel)](https://travis-ci.org/asmodehn/rostful) | ||
# ROSTful | ||
|
||
## Try it now | ||
Go check the [examples](https://github.com/asmodehn/rostful/tree/indigo-devel/rostful_examples) | ||
Overview | ||
======== | ||
|
||
## Overview | ||
ROStful - A REST API for ROS. | ||
|
||
ROStful is a lightweight web server for making ROS services, topics, and actions available as RESTful web services. It also provides a client proxy to expose a web service locally over ROS. | ||
Rostful is intended to be the outside layer of a ros system, | ||
communicating with the outside world via HTTP, | ||
and exposing a REST API to use the robot services, or introspect robot topics. | ||
As such this should be launched either : | ||
- as a python code with the de facto python standard behaviors ( venv, pip requirements, etc. ), | ||
|
||
ROStful web services primarily use the [rosbridge](http://wiki.ros.org/rosbridge_suite) JSON mapping for ROS messages. However, binary serialized ROS messages can be used to increase performance. | ||
``` python -m rostful flask ``` | ||
|
||
The purpose of ROStful is different from [rosbridge](http://wiki.ros.org/rosbridge_suite): rosbridge provides an API for ROS through JSON using web sockets. ROStful allows specific services, topics, and actions to be provided as web services (using plain get and post requests) without exposing underlying ROS concepts. | ||
The ROStful client, however, additionally provides a modicum of multi-master functionality. The client proxy is a node that connects to a ROStful web service and exposes the services, topics, and actions locally over ROS. | ||
- as a ros package, with the de facto ros standard behaviors. | ||
|
||
The ROStful server has no dependencies on 3rd party libraries, and is WSGI-compatible and can therefore be used with most web servers like Apache and IIS. | ||
``` roslaunch rostful rostful.launch ``` | ||
|
||
### ROStful web services | ||
so that users from both world can use it efficiently. | ||
|
||
A ROStful web service is a web service that uses ROS data structures for input and output. These include services, topics, and actions. | ||
What will not be in Rostful | ||
=========================== | ||
- Security related stuff ( Authentication/Authorization ) implementation. | ||
We will not provide here any Authentication/Authorization mechanisms without ROS providing one first. | ||
And even after that, the implications of such an implementation would probably fit better in another specific microservice, that we would rely on in rostful. | ||
|
||
Service methods accept as input a ROS message over HTTP POST and return a ROS message in the response. The input and output cannot be defined directly with ROS messages; it must use a ROS service definition. | ||
PYTHON VIRTUALENV SETUP | ||
======================= | ||
|
||
Methods denoted as topics may use any ROS message, but are limited to accepting that message via HTTP POST or returning it, taking no input, via HTTP GET. Topic methods do not need to allow both methods. A topic method allowing POST is described as a "subscribing" method, and one that allows GET is a "publishing" method. | ||
How to setup your python virtual environment on Ubuntu (tested on Trusty | ||
14.04) | ||
- Install and Setup virtualenvwrapper if needed | ||
``` sudo apt-get install virtualenvwrapper echo "source /etc/bash_completion.d/virtualenvwrapper" >> ~/.bashrc ``` | ||
|
||
Methods denoted as actions consist of a set of subsidiary topic methods, the subscribing-only `goal` and `cancel` methods, and the publishing-only `status`, `result`, and `feedback` methods. These methods are located at the url `<action method url>/<suffix>`, where the suffix is the subsidiary method name. | ||
- Create your virtual environment for your project | ||
``` mkvirtualenv myproject --no-site-packages workon myproject ``` | ||
|
||
### The ROStful server | ||
|
||
The ROStful server can provide services, topics, and actions that are locally available over ROS as ROStful web services. Topics may be specified as publishing, subscribing, or both. | ||
|
||
ROStful uses the rosbridge JSON mapping by default, but binary serialized ROS messages can be sent with the `Content-Header` set to `application/vnd.ros.msg`. Giving this MIME type in the `Accept` header for queries without input (i.e., publishing topic methods) will cause the server to return serialized messages. | ||
|
||
### The ROStful client | ||
|
||
The ROStful client is a node that connects to a ROStful web service and makes its services, topics, and actions locally available over ROS. | ||
|
||
The client can be given the root URL of a ROStful web service, in which case it will connect to all services, topics, and actions for that web service, or it can be given the URL of an individual service, topic, or action to connect to. | ||
When connecting directly, the name of service, topic, or action is used as the service, topic, or action name. When connecting to the root URL, the name of the web service, if any, is used as a prefix (followed by a slash) to the service/topic/action names. This can be controlled using the `--prefix` and `--no-prefix` options. | ||
|
||
For privacy, the client will not allow the web service to subscribe to local ROS topics unless the `--allow-subscription` option is given. | ||
|
||
The client periodically queries the server for its published topics, and then publishes those messages locally. The default interval is 1 second, but this can be set with the `--publish-interval` option. | ||
|
||
The `--binary` option directs the client to use binary serialized messages instead of JSON. | ||
|
||
For debugging, the client can be used with the same ROS master as the server. Giving the `--test` option causes the client to append `_ws` to the names of the services/topics/actions it connects to, so they don't conflict with those being used by the server. | ||
|
||
## Web service/component description format | ||
|
||
The ROStful server functions as a ROS component, providing services and actions, and publishing and subscribing to topics. Due to the lack of a standard format for describing ROS components, ROStful uses simple INI-file-based format. The file is broken up into sections, with each section starting with a header contained in square brackets. In addition to standard INI file formatted sections, "definition" sections are allowed for defining messages, services, and actions. | ||
|
||
### Manifest section | ||
|
||
There is a single optional section titled `Manifest`. The section is in standard INI file format, a sequence of lines each containing a key-value pair separated by `=`. The special key `Def-Type` indicates the type of description being provided (e.g., `Node`, `Service`, `Topic`, `Action`). | ||
|
||
For services, topics, and actions, the keys `Type` and `Name` are given, which give the ROS type of the service/topic/action, and the service/action name or topic as appropriate. | ||
|
||
For topics, the keys `Publishes` and `Subscribes` are given with the values `true` or `false`. | ||
|
||
### Other sections | ||
|
||
The `Node` description includes the optional sections `Services`, `Actions`, `Publishes`, and `Subscribes`. These sections also follow the INI file format, where the keys are the names of the services, actions, or topics, and the values are their ROS types. | ||
|
||
### Definitions | ||
|
||
Definition sections have a title in the form `<definition type>:<definition name>`. The definition type, given before the colon, can be one of `msg`, `srv`, or `action`, corresponding to ROS message, service, and action definitions. The definition name, given after the colon, is the name of the data structure being defined. The content of the section is exactly the format used in the ROS files defining messages, services, and actions, respectively. | ||
|
||
### Purpose | ||
|
||
This description format allows the full definition for a component to be given inline. The description for a node or method is located at `<node or method url>/_rosdef`. Setting the query parameter `full=true` will include all the definitions referenced in description (recursively). Setting the query parameter `json=true` will return a JSON representation of the definition. | ||
- Populate it to use rostful. The catkin dependency is temporarily needed | ||
to be able to use the setup.py currently provided in rostful. | ||
``` pip install catkin-pkg rostful ``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
.. image:: https://travis-ci.org/asmodehn/rostful.svg?branch=indigo-devel | ||
:target: https://travis-ci.org/asmodehn/rostful | ||
|
||
Overview | ||
======== | ||
|
||
ROStful - A REST API for ROS. | ||
|
||
Rstful is intended to be the outside layer of a ros system. meaning it will interface other software systems with ros. | ||
As such this should be launched either : | ||
* as a python code with the de facto python standard behaviors ( venv, pip requirements, etc. ), | ||
|
||
``` | ||
python -m rostful flask | ||
``` | ||
|
||
* as a ros package, with the de facto ros standard behaviors. | ||
|
||
``` | ||
roslaunch rostful rostful.launch | ||
``` | ||
|
||
so that users from both world can use it efficiently. | ||
|
||
|
||
PYTHON VIRTUALENV SETUP | ||
======================= | ||
|
||
How to setup your python virtual environment on Ubuntu (tested on Trusty 14.04) | ||
* Install and Setup virtualenvwrapper if needed | ||
``` | ||
sudo apt-get install virtualenvwrapper | ||
echo "source /etc/bash_completion.d/virtualenvwrapper" >> ~/.bashrc | ||
``` | ||
* Create your virtual environment for your project | ||
``` | ||
mkvirtualenv myproject --no-site-packages | ||
workon myproject | ||
``` | ||
* Populate it to use rostful. The catkin dependency is temporarily needed to be able to use the setup.py currently provided in rostful. | ||
``` | ||
pip install catkin-pkg rostful | ||
``` | ||
|
||
|Build Status| # ROSTful | ||
|
||
Try it now | ||
---------- | ||
|
||
Go check the `examples`_ | ||
|
||
Overview | ||
--------- | ||
|
||
ROStful is a lightweight web server for making ROS services, topics, and | ||
actions available as RESTful web services. It also provides a client | ||
proxy to expose a web service locally over ROS. | ||
|
||
ROStful web services primarily use the `rosbridge`_ JSON mapping for ROS | ||
messages. However, binary serialized ROS messages can be used to | ||
increase performance. | ||
|
||
The purpose of ROStful is different from `rosbridge`_: rosbridge | ||
provides an API for ROS through JSON using web sockets. ROStful allows | ||
specific services, topics, and actions to be provided as web services | ||
(using plain get and post requests) without exposing underlying ROS | ||
concepts. The ROStful client, however, additionally provides a modicum | ||
of multi-master functionality. The client proxy is a node that connects | ||
to a ROStful web service and exposes the services, topics, and actions | ||
locally over ROS. | ||
|
||
The ROStful server has no dependencies on 3rd party libraries, and is | ||
WSGI-compatible and can therefore be used with most web servers like | ||
Apache and IIS. | ||
|
||
ROStful web services | ||
~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
A ROStful web service is a web service that uses ROS data structures for | ||
input and output. These include services, topics, and actions. | ||
|
||
Service methods accept as input a ROS message over HTTP POST and return | ||
a ROS message in the response. The input and output cannot be defined | ||
directly with ROS messages; it must use a ROS service definition. | ||
|
||
Methods denoted as topics may use any ROS message, but are limited to | ||
accepting that message via HTTP POST or returning it, taking no input, | ||
via HTTP GET. Topic methods do not need to allow both methods. A topic | ||
method allowing POST is described as a “subscribing” method, and one | ||
that allows GET is a “publishing” method. | ||
|
||
Methods denoted as actions consist of a set of subsidiary topic methods, | ||
the subscribing-only ``goal`` and ``cancel`` methods, and the | ||
publishing-only ``status``, ``result``, and ``feedback`` methods. These | ||
methods are located at the url ``<action method url>/<suffix>``, where | ||
the suffix is the subsidiary method name. | ||
|
||
The ROStful server | ||
~~~~~~~~~~~~~~~~~~ | ||
|
||
The ROStful server can provide services, topics, and actions that are | ||
locally available over ROS as ROStful web services. Topics may be | ||
specified as publishing, subscribing, or both. | ||
|
||
ROStful uses the rosbridge JSON mapping by default, but binary | ||
serialized ROS messages can be sent with the ``Content-Header`` set to | ||
``application/vnd.ros.msg``. Giving this MIME type in the ``Accept`` | ||
header for queries without input (i.e., publishing topic methods) will | ||
cause the server to return serialized messages. | ||
|
||
The ROStful client | ||
~~~~~~~~~~~~~~~~~~~ | ||
|
||
The ROStful client is a node that connects to a ROStful web service and | ||
makes its services, topics, a | ||
|
||
.. _examples: https://github.com/asmodehn/rostful/tree/indigo-devel/rostful_examples | ||
.. _rosbridge: http://wiki.ros.org/rosbridge_suite | ||
|
||
.. |Build Status| image:: https://travis-ci.org/asmodehn/rostful.svg?branch=indigo-devel | ||
:target: https://travis-ci.org/asmodehn/rostful |
Submodule Flask-Migrate
added at
95518a
Submodule flask-cors
added at
3108f7
Submodule flask-login
added at
f74c86
Submodule flask-mail
added at
1709c7
Submodule flask-principal
added at
0b5cd0
Submodule flask-restful
added at
f57ddf
Submodule flask-security
added at
7f6925
Submodule flask-sqlalchemy
added at
cfe529
Submodule marshmallow
added at
fb01c9
Submodule testfixtures
updated
from 000000 to b42849
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.. include:: ../CHANGELOG.rst |
Oops, something went wrong.