No project description provided
Project description
Droid Environment / Data Adaptor for UniEnv
This repository contains the implementation of the adaptor that connects the Droid environment and dataset to the UniEnv interface.
To install the adaptor, you can simply install this package from PyPI:
pip install unienv-droid[dataset,env]
You can specify the features that you want to install through the optional dependencies. For example, if you only want to install the dataset related code, you can do:
pip install unienv-droid[dataset]
Usage of Droid Environment Wrapper
from unienv_droid import DroidEnv
from droid.robot_env import RobotEnv as DroidRobotEnv
# Create the underlying Droid RobotEnv
robotenv = DroidRobotEnv()
# Create the DroidEnv wrapper
env = DroidEnv(robotenv)
# Now you can use the env as a standard UniEnv environment
ctx, obs, info = env.reset()
while True:
action = env.sample_action()
ctx, obs, reward, terminated, truncated, info = env.step(action)
if terminated or truncated:
break
Usage of Droid Raw Data to retrieve depth
Please be aware of a bug in the SVO reading code that may cause the last few frames of the SVO recording to be noise when you only read a subset of frames in an episode. This is caused by a bug in the PyZed SDK and there's really nothing we can do about it.
First download the raw dataset
gsutil -m cp -r gs://gresearch/robotics/droid_raw/v1.0.1 <path_to_target_dir>
Then download the additional updated annotations for droid from huggingface, and unzip it and place it in <path_to_annotation_dir>.
from unienv_droid_data.raw import RawDroidDataset
import numpy as np
path_to_target_dir = "<path_to_target_dir>" # Replace with the path where you downloaded the droid raw data
path_to_annotation_dir = "<path_to_annotation_dir>" # Replace with the path where you placed the droid annotations
dataset = RawDroidDataset(
root_dir=path_to_target_dir,
droid_annotations_path=path_to_annotation_dir,
target_resolution=sl.Resolution(672, 376),
success_only=True, # Only load successful episodes
read_right=False # Whether to read additional right camera images from the stereo camera
)
# Access dataset properties
print("Raw dataset length:", len(dataset))
print("Raw dataset space:", dataset.single_space)
print("Metadata space:", dataset.single_metadata_space)
# Access data
first_step_data = dataset[0]
# Access slices of data
first_ten_steps = dataset[:10]
# Access data through indexes
indexed_data = dataset[np.array([0, 5, 10, 15])]
# Access data and metadata
first_step_data, first_step_metadata = dataset.get_at_with_metadata(0)
# Access slice of data and metadata
first_ten_steps_data, first_ten_steps_metadata = dataset.get_at_with_metadata(slice(10))
# Access trajectory (trajectory doesn't support slices)
print("Trajectory length:", dataset.trajectory_length)
first_trajectory_data = dataset.get_trajectory_at(0)
first_trajectory_data, first_trajectory_metadata = dataset.get_trajectory_at_with_metadata(0)
Note that for the resolution we picked the VGA resolution, instead you can pick any resolution supported by ZED. See Zed SDK Documentation for complete list of supported resolutions.
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 Distribution
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 unienv_droid-0.0.1a3.tar.gz.
File metadata
- Download URL: unienv_droid-0.0.1a3.tar.gz
- Upload date:
- Size: 18.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd4b48096ce9199d5b2ca5b1817df5e744ae3b9cf12377d2a5b6feb10a87ba46
|
|
| MD5 |
dee4e1757af380b541f6fb77fb462c7c
|
|
| BLAKE2b-256 |
1c353f7e79d15cad451f47e1cbecdc050deebc4805e50df82c49f35a00fbe03e
|
Provenance
The following attestation bundles were made for unienv_droid-0.0.1a3.tar.gz:
Publisher:
python-publish.yml on UniEnvOrg/DroidAdaptor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
unienv_droid-0.0.1a3.tar.gz -
Subject digest:
bd4b48096ce9199d5b2ca5b1817df5e744ae3b9cf12377d2a5b6feb10a87ba46 - Sigstore transparency entry: 1462911474
- Sigstore integration time:
-
Permalink:
UniEnvOrg/DroidAdaptor@b6e91350bf89c8dabd9f237e28a6c6c9f6abe9e7 -
Branch / Tag:
refs/tags/0.0.1a3 - Owner: https://github.com/UniEnvOrg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@b6e91350bf89c8dabd9f237e28a6c6c9f6abe9e7 -
Trigger Event:
release
-
Statement type:
File details
Details for the file unienv_droid-0.0.1a3-py3-none-any.whl.
File metadata
- Download URL: unienv_droid-0.0.1a3-py3-none-any.whl
- Upload date:
- Size: 19.0 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 |
736e6fa7ea0ffed70cfd6d6c4363f72092d2762e8e05e511019f3ddf60d16fe1
|
|
| MD5 |
4fdc721c8e95636061c232c2a6216e8f
|
|
| BLAKE2b-256 |
c54f8bd91ec976b08ff1bb6230368edafb4227720eba442e5a0e1ee26e9f2569
|
Provenance
The following attestation bundles were made for unienv_droid-0.0.1a3-py3-none-any.whl:
Publisher:
python-publish.yml on UniEnvOrg/DroidAdaptor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
unienv_droid-0.0.1a3-py3-none-any.whl -
Subject digest:
736e6fa7ea0ffed70cfd6d6c4363f72092d2762e8e05e511019f3ddf60d16fe1 - Sigstore transparency entry: 1462911492
- Sigstore integration time:
-
Permalink:
UniEnvOrg/DroidAdaptor@b6e91350bf89c8dabd9f237e28a6c6c9f6abe9e7 -
Branch / Tag:
refs/tags/0.0.1a3 - Owner: https://github.com/UniEnvOrg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@b6e91350bf89c8dabd9f237e28a6c6c9f6abe9e7 -
Trigger Event:
release
-
Statement type: