Package: irobot_edu_sdk
iRobot® Education Python® SDKThis is an installable Python SDK for the iRobot Education robots.
It supports the iRobot® Root® rt0, Root® rt1 and Create® 3 educational robots.This SDK uses a similar format as Learning Level 3 of the iRobot® Coding App (code.irobot.com) and the iRobot® Python Web Playground (python.irobot.com).
As such, it uses async execution and is compatible with Python® 3.9 or greater. MicroPython may work, but it is not tested.This SDK is designed to communicate with robots via Bluetooth® Low Energy on Windows®, macOS®, and Linux® systems.
Experimental backends are provided for communicating over USB serial and USB on MicroPython boards with native USB ports.
These are not currently supported.Disclaimer: this is a BETA release.The BETA version of the iRobot® Python SDK is provided “as is” to conduct testing and gather user feedback. There is no guarantee on its performance or compatibility, continued availability, or on a timeline for improvements.Please do fileissuesas they are found, so that the team (or the community) can address them.Installation using pippip3 install irobot_edu_sdkOptional: Installation from Sourcegit clone https://github.com/iRobotEducation/irobot-edu-python-sdk.gitFrom the newly cloned SDK's directory, run:pip3 install .UsageA robot object is created from one of the communication backends.
This robot object has a number of event callbacks that can be registered and commands that can be sent to the robot.
After a program is setup, theplay()method will start execution and block until the robot's nose or power button is pressed, the robot is disconnected, orCtrl-Cis pressed.ExamplesA good way of getting started is by looking at the examples providedhere.These examples mirror the iRobot EducationPython Web Playground.BackendBluetoothiRobot Education's robots communicate using a common Bluetooth Low Energy serial protocol, the details of which can be foundhere.fromirobot_edu_sdk.backend.bluetoothimportBluetooth# Connect to robot over Bluetooth Low Energy.backend0=Bluetooth('')# Connects to the first BLE robot detected.backend1=Bluetooth('ROOT')# Use robot named 'ROOT'ALPHA featuresThe features detailed below are included as ALPHA versions, which provide limited functionality and are likely to contain several known or unknown bugs.Support is not provided for ALPHA features at this time.SerialSome Root® robots support a serial port over USB.
This feature is currently not available on Create® 3 robots.fromirobot_edu_sdk.backend.serialimportSerial# Connect to robot over USB-C cable.backend=Serial('COM1')# Windowsbackend=Serial('/dev/cu.usbmodemRT0123F456789')# macOSbackend=Serial('/dev/ttyACM0')# LinuxMicroPythonThis SDK requires MicroPython firmware that includes theuasynciolibrary -- version 1.13 or greater.
Download the latest release for your board fromhttp://micropython.org/download.
Then, copy theirobot_edu_sdkdirectory and all contents to thePYBFLASHdrive.fromirobot_edu_sdk.backend.usbimportUSB# Connect to robot from MicroPython-compatible board over USB.backend=USB()# MicroPython-compatible board is powered from USB-C portNOTE: You may need to use a USB-C to USB-A adapter or a USB-C to micro USB cable.Turtle programming modelThis portion of the SDK provides an alternative programming interface to the SDK following the paradigm ofturtle graphics.
It provides a limited, simplified, and synchronous interface to the in the spirit (and largely the syntax) of thePython® turtle.Turtle class.
It can be used on any robot supported by the SDK, using any supported backend. See theREADME.mdfile and other
example files in theexamples_turtle/directory for more information.Additional information© 2022-2023 iRobot Corporation. All rights reserved.Terms and ConditionsPrivacy PolicyAttributionsPython® 3 is governed by and a trademark of the Python Software Foundation.The Bluetooth® word mark and logos are registered trademarks owned by Bluetooth SIG, Inc. and any use of such marks by iRobot is under license.Windows® is a trademark of Microsoft Corporation, registered in the U.S. and other countries and regions.macOS® is a trademark of Apple Inc., registered in the U.S. and other countries and regions.Linux® is a trademark of Linus Torvalds, registered in the U.S. and other countries and regions.USB-C™ is a trademark of USB Implementers Forum.All other trademarks mentioned are the property of their respective owners.This library is made possible thanks to other community software.
The following are direct required dependencies:Bleak, licensed under the MIT license, availableherepySerial, licensed under the BSD 3-Clause license, availablehereRoot Robot Python Web App, licensed under the MIT license, availablehereTo build, the following is recommended:Poetry, licensed under the MIT license, availablehereThe iRobot Education Python SDK provided is licensed under the 3-Clause BSD license, foundhere