Skip to main content

Robotics Environment Authoring Framework (REAF)

The Robotics Environment Authoring Framework (REAF) simplifies creating environments that adhere to the GDM Robotics Environment interface.

How to install

reaf can be installed from PyPI using pip:

pip install reaf

Directory Structure

Currently, the directory structure is designed as standalone subdirectories with a well-defined dependency graph.

reaf
├── core: Core libraries and interfaces for REAF.
├── testing: General tooling for testing REAF interfaces and environments.
├── common: Libraries with shared functionality across setups and platforms.

Design

REAF is a framework designed to simplify the creation of robotics environments. It adopts a layered architecture to promote modularity and reusability. The core components of a REAF environment are:

  1. Environment: The top-level interface for interacting with the environment, conforming to the GDM Robotics Environment interface. It handles stepping, resetting, and action/observation specs.
  2. Task Layer: Responsible for defining the task itself, including reward calculation, termination conditions, features generation, and commands processing.
  3. Device Layer: Interfaces with the physical or simulated robotic setup, managing commands to actuators and retrieving measurements from sensors.
  4. Adapters: Bridge the gap between the abstract GDMR interfaces and the specific requirements of the Task Layer. These adapters translate agent actions into Task Layer commands and Task Layer features into agent observations.
  5. Reset and End of Episode Handlers: Support customized behavior during environment resets and episode termination.

Environment

The Environment class serves as the primary interface for interacting with the robotic environment. It coordinates the interactions between the Task Layer and Device Layer, manages the environment's state, and handles stepping through the environment. Key functionalities include:

  • reset_with_options(): Resets the environment to a new initial state based on the provided options. This involves resetting the Device Layer, computing initial features and observations.
  • step(): Advances the environment by one step. This method takes an agent action, processes it into commands, steps the Device Layer, computes features, reward, discount, termination conditions, and new observations, and returns a TimeStep object containing this information.
  • action_spec(): Returns the specification for valid agent actions. This is determined by the ActionSpaceAdapter.
  • timestep_spec(): Returns the specification for the TimeStep objects returned by step() and reset().
  • Logging: Facilitates adding and removing loggers to monitor internal operations.

Task Layer

The Task Layer defines the logic and rules governing the robotic task. It comprises several core components:

  • FeaturesProducer: Generates additional features based on existing features and measurements from the Device Layer. Each producer has a produced_features_spec() defining the features it generates and required_features_keys() indicating the features it depends on.
  • CommandsProcessor: Modifies commands before they are sent to the Device Layer. Processors can transform, filter, or augment commands. The consumed_commands_spec() describes the commands accepted by the processor, and produced_commands_keys() defines the output commands.
  • RewardProvider: Calculates the reward signal based on the current features. It exposes a reward_spec() defining the structure of the reward.
  • TerminationChecker: Determines whether the episode should terminate based on features and returns a TerminationResult indicating the type of termination.
  • DiscountProvider: Computes the discount factor based on features and the termination state.
  • FeaturesObserver: Passive components that observe features without modifying them. This is useful for logging or analysis.
  • Logger: Records measurements, features, and commands during environment interactions. Methods like record_measurements(), record_features(), and record_commands_processing() are called at specific points in the environment's lifecycle.

The Task Layer also provides methods to:

  • compute_all_features(): Computes all features based on measurements from the Device Layer and the output of FeaturesProducers.
  • compute_final_commands(): Processes the policy's commands using the CommandsProcessors and outputs the Device Layer command.
  • compute_reward(): Calculates the reward using the RewardProvider.
  • check_for_termination(): Checks termination conditions using TerminationCheckers.
  • compute_discount(): Computes the discount using the DiscountProvider.
  • validate_spec(): Verifies the consistency of the specs across the Task Layer and Device Layer.

Device Layer

The Device Layer serves as the bridge between the REAF environment and the robotic hardware. It's responsible for sending commands to the robot and receiving measurements from sensors. The Device Layer is built around:

  • Device: Represents a single hardware component (e.g., robot arm, camera). It provides methods like set_commands() and get_measurements() for interacting with the hardware.
  • DeviceCoordinator: Manages a collection of Device objects, coordinating their actions and data exchange. It provides lifecycle management through start() and stop() methods and synchronization points through before_set_commands() and before_get_measurements().

The Device Layer's key functions are:

  • begin_stepping(): Initializes the Device Layer and returns the initial measurements.
  • step(): Sends commands to the devices, retrieves new measurements, and returns them.
  • end_stepping(): Performs cleanup operations at the end of an episode.
  • commands_spec(): Returns the specification for valid commands. The user is expected to pass the full command dictionary.
  • measurements_spec(): Returns the specification for the measurements returned by get_measurements().

Adapters

REAF utilizes adapters to translate between the generic agent interface and the specific format required by the Task Layer.

  • ActionSpaceAdapter: Converts the agent's actions into a commands dictionary understood by the Task Layer.
  • ObservationSpaceAdapter: Transforms the features generated by the Task Layer into observations suitable for the agent.

Reset and End of Episode Handler

  • EnvironmentReset: Defines the reset behavior of the environment, including a do_reset() method and a default reset configuration. The reset is a complex step and very hard to predict how this will be written. The intention is to leave complete control to the user so they can pass whatever object is needed to the reset without any restrictions. The user can use this to check that everything is working properly, reset the state of any features producers, etc...
  • EndOfEpisodeHandler: Provides a callback function, on_end_of_episode_stepping(), that is invoked at the end of each episode after the last step. This is useful for logging, cleanup, or custom logic that needs to be executed when an episode ends.

Licence and Disclaimer

Copyright 2026 Google LLC

All software is licensed under the Apache License, Version 2.0 (Apache 2.0); you may not use this file except in compliance with the Apache 2.0 license. You may obtain a copy of the Apache 2.0 license at: https://www.apache.org/licenses/LICENSE-2.0

All other materials are licensed under the Creative Commons Attribution 4.0 International License (CC-BY). You may obtain a copy of the CC-BY license at: https://creativecommons.org/licenses/by/4.0/legalcode

Unless required by applicable law or agreed to in writing, all software and materials distributed here under the Apache 2.0 or CC-BY licenses are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the licenses for the specific language governing permissions and limitations under those licenses.

This is not an official Google product.

Metadata

Release files for reaf 1.1.1

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

Built distributions (wheels)

Table of built distributions (wheels) for reaf 1.1.1
File
reaf-1.1.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
reaf-1.1.1-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.14 CPython 3.14 Linux glibc 2.26+ ARM64, Linux glibc 2.28+ ARM64 Details
reaf-1.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
reaf-1.1.1-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.26+ ARM64, Linux glibc 2.28+ ARM64 Details
reaf-1.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
reaf-1.1.1-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.26+ ARM64, Linux glibc 2.28+ ARM64 Details
reaf-1.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
reaf-1.1.1-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.26+ ARM64, Linux glibc 2.28+ ARM64 Details
reaf-1.1.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
reaf-1.1.1-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.10 CPython 3.10 Linux glibc 2.26+ ARM64, Linux glibc 2.28+ ARM64 Details

Total release size: 5.9 MB

Release files / reaf-1.1.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL reaf-1.1.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 603.0 kB
Tags CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
287b2e1176aee51e22d998bb736b2d6dd1be50c47d355edaf4e0ff6c37b70e72
BLAKE2b-256 checksum
How to use checksums
135d182ecce7f5fd22d7eb60ef6c6c9af55cb57abc2f415b50e55a384fd8a34c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.2.0 CPython/3.11.2

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by Google Cloud, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / reaf-1.1.1-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL reaf-1.1.1-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 577.6 kB
Tags CPython 3.14 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
08af30e0e6e978d90a145bedbd5f9c36c9d03b35ef792313fc89959e2cee0d81
BLAKE2b-256 checksum
How to use checksums
79cdfd71f6f8252690dda8691a4f698f930585ebadccedce87e64cdbbd5a3806
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.2.0 CPython/3.11.2

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by Google Cloud, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / reaf-1.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL reaf-1.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 602.8 kB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
b807b1775a177ee9e56f1ba9cb108a69979376a12940e2586eea68e86eaa8c1a
BLAKE2b-256 checksum
How to use checksums
608d44c7a1ee8d4c4fed6d6e49cfe9aab4362fd881ad57613299f8b66456205f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.2.0 CPython/3.11.2

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by Google Cloud, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / reaf-1.1.1-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL reaf-1.1.1-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 576.9 kB
Tags CPython 3.13 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
581949689df8428cde9ac11d599a4a41df5d71c0d5350b5fa7205b7a463820eb
BLAKE2b-256 checksum
How to use checksums
b4a490b93f67f6ea5bbc1688dceabf1183da1145a8035234f41cfc2638a2ceb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.2.0 CPython/3.11.2

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by Google Cloud, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / reaf-1.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL reaf-1.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 602.8 kB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
d1b1379eb0badad276d7d38b062f78034dc017dad82e12ec5d1acca99f98e913
BLAKE2b-256 checksum
How to use checksums
ac4f9e1e071c76094062819b1a317cb74637c6fbd29038e0ba11a931fa31dfd3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.2.0 CPython/3.11.2

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by Google Cloud, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / reaf-1.1.1-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL reaf-1.1.1-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 576.9 kB
Tags CPython 3.12 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
2cc68d9bbaa07b12be6bc773bf7550cd6f6731a7051eebcd17d63cae04b723ba
BLAKE2b-256 checksum
How to use checksums
b1e9d8a71aae1caee9d1ea5e573a04096a005a2ea5ee9f7645a05b9dff49e7c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.2.0 CPython/3.11.2

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by Google Cloud, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / reaf-1.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL reaf-1.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 601.7 kB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
4bc8a0f1072258fd685fffa1fffd6119b8a35671b087df2aeccf1110894085cc
BLAKE2b-256 checksum
How to use checksums
e89b7a363362557e619a3be117ae4c459e966b39f025bf058af92db5b90d8781
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.2.0 CPython/3.11.2

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by Google Cloud, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / reaf-1.1.1-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL reaf-1.1.1-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 576.5 kB
Tags CPython 3.11 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
50ad5e6355ae416c409d28e33971a065bc761ae85c5c9268755886fa440aa519
BLAKE2b-256 checksum
How to use checksums
f9ab3c508bdbdd4ce021209c5820d80219b20eccb03d9dd4d9548a44b5eafce3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.2.0 CPython/3.11.2

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by Google Cloud, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / reaf-1.1.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL reaf-1.1.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 601.1 kB
Tags CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
59f2fd411efd95d4fa8c9237d91ad38db2b1a14db7feed88701ff46dbbb4185b
BLAKE2b-256 checksum
How to use checksums
07b21343649890902e03438ddff38ca31ba74634d7e2f01d3768990ccd458117
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.2.0 CPython/3.11.2

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by Google Cloud, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / reaf-1.1.1-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL reaf-1.1.1-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 575.5 kB
Tags CPython 3.10 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
b057c6e9cbfbd51b65d47f24123e752eaa8c05227e59803f4a46d010a35fb500
BLAKE2b-256 checksum
How to use checksums
4a15e48587e21507ef08a1f46bde32d2f86a11b25e636b8bdfab35f57e9f22ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.2.0 CPython/3.11.2

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by Google Cloud, verified by PyPI on Oct 2, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.1 This release

10 release files

1.0.0

5 release files

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