Python port of the behaviors implemented in the Thymio firmware.
Project description
thymio-python-behaviors
Python port of the behaviors implemented in the Thymio firmware.
Use pyaseba or pyenki to apply the behaviors to real and simulated robots.
Example with real Thymio (pyaseba)
import time
from pyaseba.client.thymio import Thymio
import thymio_behaviors
behavior = thymio_behaviors.ExplorerBehavior()
thymio = Thymio()
if thymio.connect(start_mirroring=True):
thymio.set_controller(behavior, time_step=0.1)
time.sleep(10)
thymio.close(reset=True)
Have a look at the complete example that selects which behavior to run.
Example with simulated Thymio (pyenki)
import pyenki
import pyenki.viewer
from pyenki.adapters import make_controller_from_thymio_behavior
import thymio_behaviors
behavior = thymio_behaviors.ExplorerBehavior()
thymio = pyenki.Thymio2()
thymio.control_step_callback = make_controller_from_thymio_behavior(
thymio, behavior)
world = pyenki.World(radius=50)
world.add_object(thymio)
pyenki.viewer.init()
pyenki.viewer.run_in_viewer(world, duration=10)
pyenki.viewer.cleanup()
Have a look at the complete example that selects which behavior to run.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file thymio_behaviors-0.0.2-py3-none-any.whl.
File metadata
- Download URL: thymio_behaviors-0.0.2-py3-none-any.whl
- Upload date:
- Size: 13.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61d8cc1d2bb9ec89af1c4176fe6fb1b38ee1ae6fdd2b8cbb10e4d7a34e6dde7c
|
|
| MD5 |
8c37c6ed260b4993b5e0122868ff9e04
|
|
| BLAKE2b-256 |
c54eccfc3e49d1a5b7ff7fee27509384524ec97c4197daa32ac14fb84d868d63
|
Provenance
The following attestation bundles were made for thymio_behaviors-0.0.2-py3-none-any.whl:
Publisher:
release.yml on jeguzzi/thymio-python-behaviors
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
thymio_behaviors-0.0.2-py3-none-any.whl -
Subject digest:
61d8cc1d2bb9ec89af1c4176fe6fb1b38ee1ae6fdd2b8cbb10e4d7a34e6dde7c - Sigstore transparency entry: 1437324477
- Sigstore integration time:
-
Permalink:
jeguzzi/thymio-python-behaviors@e226dd23c6c36952321dcc30c169a8a8b9d9f969 -
Branch / Tag:
refs/tags/0.0.2 - Owner: https://github.com/jeguzzi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e226dd23c6c36952321dcc30c169a8a8b9d9f969 -
Trigger Event:
push
-
Statement type: