Skip to main content

Unofficial Aseba Python bindings

Project description

Pyaseba

Pyaseba provides Python bindings for Aseba using pybind11.

Aseba is a light-way communication protocol and scripting language which works from tiny micro-controllers to your fully feature PC, developed at EPFL Lausanne. For the words of its authors

Aseba is a set of tools which allow novices to program robots easily and efficiently. For these reasons, Aseba is well-suited for robotic education and research. Aseba is an open-source software created by Dr. Stéphane Magnenat with contributions from the community.

It is known as the scripting language of the educational Thymio robot. Programming it is normally done in a GUI client, like Aseba Studio or the Thymio VPL.

Pyaseba offers an alternative to GUI clients to interact with any robot that runs Aseba (or more generally with any Aseba network). With Pyaseba, you can perform common operations like reading and writing Aseba variables or loading Aseba scripts but also more low-level actions, like sending and receiving Aseba messages directly.

Pyaseba provides two interfaces: 1) a lower-level client API that let you interact with a collection of Aseba nodes and 2) a higher-level client node API to interact with a single Aseba node, exposing to Python its native variables, events and functions. The clients can connect to multiple Aseba networks at once, each comprising potentially multiple Aseba nodes.

Moreover, it comes with its own local Aseba network that runs Aseba nodes implemented in Python, i.e., nodes with Python native functions and Python control steps. Its primary motivation is to test the client interfaces but it may be used to extend an Aseba network with custom nodes, for example for teaching.

Installation

Build from source

pip install https://github.com/jeguzzi/pyaseba.git

or fetch pre-build wheels

pip install pyaseba

Example

Assuming a Thymio is connected to one of the serial ports, we can use pyaseba to interact with it from Python

>>> from pyaseba import Client
>>> client = Client()
>>> client.connect("ser:name=Thymio")
1
>>> node, _ = client.wait_node()

to read Aseba variables, like the proximity sensor readings,

>>> client.get_variable(node, "prox.horizontal")
[3860, 4339, 2546, 0, 0, 0, 0]

to set Aseba variables, e.g. to change LED colors

>>> client.set_variable(node, "leds.top", [0, 32, 0])

to load and run Aseba scripts, e.g. to play a sound

>>> client.load_script(node, "call sound.system(1)")
>>> client.cmd_run(node)

Pyaseba also exposes the Aseba low-level messaging protocol, for instance to send

from pyaseba.client.msgs import ListNodes
>>> client.send_message(ListNodes())

and receive message

>>> client.get_message()
(NodePresent(source=48069, version=9), 1)

The repository and the documentation contains an extensive collection of examples.

Documentation

The documentation is published online.

License and Dependencies

Pyaseba is distributed under MIT license. It make use of the open source dependencies listed below without redistributing them.

Aseba

Pyaseba can be build using the version of Aseba maintained by the Aseba-community and distributed under LGPL-3.0 license or the version maintained by the Mobsya association, also distributed under LGPL-3.0 license.

The Mobsya version include additional message to interact with the latest version of the Thymio robot.

Pyaseba is using Aseba source code without redistributing it.

Dashel

Pyaseba uses the source code of Dashel, distributed under BSD-3-Clause license, without redistributing it.

Pybind11

Pyaseba is using Aseba source code without redistributing it.

Spdlog, Fmt and pybind11_log

If pyaseba is build with logging support, it uses Spdlog, fmt, and pybind11_log without redistributing them.

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

If you're not sure about the file name format, learn more about wheel file names.

pyaseba-0.0.2-cp314-cp314-manylinux_2_35_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.35+ x86-64

