Welcome to Being¶
Robotic middleware library for easy to use robotic projects.
Being enables engineers and programmers to quickly build robotic programs. Abstracting away most of the low-level heavy lifting when working with motors and sensors. The emphasis lies with slim, high-level programs which operate on behavior and character to capture the expressive intent of artists. An integrated web interface makes the resulting applications accessible and formable at runtime.
Key Features¶
Connected block logic
CAN based motor controllers
Spline based motion curves
Web based user interface
Library Installation¶
pip install being
The following third-party libraries are optional:
RPi.GPIO for accessing Raspberry Pi GPIO
PyAudio for audio streams. Python bindings for PortAudio which needs to be installed separately.
These can be installed manually or by using extras:
pip install being[rpi, audio]
Getting Started¶
Our first being with one dummy motor. This will create a content
directory
in the current working directory where the motion curves will be stored.
from being.awakening import awake
from being.motion_player import MotionPlayer
from being.motors.blocks import DummyMotor
# Create blocks
mp = MotionPlayer()
motor = DummyMotor(length=0.1)
# Make connections
mp.positionOutputs[0].connect(motor.input)
# Run being
awake(mp)
Now inspect the web-based user interface under http://localhost:8080/.
Going Further¶
Source Code¶
This project is hosted on GitHub.
Dependencies¶
This project uses the usual suspects of the scientific Python stack. Some additional third party libraries for HTTP server, CAN/CanOpen and different configuration formats with round trip preservation.
The Python Raspberry Pi library RPi.GPIO is an optional dependency for accessing the GPIO on a Raspberry Pi which is not available on non Raspberry PI platforms.
The frontend uses pure JavaScript and is directly hosted by an aiohttp web server from within Being. No additional JavaScript frameworks needed.
Documentation¶
Some non-Python dependencies are needed for building the documentation:
Python bindings and additional packages can be installed with
pip install -r docs/requirements.txt
Warning
The sphinx-js package has a pinned version of Jinja2 which is in conflict with the version needed by Being. Upgrade Jinja2 after intalling the documentation requirements or reinstall the Being requirements.
Developing¶
When downloading the source code it is easiest to install Being as a development project.
$ python3 setup.py install develop
The tests can then be run with
$ python3 setup.py test
Contributing¶
Coding style is mostly compatible with Google Python Style Guide with one exception: camelCase for variables, arguments and attributes. snake_case for functions, methods and properties.