Skip to main content

A gymnasium environment for pushany.

Project description

Install Anypush

pip install gym-pushany

Example

import gymnasium as gym
import gym_pushany

# OBJECT_NAME_LIST = [
#     't',
#     '0',
#     '1',
#     '2',
#     '3',
#     '4',
#     '5',
#     '6',
#     '7',
#     '8',
#     '9',
#     'ellipse',
#     'rectangle',
#     'reg3',
#     'reg4',
#     'reg5',
#     'reg6',
#     'reg7',
#     'reg8',
#     'reg9',
#     'reg10'
# ]

object_name = 'ellipse'  
use_obstacles = True     
env = gym.make("pushany/PushAny-v0", object_name=object_name, use_obstacles=use_obstacles)
observation, info = env.reset()

for _ in range(1000):
    action = env.action_space.sample()
    observation, reward, terminated, truncated, info = env.step(action)
    image = env.render()

    print(f'terminated: {terminated}, truncated: {truncated}')
    if terminated or truncated:
        observation, info = env.reset()

env.close()

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_pushany-0.1.12.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

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

gym_pushany-0.1.12-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

File details

Details for the file gym_pushany-0.1.12.tar.gz.

File metadata

  • Download URL: gym_pushany-0.1.12.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for gym_pushany-0.1.12.tar.gz
Algorithm Hash digest
SHA256 a2dd61e08a91226898fbea5bec99d2c44ac50052eafddb85c2309cbd8ad1fb8a
MD5 93f7122b17ea715e6e6396cb7baea9aa
BLAKE2b-256 67f42a80974bf3d15ae213ac807fbf0b8d4efb7331f08a776b3ca77893365eff

See more details on using hashes here.

File details

Details for the file gym_pushany-0.1.12-py3-none-any.whl.

File metadata

  • Download URL: gym_pushany-0.1.12-py3-none-any.whl
  • Upload date:
  • Size: 20.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for gym_pushany-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 e7a3db79b5fdb9179d82a1540bbd8b32464f830cdf588587d8eadd9cdfcdab3b
MD5 ba61657e17de741c10ed48f55668c096
BLAKE2b-256 3cc33cd6e0390995d47e44eea1b48a90c9916b5263592289ed43db6b6b49d9fc

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