Skip to content

Commit

Permalink
Simple camera observation example
Browse files Browse the repository at this point in the history
  • Loading branch information
cnheider committed Feb 13, 2018
1 parent abf3fd2 commit d29dd62
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Neodroid.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: Neodroid
Version: 20180213130628
Version: 20180213150504
Summary: Neodroid interface
Home-page: https://github.com/sintefneodroid/neo
Author: Christian Heider Nielsen
Expand Down
2 changes: 1 addition & 1 deletion Neodroid.egg-info/dependency_links.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/google/flatbuffers/tarball/master#egg=flatbuffers-20180212162815
https://github.com/sintefneodroid/flatbuffers/tarball/master#egg=flatbuffers-20180212162815
2 changes: 1 addition & 1 deletion Neodroid.egg-info/requires.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pyzmq
numpy
flatbuffers==20180212162815
flatbuffers>=20180212162815
Pillow

[GUI]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This project is very similar to Unity's own project [Unity Machine Learning Agen

## Installation
```bash
pip3 install -U neodroid
pip3 install -U neodroid --process-dependency-links
```

## Usage
Expand Down
10 changes: 5 additions & 5 deletions examples/minimal/image_observation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
from PIL import Image
import matplotlib.pyplot as plt

env = neogym.make('camera_observation', connect_to_running=False)

env = neogym.make('camera_observation', connect_to_running=True)
while True:
obs, rew, term, info = env.step(0)
print(obs)
#im = info.observer('ColorCamera')
im = env.sensor('ColorCamera').observation_value
#im.seek(0)
#im = Image.open(im)
#plt.imshow(im)
#plt.show()
im = Image.open(im)
plt.imshow(im)
plt.show()
Git LFS file not shown
Git LFS file not shown
4 changes: 2 additions & 2 deletions neodroid/environments/camera_observation_Data/data.unity3d
Git LFS file not shown
Git LFS file not shown
4 changes: 2 additions & 2 deletions neodroid/environments/grid_world_Data/Managed/FlatBuffers.dll
Git LFS file not shown
4 changes: 2 additions & 2 deletions neodroid/environments/grid_world_Data/data.unity3d
Git LFS file not shown
7 changes: 3 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ def version():
# Publications using datetime versions should only be made from master
# to represent the HEAD moving forward.
version = datetime.datetime.utcnow().strftime('%Y%m%d%H%M%S')
print("VERSION environment variable not set, using datetime instead: {}"
.format(version))
print(f'VERSION environment variable not set, using datetime instead: {version}')

return version

Expand All @@ -52,9 +51,9 @@ def version():
url='https://github.com/sintefneodroid/neo',
install_requires=['pyzmq',
'numpy',
'flatbuffers==20180212162815', #version()
'flatbuffers>=20180212162815', #version()
'Pillow'],
dependency_links=['https://github.com/google/flatbuffers/tarball/master#egg=flatbuffers-20180212162815'], #version()
dependency_links=['https://github.com/sintefneodroid/flatbuffers/tarball/master#egg=flatbuffers-20180212162815'], #version()
extras_require={
'GUI': ['kivy']
}
Expand Down

0 comments on commit d29dd62

Please sign in to comment.