Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gym_drake_lca-0.0.8.tar.gz (2.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gym_drake_lca-0.0.8-py3-none-any.whl (2.4 MB view details)

Uploaded Python 3

File details

Details for the file gym_drake_lca-0.0.8.tar.gz.

File metadata

  • Download URL: gym_drake_lca-0.0.8.tar.gz
  • Upload date:
  • Size: 2.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.4

File hashes

Hashes for gym_drake_lca-0.0.8.tar.gz
Algorithm Hash digest
SHA256 c0d4088432f6c51f851e34ae1756bb6de54247d557b4f3c4319d8019a9f3f8d8
MD5 210e09444d628dd23f53771e59f8f0d4
BLAKE2b-256 e1b4f0e831ecf9878b8242d3f70daf533b2b6dd0add7fb367c7c63f3da5b9c29

See more details on using hashes here.

File details

Details for the file gym_drake_lca-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: gym_drake_lca-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 2.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.4

File hashes

Hashes for gym_drake_lca-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 0e4108422e8b95aed5030a5d62790c3772e300186980ec483a3bd71a0f1f5627
MD5 5ee1a7deb9ed9bfa76c213239f111282
BLAKE2b-256 3701248c1057e4776d419be05d9566fd69a4b6aca67e61d1383f70c70470e4cd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page