Skip to main content

Robot Raconteur Python Library

Project description

robotraconteur Python Package

Python pypi conda CI

A communication framework for robotics, automation, and the Internet of Things

http://robotraconteur.com

J. Wason and J. T. Wen, "Robot Raconteur Updates on an Open Source Interoperable Middleware for Robotics", in Proc. IEEE Conference on Automation Science and Engineering, 2023, pp. 1-8.

Github Repository: https://github.com/robotraconteur/robotraconteur

Introduction

Robot Raconteur is a powerful communication framework for robotics and automation systems. While intended for use with robotics, it is flexible enough to be used for other applications, including building control, infrastructure, and Internet-of-Things applications, among many others. This package contains the Robot Raconteur Core library for Python.

Installation

For most platforms, the easiest way to install Robot Raconteur is using pip:

python -m pip install robotraconteur

Packages are available from pip for Python 3.6 and later for Windows (x86,x64), macOS (x64,arm64) and Linux (x64,arm64).

Use python3 instead of python if you are using Ubuntu or other Linux distributions.

It may be neccessary to update pip before installing on older Linux distributions:

sudo python3 -m pip install --upgrade pip

Conda packages are also available from the conda-forge channel:

conda install -c conda-forge robotraconteur

It is highly recommended that the robotraconteurcompanion package is also installed.

python -m pip install robotraconteur robotraconteurcompanion

Or with Conda:

conda install -c conda-forge robotraconteur robotraconteur_companion_python

For other installation options, see the installation instructions.

Documentation

See the Robot Raconteur Documentation

See the Robot Raconteur Examples

Quick Start

The Quick Start example demonstrates the basic functionality of Robot Raconteur be creating a service, and then calling the service using a client. This example uses the "Reynard the Robot" Python package, which provides a simple cartoon robot.

reynard_quickstart_service.py

import RobotRaconteur as RR
RRN = RR.RobotRaconteurNode.s

import threading
import reynard_the_robot

# Define the service definition for the quickstart service
reynard_quickstart_interface = """
service experimental.reynard_quickstart

object ReynardQuickstart
    function void say(string text)
    function void teleport(double x, double y)
end
"""

# Implement the quickstart service


class ReynardQuickstartImpl(object):
    def __init__(self):
        self.reynard = reynard_the_robot.Reynard()
        self.reynard.start()
        self._lock = threading.Lock()

    def say(self, text):
        with self._lock:
            self.reynard.say(text)

    def teleport(self, x, y):
        with self._lock:
            self.reynard.teleport(x, y)


with RR.ServerNodeSetup("experimental.minimal_create2", 53222):
    # Register the service type
    RRN.RegisterServiceType(reynard_quickstart_interface)

    reynard_inst = ReynardQuickstartImpl()

    # Register the service
    RRN.RegisterService("reynard", "experimental.reynard_quickstart.ReynardQuickstart", reynard_inst)

    # Wait for program exit to quit
    input("Press enter to quit")

To run the service, execute the following command:

python reynard_quickstart_service.py

And open a browser to http://localhost:29201 to view the Reynard user interface.

This service can now be called by a connecting client. Because of the magic of Robot Raconteur, it is only necessary to connect to the service to utilize its members. In Python and MATLAB there is no boilerplate code, and in the other languages the boilerplate code is generated automatically.

reynard_quickstart_client.py

from RobotRaconteur.Client import *

# RRN is imported from RobotRaconteur.Client
# Connect to the service.
obj = RRN.ConnectService('rr+tcp://localhost:53222/?service=reynard')

# Call the say function
obj.say("Hello from Reynard!")

# Call the teleport function
obj.teleport(100, 200)

To run the client, execute the following command:

python reynard_quickstart_client.py

License

Apache 2.0

Support

Please report bugs and issues on the GitHub issue tracker.

Ask questions on the Github discussions.

Acknowledgment

This work was supported in part by Subaward No. ARM-TEC-18-01-F-19 and ARM-TEC-19-01-F-24 from the Advanced Robotics for Manufacturing ("ARM") Institute under Agreement Number W911NF-17-3-0004 sponsored by the Office of the Secretary of Defense. ARM Project Management was provided by Christopher Adams. The views and conclusions contained in this document are those of the authors and should not be interpreted as representing the official policies, either expressed or implied, of either ARM or the Office of the Secretary of Defense of the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for Government purposes, notwithstanding any copyright notation herein.

This work was supported in part by the New York State Empire State Development Division of Science, Technology and Innovation (NYSTAR) under contract C160142.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

RobotRaconteur-1.2.2-cp312-cp312-win_amd64.whl (3.4 MB view hashes)

Uploaded CPython 3.12 Windows x86-64

RobotRaconteur-1.2.2-cp312-cp312-win32.whl (2.9 MB view hashes)

Uploaded CPython 3.12 Windows x86

