Small standalone tabletop blocks-world simulator.
Project description
SHRDLU World
Small standalone tabletop blocks-world simulator. It can run as a Python object, a headless HTTP service, or a browser viewer for manual control.
Install
pip install shrdlu-world
For local development:
cd ~/shrdlu-block-world
python -m pip install -e .
Run
# Browser viewer at http://127.0.0.1:18123/
shrdlu-simulator
# Equivalent module entrypoint
python3 -m shrdlu_blocks.simulator
# API only
shrdlu-simulator --headless
# Equivalent module entrypoint
python3 -m shrdlu_blocks.simulator --headless
Useful options:
--host HOST--port PORT--open-browser
Interface
Running python3 -m shrdlu_blocks.simulator starts a small browser UI for
manual control of the scene.
The viewer includes:
- a central canvas showing the current blocks-world scene
SelectandMovemodes for interacting with objects in the canvas- zoom controls and a reset button in the top bar
- direct
xandyinputs formove_grasper - buttons for
raise_grasper,lower_grasper,open_grasper, andclose_grasper - an object list for selecting the active object
- highlight and unhighlight controls for the selected object
- an event log showing recent actions and simulator responses
This UI is served from the same HTTP server as the JSON API, so the browser viewer and programmatic API stay in sync.
Python API
from shrdlu_blocks import ShrdluBlocksEnv
env = ShrdluBlocksEnv()
env.execute_action({"name": "move_grasper", "args": {"x": -0.1, "y": 0.4}})
env.execute_action({"name": "lower_grasper", "args": {}})
print(env.snapshot_text())
HTTP API
GET /api/statePOST /api/actionPOST /api/reset
POST /api/action expects an action object:
{
"action": {
"name": "move_grasper",
"args": {"x": -0.1, "y": 0.4}
}
}
Supported action names:
move_grasperwithxandylower_grasperraise_grasperclose_grasperopen_grasperhighlight_objectunhighlight_object
Configuration
export SHRDLU_SIMULATOR_HOST=0.0.0.0
export SHRDLU_SIMULATOR_PORT=18123
export SHRDLU_WEB_OPEN_BROWSER=1
For remote use, forward the viewer port and open http://localhost:18123:
ssh -L 18123:localhost:18123 user@remote-host
Layout
shrdlu_blocks/simulator/: environment, controller, scene model, and HTTP servershrdlu_blocks/viewer/: browser viewer and static assetsshrdlu_blocks/client.py: small HTTP client for a running service
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file shrdlu_world-0.1.2.tar.gz.
File metadata
- Download URL: shrdlu_world-0.1.2.tar.gz
- Upload date:
- Size: 29.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48b435082427b79ec55a5912906b0b8a270fb15f9f3fd6a16402de6a396f2ed6
|
|
| MD5 |
9475a8508d31b7d5076ca1e2781932b6
|
|
| BLAKE2b-256 |
e204449b80b12393110fcb3fa2f14e170a9fd94184c2d93bf2c6f7e8136d3344
|
Provenance
The following attestation bundles were made for shrdlu_world-0.1.2.tar.gz:
Publisher:
release.yml on cat-claws/shrdlu-world
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shrdlu_world-0.1.2.tar.gz -
Subject digest:
48b435082427b79ec55a5912906b0b8a270fb15f9f3fd6a16402de6a396f2ed6 - Sigstore transparency entry: 2002503588
- Sigstore integration time:
-
Permalink:
cat-claws/shrdlu-world@b6109befdee20d2a86cce29396a6e2dd92d8a1cd -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/cat-claws
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b6109befdee20d2a86cce29396a6e2dd92d8a1cd -
Trigger Event:
push
-
Statement type:
File details
Details for the file shrdlu_world-0.1.2-py3-none-any.whl.
File metadata
- Download URL: shrdlu_world-0.1.2-py3-none-any.whl
- Upload date:
- Size: 34.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7aa8b2f523af7c72d0a666d54f9e7a8328b38be03a6b2c97534bd4edcf03bce8
|
|
| MD5 |
afbda4570d7b98d6f3b6d443d8fec3dd
|
|
| BLAKE2b-256 |
09ae4f2f687030c1256c28bda65a97ce6b23e4972f01eb12392a337af6c215d0
|
Provenance
The following attestation bundles were made for shrdlu_world-0.1.2-py3-none-any.whl:
Publisher:
release.yml on cat-claws/shrdlu-world
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shrdlu_world-0.1.2-py3-none-any.whl -
Subject digest:
7aa8b2f523af7c72d0a666d54f9e7a8328b38be03a6b2c97534bd4edcf03bce8 - Sigstore transparency entry: 2002503679
- Sigstore integration time:
-
Permalink:
cat-claws/shrdlu-world@b6109befdee20d2a86cce29396a6e2dd92d8a1cd -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/cat-claws
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b6109befdee20d2a86cce29396a6e2dd92d8a1cd -
Trigger Event:
push
-
Statement type: