OSC PIBOT framework

provides an artist-friendly OSC based interface that allows for improvisational and performative control of robotics

View the Project on GitHub thirtysevennorth/OSC_PIBOT

OVERVIEW

This repo houses a framework for interacting with and controlling iCreate3 robots using OSC or Open Sound Control. It also has a bridge between OSC and ROS2.

Pages:

The OSC PIBOT framework provides a OSC-based interface that allows for artist-friendly improvisational and performative control of a variety of robots, LEDs, motors and I2C devices from existing media and performance software tools like Max-MSP, Isadora, TouchDesigner, Qlab, and any other OSC capable software.

For each robot, a compute board such as a Raspberry Pi 4B, installed with Ubuntu 22.04, is running a Python script that sets up an OSC server, acting as a bridge between all other OSC clients and the iCreate3 itself (which can’t receive OSC natively). Each Pi only listens for messages relating to its assigned robot, filters them, expands them to lower-level commands, and sends them directly to the robot via Bluetooth. For more reliable Bluetooth connection with longer range coverage, the Pis are mounted on the robots and receive OSC messages via a local WiFi network. An optional ‘hub’ computer may be employed to coordinate multiple robots.

Sample MAX-MSP and Isadora patches for use with the PIBOT framework are on the SOFTWARE EXAMPLES page. OSC PIBOT can be used with any OSC sender / receiver and additional sample files are welcomed.

Minimum Requirements: Ubuntu 22.04 or similar OS on a Raspberry Pi (tested w/ a Pi 4B w/ 4G ram) connected to a robot via bluetooth, a robot (such as an ICreate3) based on irobot-edu-python-sdk, control machine with an OSC sending software source, local network allowing UDP communication between devices.

Two modes: 1) peer to peer - nodes run on the Pi on each robot and each directly receive/ transmit OSC messages 2) one client, multiple servers - a machine running a robot sequencer (written in Clojure) can receive cue sheets with various behavioral routines placed on a timeline and coordinate the bots accordingly.

ROS2

An experimental (and currently incomplete) ROS2 backend exists under src/osc_bridge. Its development was temporarily halted in favor of the Bluetooth-based iRobot EDU Python SDK, which appeared to have much better latency of command execution. We hope for future development to include additional ROS2 research, and welcome contributions.

LED, POWER and AUDIO CONTROL

The framework provides unified OSC based control of supplemental I2C components controlled via the Pi. The customised boards developed provide 16 channels of I2C PWM based control of 12/24v LED lighting arrays as well as servo motor control, I2S audio outputs / input via an Adafruit MAX98357 I2S amplifier, and charge control for a supplemental USB 3 PD battery bank to deliver 12 and 15v power. The board is sized to fit in the iCreate drawer alongside a raspberry pi.

INSTALLATION

The OSC PIBOT framework is intended for use on a raspberry Pi 4 or later running Ubuntu 22.04, and to communicate with an iCreate 3 or iCreate Root robot on the same local network as the Pi and OSC sender.

PI SETUP FOR PIBOT

The Pi should be setup running Ubuntu 22.04 with ports to send / receive UDP messages open. Bluetooth, I2C, I2S functionality must be enabled.

Network configuration, Pihub and multiple robots

The hub/sequencer allows for control of multiple robots and multiple pi’s from a unified OSC interface.

EXAMPLES AND RESOURCES

Please see the EXAMPLES page in the docs folder for example files, downloads and additional configuration resources.

USAGE

PIBOT

The Pibot script will expect to find the following environment variables:

Note: If there are no hub clients (i.e. Pihub & Isadora) then the environment variables can be placeholder IPs and ports.

Environment variables should be set up by editing and then running the scripts/env.sh script, or passed in directly at the shell.

START OSC PIBOT ON PI

Once installation and configuration is complete, from the Pi command line enter

    cd OSC_PIBOT/scripts 
    source ./env.sh
    source ./pibot-start

You should begin seeing status messages display on the pi terminal window.

To confirm communication try sending a OSC message such as /pibot/command/play-note from an OSC source. The robot should respond, and you should also see status messages display confirming. You can also watch the incoming OSC address & port you set for the update streams below such as /pibot/update/battery.

START PIHUB (OPTIONAL)

On the PIHUB Pi,

    cd OSC_PIBOT/scripts 
    source ./env.sh
    source ./pihub-start

OSC MESSAGES

The following are a list of OSC messages in use along with their arguments and targets. Messages may be generated or received by any OSC source. Examples.md has links to example file implementing these messages for a variety of software platforms, and pibot_osc.py implements handlers for the messages.

Update streams

Commands

direct to pi commands

direct to hub commands

ATTRIBUTION AND CREDITS

x

The OSC PIBOT framework was originally developed for the Dream Club Lab,** a light and media art installation by Ian Winters and Elaine Buckholtz, as a Nighthouse Studios collaboration, with a music score by [Evelyn Ficarra](https://evelynficarra.net, and robot programming Dimitris Kyriakoudis. Dream Club Lab was commissioned by the San Jose Downtown Association through the support of the City of San Jose and the Knight Foundation, with production support by 37 North. Learn more about the Dream Club Lab project.

CONTRIBUTORS

Coding for OSC_PIBOT framework by Dimitris Kyriakoudis with Ian Winters. Hardware and framework concept by Ian Winters.

Further development of the OSC PIBOT framework takes place through the AI Perform Initiatve at the University of Sussex led by Professor Evelyn Ficarra, through 37 North and the Milkbar. The Dream Club Lab will also be a course at Mass College of Art by Professor Elaine Buckholtz.

CONTRIBUTIONS

Additional contributions to the development of artist oriented robotics software are welcomed as well as workshop inquiries.

LICENSE

The OSB PIBOT framework is released under the BSD 3-Clause License with no warranty of any kind. It uses the following open source direct dependencies, with license terms incorporated by reference, as well as those of any sub-dependencies. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.