From d29dd625be31f7c20b0c1189204505b7e08ef148 Mon Sep 17 00:00:00 2001 From: Christian Heider Nielsen Date: Tue, 13 Feb 2018 22:24:42 +0100 Subject: [PATCH] Simple camera observation example --- Neodroid.egg-info/PKG-INFO | 2 +- Neodroid.egg-info/dependency_links.txt | 2 +- Neodroid.egg-info/requires.txt | 2 +- README.md | 2 +- examples/minimal/image_observation.py | 10 +++++----- .../Managed/Assembly-CSharp.dll | 2 +- .../camera_observation_Data/Managed/FlatBuffers.dll | 4 ++-- .../environments/camera_observation_Data/data.unity3d | 4 ++-- .../grid_world_Data/Managed/Assembly-CSharp.dll | 2 +- .../grid_world_Data/Managed/FlatBuffers.dll | 4 ++-- neodroid/environments/grid_world_Data/data.unity3d | 4 ++-- setup.py | 7 +++---- 12 files changed, 22 insertions(+), 23 deletions(-) diff --git a/Neodroid.egg-info/PKG-INFO b/Neodroid.egg-info/PKG-INFO index e6abc59b..b5b0e784 100644 --- a/Neodroid.egg-info/PKG-INFO +++ b/Neodroid.egg-info/PKG-INFO @@ -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 diff --git a/Neodroid.egg-info/dependency_links.txt b/Neodroid.egg-info/dependency_links.txt index e8d7b741..fe7b3b9f 100644 --- a/Neodroid.egg-info/dependency_links.txt +++ b/Neodroid.egg-info/dependency_links.txt @@ -1 +1 @@ -https://github.com/google/flatbuffers/tarball/master#egg=flatbuffers-20180212162815 +https://github.com/sintefneodroid/flatbuffers/tarball/master#egg=flatbuffers-20180212162815 diff --git a/Neodroid.egg-info/requires.txt b/Neodroid.egg-info/requires.txt index 3a312e23..df89133a 100644 --- a/Neodroid.egg-info/requires.txt +++ b/Neodroid.egg-info/requires.txt @@ -1,6 +1,6 @@ pyzmq numpy -flatbuffers==20180212162815 +flatbuffers>=20180212162815 Pillow [GUI] diff --git a/README.md b/README.md index b73ee620..2080cdf9 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/examples/minimal/image_observation.py b/examples/minimal/image_observation.py index 28caab69..997c7847 100644 --- a/examples/minimal/image_observation.py +++ b/examples/minimal/image_observation.py @@ -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() \ No newline at end of file + im = Image.open(im) + plt.imshow(im) + plt.show() \ No newline at end of file diff --git a/neodroid/environments/camera_observation_Data/Managed/Assembly-CSharp.dll b/neodroid/environments/camera_observation_Data/Managed/Assembly-CSharp.dll index df12484d..45211a92 100644 --- a/neodroid/environments/camera_observation_Data/Managed/Assembly-CSharp.dll +++ b/neodroid/environments/camera_observation_Data/Managed/Assembly-CSharp.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1c2e5ce3e905598ce08732daad60304b890207a0ae26329d9f5cd029afde67f0 +oid sha256:18a07918b27fc5f9058d2ad2931987b39e9b2285597fe5e5782255c56895a5f3 size 289792 diff --git a/neodroid/environments/camera_observation_Data/Managed/FlatBuffers.dll b/neodroid/environments/camera_observation_Data/Managed/FlatBuffers.dll index fa23f9b8..1b5da8d4 100644 --- a/neodroid/environments/camera_observation_Data/Managed/FlatBuffers.dll +++ b/neodroid/environments/camera_observation_Data/Managed/FlatBuffers.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6db1bbfe2238b3438d2059101c1492d137770525c93d430838bb245974cdbb4f -size 16896 +oid sha256:95dea3c4c6451cce2915629a56a248e5c9d7e6bc6c709b4d6e35ce9289af59f6 +size 15360 diff --git a/neodroid/environments/camera_observation_Data/data.unity3d b/neodroid/environments/camera_observation_Data/data.unity3d index c9077599..958c271a 100644 --- a/neodroid/environments/camera_observation_Data/data.unity3d +++ b/neodroid/environments/camera_observation_Data/data.unity3d @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3d321aecb977c704add7cf115bc02577cf5a997889a8ce462643243b41086058 -size 670376 +oid sha256:76e72bc2f11a396fc4b3ef16b013fd247ca79b284371357990be7cbb326a41f0 +size 567952 diff --git a/neodroid/environments/grid_world_Data/Managed/Assembly-CSharp.dll b/neodroid/environments/grid_world_Data/Managed/Assembly-CSharp.dll index 86e43bc2..34e707ba 100644 --- a/neodroid/environments/grid_world_Data/Managed/Assembly-CSharp.dll +++ b/neodroid/environments/grid_world_Data/Managed/Assembly-CSharp.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:facfd517240a3ed53e888f80a093899f6fd1bae35e73a0cf58c8f5697ac376c9 +oid sha256:8e8a6a14d440197dea5377addb86c4117a0386f1940c36e2c8e51aa5dd84a564 size 289792 diff --git a/neodroid/environments/grid_world_Data/Managed/FlatBuffers.dll b/neodroid/environments/grid_world_Data/Managed/FlatBuffers.dll index fa23f9b8..a95eea62 100644 --- a/neodroid/environments/grid_world_Data/Managed/FlatBuffers.dll +++ b/neodroid/environments/grid_world_Data/Managed/FlatBuffers.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6db1bbfe2238b3438d2059101c1492d137770525c93d430838bb245974cdbb4f -size 16896 +oid sha256:3767efbf73cf8efaf9212586b154d65d47d108b5fc154d19fb9a355d3a96864c +size 15360 diff --git a/neodroid/environments/grid_world_Data/data.unity3d b/neodroid/environments/grid_world_Data/data.unity3d index 681cb14e..815630c7 100644 --- a/neodroid/environments/grid_world_Data/data.unity3d +++ b/neodroid/environments/grid_world_Data/data.unity3d @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:554b0371c3022b669a18aa51057f772582f141fa7d751b74164d0c5038524065 -size 683993 +oid sha256:1fbe2cded21e5e762ccf0aaf6f0e376ec63afc9fdb4e19a4bf000efc2edd1733 +size 566969 diff --git a/setup.py b/setup.py index 039ac910..f6b403ad 100644 --- a/setup.py +++ b/setup.py @@ -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 @@ -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'] }