Software
roslibpy
By Robot Web Tools, from github.com/RobotWebTools/roslibpy (opens in a new tab)
- Middleware
- Library
- MIT
A Python library for talking to ROS robots over WebSockets via rosbridge, without needing a local ROS installation. It mirrors the API of roslibjs.
Facts
- GitHub stars
- 336read on 29 Nov 2026
- Last update
- 10 Nov 2026Newest commit on main
- Maintenance
- Activea commit in the last 90 days
- Difficulty
- Beginner
Checked on GitHub on 29 Nov 2026.
Licenses
- Code
- MIT (opens in a new tab)
Read by Robotheca from LICENSE (opens in a new tab) (MIT) at commit 262ff25 (opens in a new tab), on 15 Nov 2026.
- Commercial use
- Yes
At a glance
- What it is
- Publishes and subscribes to ROS topics.
- Makes service calls and advertises services.
- Gets, sets and deletes ROS parameters and queries ROS meta-information.
- Supports actionlib for preemptable tasks.
- Provides a TF client through the tf2_web_republisher.
- Runs on Python 3.x and IronPython 2.7, with ROS 1 fully supported and ROS 2 support in progress.
Robotheca's summary of the project's documents, not the creator's words.
- Robots on Robotheca
- No robot on Robotheca uses it yet.
- Licence
- MIT. Commercial use: Yes. Where it was read
- Install
- In the creator's words: The project's README (opens in a new tab)
- Maintenance
- Active, last commit on 10 Nov 2026.
Use it
How to install it, in the creator's words: The project's README (opens in a new tab)
Robotheca doesn't review code. Read it before running it.
Files and versions
- Repository on GitHubgithub.com/RobotWebTools/roslibpy (opens in a new tab)
- The version Robotheca read262ff25 (opens in a new tab)
- Latest releaseroslibpy v2.1.0 (7 Nov 2026)
Robotheca read the repository at two versions: the summary at f5793db and the facts and the README at 262ff25 (read on 29 Nov 2026).
Robotheca never hosts the code: each link goes to the creator's own page.
The README
The creator's own README, copied as written: README.rst by Robot Web Tools, at commit 262ff25, under MIT (opens in a new tab). The original on GitHub (opens in a new tab).
Read the README here
============================ roslibpy: ROS Bridge library
.. start-badges
.. image:: https://readthedocs.org/projects/roslibpy/badge/?style=flat (opens in a new tab) :target: https://roslibpy.readthedocs.io/en/latest/ (opens in a new tab) :alt: Documentation Status
.. image:: https://img.shields.io/badge/docs-%E4%B8%AD%E6%96%87-brightgreen.svg (opens in a new tab) :target: https://roslibpy-docs-zh.readthedocs.io (opens in a new tab) :alt: Documentation: Chinese translation
.. image:: https://github.com/gramaziokohler/roslibpy/workflows/build/badge.svg (opens in a new tab) :target: https://github.com/gramaziokohler/roslibpy/actions (opens in a new tab) :alt: Github Actions CI Build Status
.. image:: https://img.shields.io/github/license/gramaziokohler/roslibpy.svg (opens in a new tab) :target: https://pypi.python.org/pypi/roslibpy (opens in a new tab) :alt: License
.. image:: https://img.shields.io/pypi/v/roslibpy.svg (opens in a new tab) :target: https://pypi.python.org/pypi/roslibpy (opens in a new tab) :alt: PyPI Package latest release
.. image:: https://anaconda.org/conda-forge/roslibpy/badges/version.svg (opens in a new tab) :target: https://anaconda.org/conda-forge/roslibpy (opens in a new tab)
.. image:: https://img.shields.io/pypi/implementation/roslibpy.svg (opens in a new tab) :target: https://pypi.python.org/pypi/roslibpy (opens in a new tab) :alt: Supported implementations
.. end-badges
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_.
ROS 1 is fully supported. ROS 2 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
The default WebSocket transport on CPython uses Autobahn on the Twisted
reactor. An alternative transport that runs the same Autobahn WebSocket stack
on an asyncio event loop is also available (no extra dependencies required);
see Transport selection_ below.
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.
Transport selection
CPython uses the twisted transport by default; IronPython uses cli. The
asyncio transport runs the same Autobahn WebSocket stack on an asyncio
event loop. To select it, either pass it per client, set the process-wide
default, or set the environment variable::
roslibpy.Ros(host='localhost', port=9090, transport='asyncio')
roslibpy.set_default_transport('asyncio')
ROSLIBPY_TRANSPORT=asyncio python my_script.py
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.rstwith all novelty! -
Create a release branch and prepare the release:
::
git checkout -b release-x.y.z
invoke release [patch|minor|major]
- This will run tests, bump the version, create a git tag, and commit changes.
- Push the release branch and tag, then create a Pull Request to
main:
::
git push origin release-x.y.z
git push origin --tags
- Once the PR is reviewed and merged into
main, the release workflow will automatically publish to PyPI. - The workflow verifies the tag is on the
mainbranch before publishing, preventing accidental releases from feature branches.
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 (opens in a new tab)
Robotheca lists software as a reference: nothing is hosted or run here, and every fact links to where it was read.