Revolve2: Physics simulation abstraction layer.
Project description
Revolve2
Revolve2 is a collection of Python packages used for researching evolutionary algorithms and modular robotics. Its primary features are a modular robot framework, an abstraction layer around physics simulators, and evolutionary algorithms.
Documentation: ci-group.github.io/revolve2
Installation: ci-group.github.io/revolve2/installation
Get help: github.com/ci-group/revolve2/discussions/categories/ask-for-help
Sample
Here we create and simulate a modular robot, and then calculate how far it moved over the xy plane. This is a shortened version of examples/evaluate_single_robot.
# (...) Omitted preamble
# Create a modular robot.
body = modular_robots_v1.gecko_v1()
brain = BrainCpgNetworkNeighborRandom(body=body, rng=rng)
robot = ModularRobot(body, brain)
# Create a scene.
scene = ModularRobotScene(terrain=terrains.flat())
scene.add_robot(robot)
# Create a simulator.
simulator = LocalSimulator(headless=False)
# Simulate the scene and obtain states sampled during the simulation.
scene_states = simulate_scenes(
simulator=simulator,
batch_parameters=make_standard_batch_parameters(),
scenes=scene,
)
# Get the state at the beginning and end of the simulation.
scene_state_begin = scene_states[0]
scene_state_end = scene_states[-1]
# Retrieve the states of the modular robot.
robot_state_begin = scene_state_begin.get_modular_robot_simulation_state(robot)
robot_state_end = scene_state_end.get_modular_robot_simulation_state(robot)
# Calculate the xy displacement of the robot.
xy_displacement = fitness_functions.xy_displacement(
robot_state_begin, robot_state_end
)
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 revolve2_simulation-1.2.4-py3-none-any.whl.
File metadata
- Download URL: revolve2_simulation-1.2.4-py3-none-any.whl
- Upload date:
- Size: 28.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d969f6c5bb585e43521df00f7f472631756b33a7acf378fd669fcc18025de971
|
|
| MD5 |
5f1f9ff78676691d721f38681f03d78f
|
|
| BLAKE2b-256 |
03850fadb077e0c594256432590782370ab6f40f1ced3d7e4ed61e72feb3c2b9
|
Provenance
The following attestation bundles were made for revolve2_simulation-1.2.4-py3-none-any.whl:
Publisher:
main.yml on ci-group/revolve2
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
revolve2_simulation-1.2.4-py3-none-any.whl -
Subject digest:
d969f6c5bb585e43521df00f7f472631756b33a7acf378fd669fcc18025de971 - Sigstore transparency entry: 174616451
- Sigstore integration time:
-
Permalink:
ci-group/revolve2@8156a66624f96c43cdfcec05bbb366cc492b87e0 -
Branch / Tag:
refs/tags/1.2.4 - Owner: https://github.com/ci-group
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yml@8156a66624f96c43cdfcec05bbb366cc492b87e0 -
Trigger Event:
push
-
Statement type: