phyelds-webots
Webots integration for phyelds: run aggregate programs on the robots of a Webots simulation.
Installation
Install it in the Python that Webots runs the controllers with (Python 3.12 or later):
pip install phyelds-webots
The controller module comes with Webots.
Usage
Give each robot an Emitter, a Receiver and, for the position sensor, a GPS; the range
of the emitter decides who the neighbors are. Then, in the controller:
from controller import Robot
from phyelds.calculus import aggregate
from phyelds.libraries.device import sense
from phyelds.libraries.distances import hops_distance
from phyelds.libraries.spreading import distance_to
from phyelds.webots import AggregateController
@aggregate
def hops_to_source():
return distance_to(sense("source"), hops_distance())
robot = Robot()
aggregate_controller = AggregateController(
robot, hops_to_source, gps="gps", sensors=lambda: {"source": robot.getName() == "source"}
)
while robot.step(int(robot.getBasicTimeStep())) != -1:
hops = aggregate_controller.run_round() # one round per step
See the documentation.
Metadata
Release files for phyelds-webots 8.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| phyelds_webots-8.5.0.tar.gz | 2.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| phyelds_webots-8.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.0 kB
Release files / phyelds_webots-8.5.0.tar.gz
| Download URL | phyelds_webots-8.5.0.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
624ef199fe1ab9cfb6e6e1494e7dc25526676c874701cbb71b72a16930911359
|
|
BLAKE2b-256 checksum How to use checksums |
7e96541be49d1fe40ac18c2f34022d05fd031e8f015b9e5ee791a43e9efc2847
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.0 CPython/3.13.16 Linux/7.0.0-1017-azure
|
Release files / phyelds_webots-8.5.0-py3-none-any.whl
| Download URL | phyelds_webots-8.5.0-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d6271c7288dcc76af7e224ed05b0116f85c0c7c6cb961eb8f8e56c6ba06ca24f
|
|
BLAKE2b-256 checksum How to use checksums |
42bccc3a526e2ed46c14b68b8471377267453ea2b7cd186bdca9c487c9906c14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.0 CPython/3.13.16 Linux/7.0.0-1017-azure
|
Security for phyelds-webots 8.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.