RobotRaconteur-1.2.2-cp312-cp312-manylinux_2_31_x86_64.whl (21.5 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.31+ x86-64

RobotRaconteur-1.2.2-cp312-cp312-manylinux_2_31_aarch64.whl (23.1 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.31+ ARM64

RobotRaconteur-1.2.2-cp312-cp312-macosx_14_0_arm64.whl (21.7 MB view hashes)

Uploaded CPython 3.12 macOS 14.0+ ARM64

RobotRaconteur-1.2.2-cp312-cp312-macosx_12_0_x86_64.whl (22.1 MB view hashes)

Uploaded CPython 3.12 macOS 12.0+ x86-64

RobotRaconteur-1.2.2-cp311-cp311-win_amd64.whl (3.4 MB view hashes)

Uploaded CPython 3.11 Windows x86-64

RobotRaconteur-1.2.2-cp311-cp311-win32.whl (2.9 MB view hashes)

Uploaded CPython 3.11 Windows x86

RobotRaconteur-1.2.2-cp311-cp311-manylinux_2_31_x86_64.whl (21.5 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.31+ x86-64

RobotRaconteur-1.2.2-cp311-cp311-manylinux_2_31_aarch64.whl (23.1 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.31+ ARM64

RobotRaconteur-1.2.2-cp311-cp311-macosx_14_0_arm64.whl (21.7 MB view hashes)

Uploaded CPython 3.11 macOS 14.0+ ARM64

RobotRaconteur-1.2.2-cp311-cp311-macosx_12_0_x86_64.whl (22.1 MB view hashes)

Uploaded CPython 3.11 macOS 12.0+ x86-64

RobotRaconteur-1.2.2-cp310-cp310-win_amd64.whl (3.4 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

RobotRaconteur-1.2.2-cp310-cp310-win32.whl (2.9 MB view hashes)

Uploaded CPython 3.10 Windows x86

RobotRaconteur-1.2.2-cp310-cp310-manylinux_2_31_x86_64.whl (21.5 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.31+ x86-64

RobotRaconteur-1.2.2-cp310-cp310-manylinux_2_31_aarch64.whl (23.1 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.31+ ARM64

RobotRaconteur-1.2.2-cp310-cp310-macosx_14_0_arm64.whl (21.7 MB view hashes)

Uploaded CPython 3.10 macOS 14.0+ ARM64

RobotRaconteur-1.2.2-cp310-cp310-macosx_12_0_x86_64.whl (22.1 MB view hashes)

Uploaded CPython 3.10 macOS 12.0+ x86-64

RobotRaconteur-1.2.2-cp39-cp39-win_amd64.whl (3.4 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

RobotRaconteur-1.2.2-cp39-cp39-win32.whl (2.9 MB view hashes)

Uploaded CPython 3.9 Windows x86

RobotRaconteur-1.2.2-cp39-cp39-manylinux_2_31_x86_64.whl (21.5 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.31+ x86-64

RobotRaconteur-1.2.2-cp39-cp39-manylinux_2_31_aarch64.whl (23.1 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.31+ ARM64

RobotRaconteur-1.2.2-cp39-cp39-macosx_12_0_x86_64.whl (22.1 MB view hashes)

Uploaded CPython 3.9 macOS 12.0+ x86-64

RobotRaconteur-1.2.2-cp38-cp38-win_amd64.whl (3.4 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

RobotRaconteur-1.2.2-cp38-cp38-win32.whl (2.9 MB view hashes)

Uploaded CPython 3.8 Windows x86

RobotRaconteur-1.2.2-cp38-cp38-manylinux_2_31_x86_64.whl (21.5 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.31+ x86-64

RobotRaconteur-1.2.2-cp38-cp38-manylinux_2_31_aarch64.whl (23.1 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.31+ ARM64

RobotRaconteur-1.2.2-cp38-cp38-macosx_12_0_x86_64.whl (22.1 MB view hashes)

Uploaded CPython 3.8 macOS 12.0+ x86-64

RobotRaconteur-1.2.2-cp37-cp37m-win_amd64.whl (3.4 MB view hashes)

Uploaded CPython 3.7m Windows x86-64

RobotRaconteur-1.2.2-cp37-cp37m-win32.whl (2.9 MB view hashes)

Uploaded CPython 3.7m Windows x86

RobotRaconteur-1.2.2-cp37-cp37m-manylinux_2_31_x86_64.whl (21.5 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.31+ x86-64

RobotRaconteur-1.2.2-cp37-cp37m-manylinux_2_31_aarch64.whl (23.1 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.31+ ARM64

RobotRaconteur-1.2.2-cp37-cp37m-macosx_12_0_x86_64.whl (22.0 MB view hashes)

Uploaded CPython 3.7m macOS 12.0+ x86-64

RobotRaconteur-1.2.2-cp36-cp36m-win_amd64.whl (3.4 MB view hashes)

Uploaded CPython 3.6m Windows x86-64

RobotRaconteur-1.2.2-cp36-cp36m-win32.whl (2.9 MB view hashes)

Uploaded CPython 3.6m Windows x86

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page