A Gym implementation of the Low Cost Arm (LCA) in the Drake simulator.
Project description
gym-drake-lca
A gym environment for Low-Cost Robot Arm in Drake.
Installation
Create a virtual environment with Python 3.10 and activate it, e.g. with miniconda:
conda create -y -n gym-drake-lca python=3.10 && conda activate gym-drake-lca
Install gym-drake-lca:
pip install gym-drake-lca
Quickstart
# example.py
import imageio
import gymnasium as gym
import numpy as np
import gym_drake_lca
env = gym.make("LiftCube-v0")
observation, info = env.reset()
frames = []
N = 100
for i in range(N):
env.reset()
action = env.action_space.sample()
observation, reward, terminated, truncated, info = env.step(action)
image = env.render()
frames.append(image)
if terminated or truncated:
observation, info = env.reset()
env.close()
imageio.mimsave("example.mp4", np.stack(frames), fps=25)
Contribute
Instead of using pip directly, we use poetry for development purposes to easily track our dependencies.
If you don't have it already, follow the instructions to install it.
Install the project with dev dependencies:
poetry install --all-extras
Follow our style
# install pre-commit hooks
pre-commit install
# apply style and linter checks on staged files
pre-commit
Acknowledgment
These instrutions are adapted from gym-aloha This project is adapted from gym-lowcostrobot
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 gym_drake_lca-0.0.3.tar.gz.
File metadata
- Download URL: gym_drake_lca-0.0.3.tar.gz
- Upload date:
- Size: 1.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd61934b6873cb34695ac8e0c839ade6d5ede19e97e596b3d12d55e7847eb97c
|
|
| MD5 |
adba647061fe732ff5ee435912d857ef
|
|
| BLAKE2b-256 |
3ed2dff7f42442c0fe545968de7e3852f432430dd10ec7bfdc94e4b304a47084
|
File details
Details for the file gym_drake_lca-0.0.3-py3-none-any.whl.
File metadata
- Download URL: gym_drake_lca-0.0.3-py3-none-any.whl
- Upload date:
- Size: 1.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3bf05d00446d6ddc12899c3244db53813c6cd152a0de8ea5637d5b85079142b1
|
|
| MD5 |
83b2cc7197252948db7aeced91289fad
|
|
| BLAKE2b-256 |
eb8d8b9b13c5f03a961fc41ccd7ae3d137cffbe415a9032d9553d2349eac69fc
|