Skip to main content

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.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for phyelds-webots 8.2.0
File Size Uploaded Provenance
phyelds_webots-8.2.0.tar.gz 2.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for phyelds-webots 8.2.0
File Interpreter ABI Platform
phyelds_webots-8.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.2 kB

Release files / phyelds_webots-8.2.0.tar.gz

Download URL phyelds_webots-8.2.0.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
18d6f7743019287ef5dd90a274d07761cb49846f1b72d2a2cc781c52ffb3a05e
BLAKE2b-256 checksum
How to use checksums
451fa57c9b78d50d0cbd18ac53176b24fc28bf6f494c6475a08c108f96a3964c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.13.16 Linux/6.17.0-1022-azure

Release files / phyelds_webots-8.2.0-py3-none-any.whl

Download URL phyelds_webots-8.2.0-py3-none-any.whl
Size 3.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e59b7d54c23ec05e9426cdf5f5a63ec74efecb35ccbe7a5c8be17e8e56194d18
BLAKE2b-256 checksum
How to use checksums
ea1e0c63b8d2fd145bb8101ff91faf3119799c1786b59409e712e1f2e88c6e26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.13.16 Linux/6.17.0-1022-azure

Security for phyelds-webots 8.2.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page