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.3.tar.gz (17.0 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.3-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gym_pushany-0.1.3.tar.gz
  • Upload date:
  • Size: 17.0 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.3.tar.gz
Algorithm Hash digest
SHA256 5def85480a4c206768c4c76b9c68ee4d842582cd481f19fa0be9065b79ad99dd
MD5 af468d653b657cb692fa37a2e9a83873
BLAKE2b-256 b55976145d69a05bd463c6b337fe87ee85b989af9af2a49949ea60cb81253902

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gym_pushany-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 20.5 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 af1554be734bfac8c47d5a64b6f8068dadb4d79e85b919919675b85f197a371f
MD5 c28f8f5a5d9d0f3ec976e20e6c718471
BLAKE2b-256 6835ce7a3b48de55823a768974421725fc0396a417ea9b205ac0894a5cfdb10a

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