pyaseba-0.0.2-cp314-cp314-manylinux_2_35_aarch64.whl (2.8 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.35+ ARM64

pyaseba-0.0.2-cp314-cp314-macosx_15_0_x86_64.whl (916.6 kB view details)

Uploaded CPython 3.14macOS 15.0+ x86-64

pyaseba-0.0.2-cp314-cp314-macosx_15_0_arm64.whl (841.5 kB view details)

Uploaded CPython 3.14macOS 15.0+ ARM64

pyaseba-0.0.2-cp313-cp313-manylinux_2_35_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.35+ x86-64

pyaseba-0.0.2-cp313-cp313-manylinux_2_35_aarch64.whl (2.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.35+ ARM64

pyaseba-0.0.2-cp313-cp313-macosx_15_0_x86_64.whl (916.1 kB view details)

Uploaded CPython 3.13macOS 15.0+ x86-64

pyaseba-0.0.2-cp313-cp313-macosx_15_0_arm64.whl (839.9 kB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

pyaseba-0.0.2-cp312-cp312-manylinux_2_35_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.35+ x86-64

pyaseba-0.0.2-cp312-cp312-manylinux_2_35_aarch64.whl (2.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.35+ ARM64

pyaseba-0.0.2-cp312-cp312-macosx_15_0_x86_64.whl (916.0 kB view details)

Uploaded CPython 3.12macOS 15.0+ x86-64

pyaseba-0.0.2-cp312-cp312-macosx_15_0_arm64.whl (839.8 kB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

File details

Details for the file pyaseba-0.0.2-cp314-cp314-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for pyaseba-0.0.2-cp314-cp314-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 da2534b78f1b356c6bf75b493fd38011f92f37ec262e332df5135693356b4968
MD5 2d326f2456302114ed2903eb763ccd7e
BLAKE2b-256 5b7178e003a1d945b12e4c876cc5ff1409ea756e0dcdcd69cf2d01cf1d34fa2d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaseba-0.0.2-cp314-cp314-manylinux_2_35_x86_64.whl:

Publisher: release.yaml on jeguzzi/pyaseba

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyaseba-0.0.2-cp314-cp314-manylinux_2_35_aarch64.whl.

File metadata

File hashes

Hashes for pyaseba-0.0.2-cp314-cp314-manylinux_2_35_aarch64.whl
Algorithm Hash digest
SHA256 37559905e294f6ae224e80a081bf9c881864e969663b7824e3dfb735e9138545
MD5 8ba62372c0ff35074837ff0eae19d271
BLAKE2b-256 cf0546f0c66288f6c10a6abdbfbd93e0d6736b58d752598a7daf045ad4c4f460

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaseba-0.0.2-cp314-cp314-manylinux_2_35_aarch64.whl:

Publisher: release.yaml on jeguzzi/pyaseba

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyaseba-0.0.2-cp314-cp314-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for pyaseba-0.0.2-cp314-cp314-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 3e657df6e64d310c9453796558a5a3e128f023a4186868c59f8142121a09352c
MD5 992423e1c1e832cdbc4b326c214db549
BLAKE2b-256 0fd9d262c090185e71c3db4bf271269380f8bb8d7d3ed625d193f4fd6782f1db

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaseba-0.0.2-cp314-cp314-macosx_15_0_x86_64.whl:

Publisher: release.yaml on jeguzzi/pyaseba

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyaseba-0.0.2-cp314-cp314-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pyaseba-0.0.2-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 077f219b2f20bb1bbbfea36ea324154808c3d46be85c7abcef42e1c790e9218b
MD5 fa13cbc2e354db511a85f99747f4e287
BLAKE2b-256 f5b5ec807b217caa3c2aa64e562233f6a4bbddd3ee6b8fadb52c15e9fbd4d29b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaseba-0.0.2-cp314-cp314-macosx_15_0_arm64.whl:

Publisher: release.yaml on jeguzzi/pyaseba

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyaseba-0.0.2-cp313-cp313-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for pyaseba-0.0.2-cp313-cp313-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 c96d1bac29b260dd7ea4ff52c86a7f6402112da4e9bc5f10fdcc248b451cad79
MD5 e161daf14b09a2969b0f15070e1dd48b
BLAKE2b-256 03d5f188bf5e40af8006cb1f6d9303557b76030d24e8cd0ab33792c621c85e3d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaseba-0.0.2-cp313-cp313-manylinux_2_35_x86_64.whl:

Publisher: release.yaml on jeguzzi/pyaseba

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyaseba-0.0.2-cp313-cp313-manylinux_2_35_aarch64.whl.

File metadata

File hashes

Hashes for pyaseba-0.0.2-cp313-cp313-manylinux_2_35_aarch64.whl
Algorithm Hash digest
SHA256 8245532056d7ae252381cded7e09bab8c798a383aa510c5e9bec3401a9f8c762
MD5 8f9f7bfa90fccb701f3bdb93ea14b296
BLAKE2b-256 e9ddf4da399711018c6b081a85aa10b18e18d194fe1e1142a67004b7c9e9d145

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaseba-0.0.2-cp313-cp313-manylinux_2_35_aarch64.whl:

Publisher: release.yaml on jeguzzi/pyaseba

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyaseba-0.0.2-cp313-cp313-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for pyaseba-0.0.2-cp313-cp313-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 a53cad283842b72907c6ee77761f2c81d4bb9b72c51a6d2d971b1551f5d41623
MD5 a29969641e1fb2a58d46fd0e1e87a61f
BLAKE2b-256 2f04c61e4b36cdcc70e386ce912b639957f0a950e95039eacc0bad7fbd8d1c59

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaseba-0.0.2-cp313-cp313-macosx_15_0_x86_64.whl:

Publisher: release.yaml on jeguzzi/pyaseba

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyaseba-0.0.2-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pyaseba-0.0.2-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 56e536a6235d8e78641bcecdd654be190befd2a5018cdeb888d61b4e5a1105ea
MD5 1724096c1e68259634734e7e6ef50f0a
BLAKE2b-256 8c45cb5f0792746f086edbdca92b22403b6989b973974eac67c62166f0836529

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaseba-0.0.2-cp313-cp313-macosx_15_0_arm64.whl:

Publisher: release.yaml on jeguzzi/pyaseba

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyaseba-0.0.2-cp312-cp312-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for pyaseba-0.0.2-cp312-cp312-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 f97190971e3759fcd78baca8ad0bc2ad66daad94619cb2ba274f9e6869a55b9b
MD5 0b427185c8f61e47099a425aa9a8e2ae
BLAKE2b-256 229490d4e8e4ee3e3607d3378563126b5b560c8661b46efc5c00c33c83bb2ca5

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaseba-0.0.2-cp312-cp312-manylinux_2_35_x86_64.whl:

Publisher: release.yaml on jeguzzi/pyaseba

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyaseba-0.0.2-cp312-cp312-manylinux_2_35_aarch64.whl.

File metadata

File hashes

Hashes for pyaseba-0.0.2-cp312-cp312-manylinux_2_35_aarch64.whl
Algorithm Hash digest
SHA256 dd6b318209b4b76ded086ca4a8858ff828627d2b4f4474916ecf030833850443
MD5 d5ba39beb029d4c8ad623c605830836f
BLAKE2b-256 00ac642f68e2505424708d809acf70c8cc972d10d91f8d0aebc89e063f4e1775

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaseba-0.0.2-cp312-cp312-manylinux_2_35_aarch64.whl:

Publisher: release.yaml on jeguzzi/pyaseba

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyaseba-0.0.2-cp312-cp312-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for pyaseba-0.0.2-cp312-cp312-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 da396e4e8452397920441d30c7e904616616295eeb1e4c43a5eeb324eec6f16c
MD5 9d7486526835dd26bb544f5bab4af3c5
BLAKE2b-256 63acc0da54d2ef619222349e803bf8f4df23633d20ae2cbc4b1413947296ffc4

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaseba-0.0.2-cp312-cp312-macosx_15_0_x86_64.whl:

Publisher: release.yaml on jeguzzi/pyaseba

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyaseba-0.0.2-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pyaseba-0.0.2-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 ff346e5864d1237648d225a6f229de5de2cfa491d54287dc6b647c67fc109c30
MD5 5879b11a1a34bbc3496d55b65d63a464
BLAKE2b-256 1de61f9400d7aa40c2b9e99abe4fed156fc4d34e675f3c94344f0c26f045f14c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaseba-0.0.2-cp312-cp312-macosx_15_0_arm64.whl:

Publisher: release.yaml on jeguzzi/pyaseba

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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