xchoo / spaun2.0

Spaun (nengo 2.0 version)
61 stars 27 forks source link

How to configure this code to get the result like the video on Youtube #7

Open ghost opened 7 years ago

ghost commented 7 years ago

Hi, I'm successfully run this code and get the result with string.

I've read the code and found the input is the def_str and the out_put will display on my console.

Could I implement the result that the input is provided by 'eye' and the output can be written by 'arm' like the video on Youtube? If so, how can I configure it and what hardware device should I use?

Thank you!

xchoo commented 7 years ago

Hi there,

Unfortunately, the video found on youtube was produced in the old version of Nengo (v1.4), and that code hasn't been fully ported over to the Spaun2.0. You can get a similar display output using the --showanim option in the console command line.

As for your question, both the "eye" and the "arm" in the video you describe are 100% simulated on the computer. There was unfortunately, no interaction between the Spaun codebase and external hardware.

xchoo commented 7 years ago

I should note that it would not be too difficult to interface hardware to Spaun. Hooking up a camera to provide the stimulus input would require modifying the Stimulus module, and hooking up a physical arm to would require modifying the Motor module. I am currently working (in the experimental branch) on refactoring the code to make such integration easier and more flexible (although, work is slow due as I am currently working on finishing my PhD thesis)

ghost commented 7 years ago

Thank you for your reply!

xchoo commented 7 years ago

Not a problem! 😄

ghost commented 7 years ago

Hi,

I ran the code as what you says, but an error occurs.

The error says,

ImportError: No module named matplotlib_animation.matplotlib_anim in /_spaun/animation/nengo_anim.py.

I googled this package but not found one. There is a similar package named 'matplotlib.animation' but it failed.

So, where can I find this package.

Thanks!

xchoo commented 7 years ago

Oh! Sorry. I forgot to mention that you need to clone this repo: https://github.com/xchoo/matplotlib_animation and put it in your spaun2.0 root directory. So it should look like this:

spaun2.0/
+- _spaun/
+- data/
+- matplotlib_animation/

Note: You can do this as well:

cd spaun2.0
git clone https://github.com/xchoo/matplotlib_animation

to get the right directory structure.

ghost commented 7 years ago

👌I'll try it! Thank you!

发自网易邮箱大师 On 05/31/2017 01:43, xchoo wrote:

Oh! Sorry. I forgot to mention that you need to clone this repo: https://github.com/xchoo/matplotlib_animation and put it in your spaun2.0 root directory. So it should look like this:

spaun2.0 +- _spaun +- data +- matplotlib_animation

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.