Skip to main content

A gymnasium environment for pushany.

Project description

Install Anypush

pip install anypush

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.9.tar.gz (17.1 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.9-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gym_pushany-0.1.9.tar.gz
  • Upload date:
  • Size: 17.1 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.9.tar.gz
Algorithm Hash digest
SHA256 779f604ff13e47593db38941b509a47c74538ea51b91a69802ea5bdca3f66892
MD5 0d8be117d3b38127638d53a24d7e6420
BLAKE2b-256 6bd2a9288dee6b6d71c83e787a382a66c7c9bf2628d710eec4bf34ce69b2b626

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gym_pushany-0.1.9-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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 8f8e255c017a08834c67202c251e73de8f5ff3cca1b5d74d0fb27c5f982f7218
MD5 30d08f1cfd2d7bba564f6b29116f14a9
BLAKE2b-256 ac315184590b44df40ee01dd83a878267e96c4d6acdfd23842f42780c631ebdd

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