Code Monkey home page Code Monkey logo

jupyter-ros's Introduction

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 seperates the user away from the code. We've built an initial version of the 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.

In the future, we plan to bring simple and fast real-time plotting from ROS topics to this library.

If you find this initial package useful, don't hesitate to contribute! You can also always reach out to [email protected] 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 and ipywidgets for the interactive widgets

conda install jupyter bqplot pyyaml ipywidgets

pyyaml is necessary for rospy.

To install use conda or mamba:

conda install jupyter-ros -c robostack
Development installation

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.