roslibpy


Nameroslibpy JSON
Version 1.8.0 PyPI version JSON
download
home_pagehttps://github.com/gramaziokohler/roslibpy
SummaryPython ROS Bridge library.
upload_time2024-10-25 14:43:29
maintainerNone
docs_urlNone
authorGramazio Kohler Research
requires_pythonNone
licenseMIT license
keywords ros ros-bridge robotics websockets
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ============================
roslibpy: ROS Bridge library
============================



**Python ROS Bridge library** allows to use Python and IronPython to interact
with `ROS <http://www.ros.org>`_, the open-source robotic middleware.
It uses WebSockets to connect to
`rosbridge 2.0 <http://wiki.ros.org/rosbridge_suite>`_ and provides publishing,
subscribing, service calls, actionlib, TF, and other essential ROS functionality.

Unlike the `rospy <http://wiki.ros.org/rospy>`_ library, this does not require a
local ROS environment, allowing usage from platforms other than Linux.

The API of **roslibpy** is modeled to closely match that of `roslibjs`_.

ROS1 is fully supported. ROS2 support is still in progress.


Main features
-------------

* Topic publishing and subscribing.
* Service calls (client).
* Service advertisement (server).
* ROS parameter management (get/set/delete).
* ROS API services for getting ROS meta-information.
* Actionlib support for interfacing with preemptable tasks.
* TF Client via the ``tf2_web_republisher``.

**Roslibpy** runs on Python 3.x and IronPython 2.7.


Installation
------------

To install **roslibpy**, simply use ``pip``::

    pip install roslibpy

For IronPython, the ``pip`` command is slightly different::

    ipy -X:Frames -m pip install --user roslibpy

Remember that you will need a working ROS setup including the
**rosbridge server** and **TF2 web republisher** accessible within your network.


Documentation
-------------

The full documentation, including examples and API reference
is available on `readthedocs <https://roslibpy.readthedocs.io/>`_.


Contributing
------------

Make sure you setup your local development environment correctly:

* Clone the `roslibpy <https://github.com/gramaziokohler/roslibpy>`_ repository.
* Create a virtual environment.
* Install development dependencies:

::

    pip install -r requirements-dev.txt

**You're ready to start coding!**

During development, use `pyinvoke <http://docs.pyinvoke.org/>`_ tasks on the
command prompt to ease recurring operations:

* ``invoke clean``: Clean all generated artifacts.
* ``invoke check``: Run various code and documentation style checks.
* ``invoke docs``: Generate documentation.
* ``invoke test``: Run all tests and checks in one swift command.
* ``invoke``: Show available tasks.

For more details, check the *Contributor's Guide* available as part of `the documentation <https://roslibpy.readthedocs.io/>`_.

The default branch was recently renamed to `main`. If you've already cloned this repository,
you'll need to update your local repository structure with the following lines:

::

    git branch -m master main
    git fetch origin
    git branch -u origin/main main


Releasing this project
----------------------

Ready to release a new version **roslibpy**? Here's how to do it:

* We use `semver <http://semver.org/>`_, i.e. we bump versions as follows:

  * ``patch``: bugfixes.
  * ``minor``: backwards-compatible features added.
  * ``major``: backwards-incompatible changes.

* Update the ``CHANGELOG.rst`` with all novelty!
* Ready? Release everything in one command:

::

    invoke release [patch|minor|major]

* Profit!


Credits
-------

This library is based on `roslibjs`_ and to a
large extent, it is a line-by-line port to Python, changing only where a more
idiomatic form makes sense, so a huge part of the credit goes to the
`roslibjs authors <https://github.com/RobotWebTools/roslibjs/blob/develop/AUTHORS.md>`_.

.. _roslibjs: http://wiki.ros.org/roslibjs


Changelog
=========

All notable changes to this project will be documented in this file.

The format is based on `Keep a Changelog <http://keepachangelog.com/en/1.0.0/>`_
and this project adheres to `Semantic Versioning <http://semver.org/spec/v2.0.0.html>`_.

1.8.0
----------

**Added**

* Added websocket header support to the ROS-client.

**Changed**

**Fixed**

**Deprecated**

**Removed**

1.7.0
----------

**Added**

* Added a ROS2-compatible header class in ``roslibpy.ros2.Header``.

**Changed**

**Fixed**

**Deprecated**

**Removed**

1.6.0
----------

**Added**

