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.0.22.tar.gz (18.6 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.0.22-py3-none-any.whl (22.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gym_pushany-0.0.22.tar.gz
  • Upload date:
  • Size: 18.6 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.0.22.tar.gz
Algorithm Hash digest
SHA256 b27d1777944f5c8df66c68351544d102e2690591c4ac1fb1025ded52fddaf7fd
MD5 5e1fdcc0f2c38ea03993478bfaa3ef92
BLAKE2b-256 eeb13b94f7595773e137efe1a9c92a3ba9d80047a85edc30c21e687c5844e02d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gym_pushany-0.0.22-py3-none-any.whl
  • Upload date:
  • Size: 22.3 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.0.22-py3-none-any.whl
Algorithm Hash digest
SHA256 bc4e14c7fab8e773081aef126a0a5f7e53c192bcc6666bd378729a0a58450221
MD5 719abe49a21268ff93b7d8fbeed459ba
BLAKE2b-256 267d8ecfca45af8fb6729a69dfe9dc6ed30c64212c54b576e944ac8b2ea875c9

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