Skip to main content

ROS Support for jupyter notebooks

While the Jupyter ecosystem has been widely adopted by the Data Science and Machine Learning community, the robotics community has not jumped on the band wagon yet! Most tools around ROS, the Robot Operating System, are built using Python and QT.

However, using QT separates the user away from the code. We've built a set of ROS tools for jupyter notebook, trying to promote a rich, interactive experience for Robotics developers utilizing the power of the jupyter notebook.

Video of jupyter-ros in JupyterLab

With jupyter-ros, it's possible to easily create widgets for custom message types to send messages.

If you find this package useful, don't hesitate to contribute! You can also always reach out to w.vollprecht@gmail.com or on twitter: https://twitter.com/wuoulf, or join us on Gitter

Installation and Dependencies

You need a ROS environment with rospy. We recommend using Robostack (follow their installation instructions) which allows you to install ROS in a conda environment. Also required are numpy and bqplot for the live-plotting, ipywidgets for the interactive widgets, and ipycanvas for the Turtlesim animations.

conda install jupyter bqplot pyyaml ipywidgets ipycanvas

pyyaml is necessary for rospy.

To install use conda or mamba:

conda install jupyter-ros -c robostack
Development installation

You can create a dev environment with:

conda create -n jupyros -c conda-forge python nodejs=14 jupyterlab=3 jupyter bqplot pyyaml ipywidgets ipycanvas

For a development installation (requires npm),

git clone https://github.com/RoboStack/jupyter-ros.git
cd jupyter-ros
pip install -e .
jupyter nbextension install --py --symlink --sys-prefix jupyros
jupyter nbextension enable --py --sys-prefix jupyros

To update the defaults.js javascript you need to run python jupyros/ros3d.py.

Troubleshooting

You might see a warning like "The rospy package is not found in your $PYTHONPATH. Subscribe and publish are not going to work. Do you need to activate your ROS environment?"

This is harmless during installation, but if you see this warning in a notebook, you should check that your ROS environment is activated. You can also set the path from inside the notebook using

import sys
sys.path.append('/opt/ros/melodic/lib/python2.7/dist-packages/')

# The next line should now work!
import jupyros

If you got the following error when you run a cell failed to display Jupyter Widget of type VBox, you can solve it by running the following command jupyter nbextension enable --py --sys-prefix widgetsnbextension

License

We use a shared copyright model that enables all contributors to maintain the copyright on their contributions.

This software is licensed under the BSD-3-Clause license. See the LICENSE file for details.

Metadata

Release files for jupyros 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jupyros 0.7.0
File Size Uploaded Provenance Actions
jupyros-0.7.0.tar.gz 30.8 MB Without provenance Details for jupyros-0.7.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jupyros 0.7.0
File Interpreter ABI Platform Actions
jupyros-0.7.0-py3-none-any.whl Python 3 none any Details for jupyros-0.7.0-py3-none-any.whl

Total release size: 32.0 MB

Release files / jupyros-0.7.0.tar.gz

Download URL jupyros-0.7.0.tar.gz
Size 30.8 MB
Tags Source
SHA-256 checksum
How to use checksums
e21cb6cd7535076cb2bf93f9b1aef002a313a11922e0f39dab954512663a2877
BLAKE2b-256 checksum
How to use checksums
9b3b3d6935e89efee10b49bd5638a156473ca4b27d9e74c7bddf4efcfb0235f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release files / jupyros-0.7.0-py3-none-any.whl

Download URL jupyros-0.7.0-py3-none-any.whl
Size 1.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
0f55edbde842f5ec0b440c0b8b7bc1b962ad5017a1338bf6c88fa93b9a9774fd
BLAKE2b-256 checksum
How to use checksums
31e867232deeea10105fd760d04179fad26b064e6d9081c6a58d4cebafc8cbf1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Security for jupyros 0.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page