* Added authentication functionality described in [rosauth](http://wiki.ros.org/rosauth).

**Changed**

**Fixed**

**Deprecated**

**Removed**

1.5.0
----------

**Added**

* Added a wait event to close on IronPython to ensure the close request is sent before returning.

**Changed**

**Fixed**

* Fixed reconnection behavior on IronPython which would trigger reconnects even after a manual disconnect.

**Deprecated**

**Removed**

1.4.2
----------

**Added**

**Changed**

* Added ``tls`` to the twisted requirement (#111).

**Fixed**

**Deprecated**

**Removed**

1.4.1
----------

**Added**

**Changed**

**Fixed**

* Fixed bug with action client/server and now they work as expected.
* Fixed Python 2.7 incompatibilities introduced in 1.4.0.

**Deprecated**

**Removed**

1.4.0
----------

**Added**

**Changed**

* Switched to ``black`` for python code formatting.
* Fix incompatible settings between ``black`` and ``flake8``.
* Updated Github Actions workflows to remove python 3.6 builds.
* Replaced occurrences of ``raise Exception`` with more specific ``Exception`` subclasses.

**Fixed**

**Deprecated**

**Removed**

1.3.0
----------

**Added**

* Added function to set the default timeout value.
* Added ROS host and port parameters to the command-line interface.

**Fixed**

* Fixed #87 where a goal could be marked as terminal on result alone rather
  than both result and status.
* Ensure input of ``Time`` is always two integers.

1.2.1
----------

**Added**

**Changed**

**Fixed**

* Fixed blocking issues on the Twisted/Autobahn-based implementation of websockets.

**Deprecated**

**Removed**

1.2.0
----------

**Changed**

* Changed behavior: Advertising services automatically reconnect when websockets is reconnected.
* References to ROS master change to ROS.

**Added**

* Added ``Header`` and ``Time`` data types.
* Added ROS API method to retrieve current ROS time: ``ros.get_time``.

1.1.0
----------

**Added**

* Added ``set_initial_delay``, ``set_max_delay`` and ``set_max_retries``  to ``RosBridgeClientFactory`` to control reconnection parameters.
* Added ``closing`` event to ``Ros`` class that gets triggered right before closing the connection.

1.0.0
----------

**Changed**

* Changed behavior: Topics automatically reconnect when websockets is reconnected.

**Added**

* Added blocking behavior to more ROS API methods: ``ros.get_nodes`` and ``ros.get_node_details``.
* Added reconnection support to IronPython implementation of websockets.
* Added automatic topic reconnection support for both subscribers and publishers.

**Fixed**

* Fixed reconnection issues on the Twisted/Autobahn-based implementation of websockets.

0.7.1
----------

**Fixed**

* Fixed blocking service calls for Mac OS.

0.7.0
----------

**Changed**

* The non-blocking event loop runner ``run()`` now defaults to 10 seconds timeout before raising an exception.

**Added**

* Added blocking behavior to ROS API methods, e.g. ``ros.get_topics``.
* Added command-line mode to ROS API, e.g. ``roslibpy topic list``.
* Added blocking behavior to the ``Param`` class.
* Added parameter manipulation methods to ``Ros`` class: ``get_param``, ``set_param``, ``delete_param``.

0.6.0
----------

**Changed**

* For consistency, ``timeout`` parameter of ``Goal.send()`` is now expressed in **seconds**, instead of milliseconds.

**Deprecated**

* The ``timeout`` parameter of ``ActionClient()`` is ignored in favor of blocking until the connection is established.

**Fixed**

* Raise exceptions when timeouts expire on ROS connection or service calls.

**Added**

* Support for calling a function in a thread from the Ros client.
* Added implementation of a Simple Action Server.

0.5.0
----------

**Changed**

* The non-blocking event loop runner now waits for the connection to be established in order to minimize the need for ``on_ready`` handlers.

**Added**

* Support blocking and non-blocking service calls.

**Fixed**

* Fixed an internal unsubscribing issue.

0.4.1
----------

**Fixed**

* Resolve reconnection issues.

0.4.0
----------

**Added**

* Add a non-blocking event loop runner.

0.3.0
----------

**Changed**

* Unsubscribing from a listener no longer requires the original callback to be passed.

0.2.1
----------

**Fixed**

* Fix JSON serialization error on TF Client (on Python 3.x).

0.2.0
----------

**Added**

* Add support for IronPython 2.7.

**Changed**

* Handler ``on_ready`` now defaults to run the callback in thread.

**Deprecated**

* Rename ``run_event_loop`` to the more fitting ``run_forever``.

0.1.1
----------

**Fixed**

* Minimal documentation fixes.

0.1.0
----------

**Added**

* Initial version.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/gramaziokohler/roslibpy",
    "name": "roslibpy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "ros, ros-bridge, robotics, websockets",
    "author": "Gramazio Kohler Research",
    "author_email": "gramaziokohler@arch.ethz.ch",
    "download_url": "https://files.pythonhosted.org/packages/38/40/a182b1784fffbb0b29aa6f1330fd918267232f3bfdff1a97ee6573eb0292/roslibpy-1.8.0.tar.gz",
    "platform": null,
    "description": "============================\nroslibpy: ROS Bridge library\n============================\n\n\n\n**Python ROS Bridge library** allows to use Python and IronPython to interact\nwith `ROS <http://www.ros.org>`_, the open-source robotic middleware.\nIt uses WebSockets to connect to\n`rosbridge 2.0 <http://wiki.ros.org/rosbridge_suite>`_ and provides publishing,\nsubscribing, service calls, actionlib, TF, and other essential ROS functionality.\n\nUnlike the `rospy <http://wiki.ros.org/rospy>`_ library, this does not require a\nlocal ROS environment, allowing usage from platforms other than Linux.\n\nThe API of **roslibpy** is modeled to closely match that of `roslibjs`_.\n\nROS1 is fully supported. ROS2 support is still in progress.\n\n\nMain features\n-------------\n\n* Topic publishing and subscribing.\n* Service calls (client).\n* Service advertisement (server).\n* ROS parameter management (get/set/delete).\n* ROS API services for getting ROS meta-information.\n* Actionlib support for interfacing with preemptable tasks.\n* TF Client via the ``tf2_web_republisher``.\n\n**Roslibpy** runs on Python 3.x and IronPython 2.7.\n\n\nInstallation\n------------\n\nTo install **roslibpy**, simply use ``pip``::\n\n    pip install roslibpy\n\nFor IronPython, the ``pip`` command is slightly different::\n\n    ipy -X:Frames -m pip install --user roslibpy\n\nRemember that you will need a working ROS setup including the\n**rosbridge server** and **TF2 web republisher** accessible within your network.\n\n\nDocumentation\n-------------\n\nThe full documentation, including examples and API reference\nis available on `readthedocs <https://roslibpy.readthedocs.io/>`_.\n\n\nContributing\n------------\n\nMake sure you setup your local development environment correctly:\n\n* Clone the `roslibpy <https://github.com/gramaziokohler/roslibpy>`_ repository.\n* Create a virtual environment.\n* Install development dependencies:\n\n::\n\n    pip install -r requirements-dev.txt\n\n**You're ready to start coding!**\n\nDuring development, use `pyinvoke <http://docs.pyinvoke.org/>`_ tasks on the\ncommand prompt to ease recurring operations:\n\n* ``invoke clean``: Clean all generated artifacts.\n* ``invoke check``: Run various code and documentation style checks.\n* ``invoke docs``: Generate documentation.\n* ``invoke test``: Run all tests and checks in one swift command.\n* ``invoke``: Show available tasks.\n\nFor more details, check the *Contributor's Guide* available as part of `the documentation <https://roslibpy.readthedocs.io/>`_.\n\nThe default branch was recently renamed to `main`. If you've already cloned this repository,\nyou'll need to update your local repository structure with the following lines:\n\n::\n\n    git branch -m master main\n    git fetch origin\n    git branch -u origin/main main\n\n\nReleasing this project\n----------------------\n\nReady to release a new version **roslibpy**? Here's how to do it:\n\n* We use `semver <http://semver.org/>`_, i.e. we bump versions as follows:\n\n  * ``patch``: bugfixes.\n  * ``minor``: backwards-compatible features added.\n  * ``major``: backwards-incompatible changes.\n\n* Update the ``CHANGELOG.rst`` with all novelty!\n* Ready? Release everything in one command:\n\n::\n\n    invoke release [patch|minor|major]\n\n* Profit!\n\n\nCredits\n-------\n\nThis library is based on `roslibjs`_ and to a\nlarge extent, it is a line-by-line port to Python, changing only where a more\nidiomatic form makes sense, so a huge part of the credit goes to the\n`roslibjs authors <https://github.com/RobotWebTools/roslibjs/blob/develop/AUTHORS.md>`_.\n\n.. _roslibjs: http://wiki.ros.org/roslibjs\n\n\nChangelog\n=========\n\nAll notable changes to this project will be documented in this file.\n\nThe format is based on `Keep a Changelog <http://keepachangelog.com/en/1.0.0/>`_\nand this project adheres to `Semantic Versioning <http://semver.org/spec/v2.0.0.html>`_.\n\n1.8.0\n----------\n\n**Added**\n\n* Added websocket header support to the ROS-client.\n\n**Changed**\n\n**Fixed**\n\n**Deprecated**\n\n**Removed**\n\n1.7.0\n----------\n\n**Added**\n\n* Added a ROS2-compatible header class in ``roslibpy.ros2.Header``.\n\n**Changed**\n\n**Fixed**\n\n**Deprecated**\n\n**Removed**\n\n1.6.0\n----------\n\n**Added**\n\n* Added authentication functionality described in [rosauth](http://wiki.ros.org/rosauth).\n\n**Changed**\n\n**Fixed**\n\n**Deprecated**\n\n**Removed**\n\n1.5.0\n----------\n\n**Added**\n\n* Added a wait event to close on IronPython to ensure the close request is sent before returning.\n\n**Changed**\n\n**Fixed**\n\n* Fixed reconnection behavior on IronPython which would trigger reconnects even after a manual disconnect.\n\n**Deprecated**\n\n**Removed**\n\n1.4.2\n----------\n\n**Added**\n\n**Changed**\n\n* Added ``tls`` to the twisted requirement (#111).\n\n**Fixed**\n\n**Deprecated**\n\n**Removed**\n\n1.4.1\n----------\n\n**Added**\n\n**Changed**\n\n**Fixed**\n\n* Fixed bug with action client/server and now they work as expected.\n* Fixed Python 2.7 incompatibilities introduced in 1.4.0.\n\n**Deprecated**\n\n**Removed**\n\n1.4.0\n----------\n\n**Added**\n\n**Changed**\n\n* Switched to ``black`` for python code formatting.\n* Fix incompatible settings between ``black`` and ``flake8``.\n* Updated Github Actions workflows to remove python 3.6 builds.\n* Replaced occurrences of ``raise Exception`` with more specific ``Exception`` subclasses.\n\n**Fixed**\n\n**Deprecated**\n\n**Removed**\n\n1.3.0\n----------\n\n**Added**\n\n* Added function to set the default timeout value.\n* Added ROS host and port parameters to the command-line interface.\n\n**Fixed**\n\n* Fixed #87 where a goal could be marked as terminal on result alone rather\n  than both result and status.\n* Ensure input of ``Time`` is always two integers.\n\n1.2.1\n----------\n\n**Added**\n\n**Changed**\n\n**Fixed**\n\n* Fixed blocking issues on the Twisted/Autobahn-based implementation of websockets.\n\n**Deprecated**\n\n**Removed**\n\n1.2.0\n----------\n\n**Changed**\n\n* Changed behavior: Advertising services automatically reconnect when websockets is reconnected.\n* References to ROS master change to ROS.\n\n**Added**\n\n* Added ``Header`` and ``Time`` data types.\n* Added ROS API method to retrieve current ROS time: ``ros.get_time``.\n\n1.1.0\n----------\n\n**Added**\n\n* Added ``set_initial_delay``, ``set_max_delay`` and ``set_max_retries``  to ``RosBridgeClientFactory`` to control reconnection parameters.\n* Added ``closing`` event to ``Ros`` class that gets triggered right before closing the connection.\n\n1.0.0\n----------\n\n**Changed**\n\n* Changed behavior: Topics automatically reconnect when websockets is reconnected.\n\n**Added**\n\n* Added blocking behavior to more ROS API methods: ``ros.get_nodes`` and ``ros.get_node_details``.\n* Added reconnection support to IronPython implementation of websockets.\n* Added automatic topic reconnection support for both subscribers and publishers.\n\n**Fixed**\n\n* Fixed reconnection issues on the Twisted/Autobahn-based implementation of websockets.\n\n0.7.1\n----------\n\n**Fixed**\n\n* Fixed blocking service calls for Mac OS.\n\n0.7.0\n----------\n\n**Changed**\n\n* The non-blocking event loop runner ``run()`` now defaults to 10 seconds timeout before raising an exception.\n\n**Added**\n\n* Added blocking behavior to ROS API methods, e.g. ``ros.get_topics``.\n* Added command-line mode to ROS API, e.g. ``roslibpy topic list``.\n* Added blocking behavior to the ``Param`` class.\n* Added parameter manipulation methods to ``Ros`` class: ``get_param``, ``set_param``, ``delete_param``.\n\n0.6.0\n----------\n\n**Changed**\n\n* For consistency, ``timeout`` parameter of ``Goal.send()`` is now expressed in **seconds**, instead of milliseconds.\n\n**Deprecated**\n\n* The ``timeout`` parameter of ``ActionClient()`` is ignored in favor of blocking until the connection is established.\n\n**Fixed**\n\n* Raise exceptions when timeouts expire on ROS connection or service calls.\n\n**Added**\n\n* Support for calling a function in a thread from the Ros client.\n* Added implementation of a Simple Action Server.\n\n0.5.0\n----------\n\n**Changed**\n\n* The non-blocking event loop runner now waits for the connection to be established in order to minimize the need for ``on_ready`` handlers.\n\n**Added**\n\n* Support blocking and non-blocking service calls.\n\n**Fixed**\n\n* Fixed an internal unsubscribing issue.\n\n0.4.1\n----------\n\n**Fixed**\n\n* Resolve reconnection issues.\n\n0.4.0\n----------\n\n**Added**\n\n* Add a non-blocking event loop runner.\n\n0.3.0\n----------\n\n**Changed**\n\n* Unsubscribing from a listener no longer requires the original callback to be passed.\n\n0.2.1\n----------\n\n**Fixed**\n\n* Fix JSON serialization error on TF Client (on Python 3.x).\n\n0.2.0\n----------\n\n**Added**\n\n* Add support for IronPython 2.7.\n\n**Changed**\n\n* Handler ``on_ready`` now defaults to run the callback in thread.\n\n**Deprecated**\n\n* Rename ``run_event_loop`` to the more fitting ``run_forever``.\n\n0.1.1\n----------\n\n**Fixed**\n\n* Minimal documentation fixes.\n\n0.1.0\n----------\n\n**Added**\n\n* Initial version.\n",
    "bugtrack_url": null,
    "license": "MIT license",
    "summary": "Python ROS Bridge library.",
    "version": "1.8.0",
    "project_urls": {
        "Homepage": "https://github.com/gramaziokohler/roslibpy"
    },
    "split_keywords": [
        "ros",
        " ros-bridge",
        " robotics",
        " websockets"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e650f7583c68fe8f535c60f5b568898e7795363aea37e5697c79d5e4b0120cfc",
                "md5": "d751631d4d80bb43916c5e4f2b28955b",
                "sha256": "7b9b57b08a1d8850dcd4d7bb546cf4ccb0bbd5bbc894773719f3bc73c07f684b"
            },
            "downloads": -1,
            "filename": "roslibpy-1.8.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d751631d4d80bb43916c5e4f2b28955b",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 39125,
            "upload_time": "2024-10-25T14:43:28",
            "upload_time_iso_8601": "2024-10-25T14:43:28.117115Z",
            "url": "https://files.pythonhosted.org/packages/e6/50/f7583c68fe8f535c60f5b568898e7795363aea37e5697c79d5e4b0120cfc/roslibpy-1.8.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3840a182b1784fffbb0b29aa6f1330fd918267232f3bfdff1a97ee6573eb0292",
                "md5": "5c2461900c4d0d51ce02e546fd5b1ba2",
                "sha256": "204097609a5e834088c4499243bd921c951143ff00348697eb3c2ca50bc7bf67"
            },
            "downloads": -1,
            "filename": "roslibpy-1.8.0.tar.gz",
            "has_sig": false,
            "md5_digest": "5c2461900c4d0d51ce02e546fd5b1ba2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 139539,
            "upload_time": "2024-10-25T14:43:29",
            "upload_time_iso_8601": "2024-10-25T14:43:29.618987Z",
            "url": "https://files.pythonhosted.org/packages/38/40/a182b1784fffbb0b29aa6f1330fd918267232f3bfdff1a97ee6573eb0292/roslibpy-1.8.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-25 14:43:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "gramaziokohler",
    "github_project": "roslibpy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "roslibpy"
}
        
Elapsed time: 0.45840s