AVA

Adding a mini windows PC as brain

Did you ever thought about adding a mini windows pc as main brain?

Something like this: http://www.amazon.ca/gp/product/B00SCBWF52?colid=3UXW3MI6F982E&coliid=I1VX647IOU5YM1&ref_=wl_it_dp_o_pC_nS_ttl

I’m asking because I’m a c# programmer, and I’m thinking about it, since I would be a lot faster on c# than what I’m on Android

 

What do you thihnk?

re: mini PC

Its worth a try.  I too am prefer C#, but I do ok on Android too.  I have space for another computer on board but I haven’t decided what my long term approach is going to be.  The specs on these newer phones (8 cores at pretty fast clock speeds)…is tempting me to re-write my brain to work mostly on the phone and only call the server for things that need web services and a few other features.  Sharing thousands of memories from one bot to server to another bot and keeping everything synced could be a lot of trouble.

I guess I’ll have to buy one of these little PCs to see how easily they can integrate with everything else on board and what the startup sequence for everything would have to be.   I already have some trouble getting everything else starting up and talking (2 Arduinos, Android, and Server)…the Android is the biggest pain, I have to unplug/replug the USB cable a lot because the Accessory library doesn’t work so well on the Sony on successive startups.  pain.  I’d probably have to put a USB hub in.  Space is getting really tight.

I’m having that problem too!

I’m having that problem too! And that is why I’m always thinking how to just put a full computer on Andar, so I cant forget this issues.

    It would have been soooo much better to just have a plain serial communication in Android instead of the ADK… That’s what most time took me untill now.

Memory

Hi

Can you explain a bit more about how the robots memory works and is stored is the memory cross referenced 

the clues you have offered 18 integers and 4 strings sounds intriguing 

 

Peter

MiniPC option

I am working on a platform that looks like AVA/Anna or Andar, and I have chosen the mini-PC option. Like you, I am a C# programmer. I have looked into 3 solutions :

- Using a Windows Phone : it offers many sensors and a nice computer for a low price. But sadly, the OS is not opened enough, I had to manually start the “brain” app, which is not acceptable.

- Windows 10 IoT on a Raspberry Pie is an interesting approach, but it doesn’t support many hardwares for the moment (2-3 models of webcams are supported for example), but I keep that in mind for later.

- Finally I chose to use a Windows 10 HDMI dongle. For the first tests, I took a low coast Meegopad T02, but I will receive by the end of January a Meegopad T07 (4 cores Cherry Trail CPU + 4 GB RAM). HDMI dongles weight just a few gramms, are tiny and don’t need need too much current. A simple 5V power source of 1-2A does the job.

At the moment, I am still working on the chassis, I will create an entry here on LMR when I will have enough material to share :slight_smile:

Great idea!

I thought abot those 3 options too, and the only drawback of the full computer was teh 12v battery, that would make me redesing everything in Andar.

   The Meegopad would solve that… so I think I’ll buy it. Thanks for the idea! This is the awesome thing of sharing our projects here, we always get helpful ideas!

    Did you tried the Meegopad T02? Is something that small really able to run a c# program without problems? I’m a little afraid of buying it and getting somethinkg that cant really use wifi (as happend to me with RaspberryPi 2 and Windows 10 IoT), or not being able to connect my arduino to the usb port… or those things that are no the standard uses for this small pcs.

Did you made those tests? 

Thanks for your help man!

   Maybe we should try to make a shared code repo, so we can try to make something that can be reused between any robot with the same configuration…

You’re welcome. I hope to

You’re welcome. I hope to share more with you guys soon. Testing all components, building the robot, and documenting all that (in french :wink: takes a lot of time. When the robot will take shape, I’ll make a big post here :slight_smile:

Honestly, I didn’t do many tests yet with the Meegopad T02, I was more focused on the chassis. I have just reinstall Windows 10 and tried it as a classic computer. I have a Windows 8 (now 10) tablet, based on an Atom BayTrail with 2GB ram and it works great to watch movies, surf on the web etc. It runs MS Office suite easily. The Meegopad T02 has the exact same configuration, so I am pretty confident, running C# apps won’t be an issue. Of course, the CPU is not an i5 or i7, but I think it offers some nice possibilities.

As I said, I also ordered the next version of the Meegopad (T07), this one comes with the new Atom CPU (Cherry trail) and 4GB RAM. I would advise to choose this one over the T02, 4GB of RAM is a big upgrade. I ordered mine on the Indiegogo campaign (which is over), but it will be soon available online (banggood…). Initially, I ordered a MagicStick Wave (8GB et Atom X7) but I cancelled (it is expensive and the guys were very unfriendly by mail).

I think (hope) this mini PC will be good enough for the brain. And I am sure new versions with more memory and stronger CPUs will come in the future.

Anyway, you can count on me to share more as soon as I will start testing it :slight_smile:

re: Memories and Indexing

Hi Peter,

I’ve been admiring your work for a long time.  I started printing my own InMoov but got distracted and built Ava instead.  I’ll do my best to answer your question in as simple a way as possible without losing the meaning.

I used to be a data modeller for a lot of fortune 500s among other things…everything we did was in 5th Normal form.  What I am about to share breaks a lot of conventions and has some disadvantages, however there are a great number of advantages.  When you are doing something this big and solo such as i am, looking for ways to save huge chunks of dev time is a huge factor.

The primary table is called “Atom”.  An atom represents a memory.  Every atom has an AtomType which tells you what kind of memory it is.  I’m guessing I have around a hundred different memory types.  All the atom types are also defined and stored as atoms.  Each type has a different meaning for its data columns.  One of the columns for an Atom Type stores the name of the table where that type of memory will be stored.  This means I can split up memories in multiple tables all having the same structure, I only use a few though.

Every atom has a name, around 5 foreign keys to itself (keys to other atoms), a few integer columns, a few varchar columns, and a few housekeeping columns (Source, Truth, ModifiedDate). You don’t know what is stored where until you know what the atom type of a memory is.  All atoms of the same type use the columns in a consistent way.

I have a type called AtomTypeField.  It is a memory that stores the meaning of a field for a given atom type.  Is is able to define a label for the field, whether it is required, and another AtomType to be used as a list of values for a field (if applicable).

While this may sound a bit weird, the end result is I could build a single form (in a day or two) that allowed me to edit any memory, regardless of its structure, and provide labels and dropdown lists where appropriate, and show me all the other memories that use this memory.  This means one form can maintain any of 100 different memory types and growing, as well as all the foreigh keys.  This saves months of work and a myriad of bugs over more conventional methods.

This also means I can dream up new types of memories and create them and get them working in the system in minutes.  I simply go to the UI and create a new AtomType in a form, and create a few AtomTypeFields in a form to define the columns for that new memory type.  So quick, so easy, no coding and no bugs.

Likewise, a single class can handle loading and persistence for all memories. I called it…Atom.  Quick, simple, no bugs.  All code everywhere only has to deal with a single class…Atom, however it does need to know what kind of atom it is and the meaning of its fields.  This is in practice not a big deal, as a given Agent (algo) in the system usually is only dealing with one or a few memory types.

How are things indexed?

This is going to get weird again.  For most of my memory types, my code doesn’t use the database directly.  I use a class I have written called an “AtomList”, that serves as a cache (of all Atoms of a given type) and an index so they can be looked up in the best way for that type of memory, usually by name but sometimes not.  An AtomList basically holds two hybriddictionaries…one for the Atoms (memories) of a given type, and one for an index so the data can be looked up by id, name, or a combo of columns if needed.  The hybriddictionaries are the part of the system being pounded, not the db.

In general, I am caching this much because I do so many memory lookups and iterations for the verbal processing and the logic operations.  Something like “What color is a potato?” results in a lot of memory lookups.  My DB won’t use multiple threads, and eventually I would like to make my brain execute a lot of its major features simultaneously.

I have a “MemoryAgent” that loads up all these AtomLists on startup for all the frequently used memory types.  Each type that I want to load ends up taking one line of code.  Loading up most of the memories ends up taking a few seconds on my PC, but after that and after OpenNLP warms up, everything is zippy.

I still have features that use the database and SQL, they are just not frequently used algos.  I have a “MemorySearch” object that can do just about any search I need.  There is also a facility for caching the results of those searches with a unique key so that repetitive searches can be avoided, which I use in a few cases.

I have a similar mechanism for dealing with web requests or web service requests, as this can be thought of as a unique web URL and parms, resulting in a string of output content.  You can cache this in a hybriddictionary with the URL as a key, stick it in between your code and the web, and avoid a lot of repetitive web requests.  If your bot is going to spend 5 minutes talking about today’s news or weather, it helps not to have to keep retrieving it from a 3rd party, license permitting.

Cheers,

Martin

re: Small PCs

Thank you guys for posting this stuff on the small PCs.  Great stuff.

The way I do things, I really like the 8GB option but that price is crazy.  I’m hoping one of you guys beats me to figuring out how to integrate a PC.

Have you guys figured out how starting up a PC and getting a program to run and talk to the Arduino would work?  What db are you planning to run?

Would you still have a Droid tying up the USB on the Arduino Mega ADK or are you using Bluetooth to talk to the phone?  For me, the USB port is tied up so I’m assuming I need a powered hub.  Is there another way?

No pressure to answer all these questions…if you have time and info though, love to hear.

Regards,

Martin

Hey Martin,I’ll try to

Hey Martin,

I’ll try to answer your questions :slight_smile:

There is a BIOS for Meegopad T02 that activates Auto Power On, so it is not necessary to manually start the mini PC when the robot is turned on. I have planned to connect the MiniPC to the Arduino MEGA with serial (over USB). Bluetooth could be an option, but since a wire is not an issue here, I’ll probably keep with the USB option.

Concerning the database, I haven’t decided yet. But I will probably stay on Microsoft technologies, which leave me with 3 options : SQL Server Express, LocalDB or SQL Server Compact Edition. LocalDB sounds like a good compromise to me. More info here :
http://blogs.msdn.com/b/jerrynixon/archive/2012/02/26/sql-express-v-localdb-v-sql-compact-edition.aspx

SQL Lite is also an option, but I would prefer an SQL Server based solution.

In my setup, I will not use any phone. The mini PC replaces the phone you guys have on Anna/AVA and Andar. Of course I had to had more hardware to compensate the absence of phone : 2 8x8 Leds Matrix for eyes, a bargraph for mouth, a webcam (USB) as a camera and microphone, an audio amplifier and a speaker for sound. And you are right, I will use a powered USB hub. I bought a basic tiny 4 ports USB hub that I have modified to add external power.

I have a blog where I describe all that, and where I have tested all the components I will use in my robot. Sadly, it is in French, I didn’t have time yet to translate and create a post here. I will later :slight_smile: If you’re not afraid of French, my blog is here : http://labo.sitagg.com

Regards

Robot architecture

Hey guys,

    I’m reading a book on Robotic software architecture that is really good. If you didn’t read it already, you migh want to check at it. this is the link to it: https://mitpress.mit.edu/books/introduction-ai-robotics

 

 

Nice blog LordGG

Thanks for answering my questions.

I checked out your blog using Chrome, and with one click…french to english.  I was able to read everything except the diagrams.  I really enjoyed it and learned some good things, thanks for sharing.  I wasn’t aware of the Mega mini.  That is really cool.  That might be exactly what I need soon.

I had the same compass experiences.  Ava broke her neck this week moving too fast…a screw in the SPT200 sheared right off as a result of me using Futaba servos with what I think are Hitec servo horns in the SPT200.  I am ordering more parts to swap out.  I hope to have the neck back online in a few days.

I’m glad Chrome’s

I’m glad Chrome’s translation was good enough to make it understandable :wink:

The Mega Mini was a good surprise, I was looking for small Megas and found those ones. Teensy sounded great too, but not enough i/o and the 3.3V logic voltage was not very convenient.

How did you deal with magnetic interferences between compass and motors ?

Congrats for the last update :slight_smile:

re: Compass

I started with the compass in the back…total fail.  I moved it to the front, right behind the Ava logo.  There is nothing else in that compartment.  There is the Lynxmotion board about an inch away and a sonar to either side, nothing below or above.  All the motors and servos are at least 4 inches away.

 I don’t know how much my compass error is right now, I just know its at least 10 times better than anywhere else I had tried.  She can at least rotate or look on different compass headings now and appears to be reasonably close.

There are some calibration features to help, but haven’t tried them yet.

re: Robot Arch

Thanks for the recommendation…I enjoyed what I could access.  I hope to get and read a copy if I can get past my deadline pressure.

As usual

Hi Martin,

Great update, once again, it is impressive ! Is there a way to make her listen all the time (and avoid hitting the screen) ? Or is it a limitation of the API ? (I guess vocal recognition runs on the phone ?)

re: LordGG

I have seen the topic mentioned of doing “open mic” continuous speech recognition, but whenever I have searched for actual implementations I have been dissappointed.

I have seen people write routines that start listening over and over again to try to achieve the result.  I am skeptical that this would work very well and would seem to have huge bandwidth requirements.

My samsung devices appear to have some “local speech recognition” engines.  This would seem to be a necessary part of any decent solution.

I think some kind of microphone or a simple embedded solution that would recognize a small vocabulary of words, in concert with the phone, might be a workable soultion.  (I have a few boards lying around that are supposed to be able to do it)  If a trigger word (like the robot’ name) or spound is recognized, then the phone could be triggered to listen further…saying “Yes Master?” or some such.  I’m guessing that’s what my Amazon Echo is doing…continuously listening for the word “Alexa”.

I use a remote control with a button on it, so I don’t have to touch the face…in effect, same thing though, a button.

 

Re LordGG

One of the problems of doing continuous “Open Mic” speech recognition is that it becomes a legal can-of-worms which is why you don’t see many applications (either commercial or hobbyist) doing this. Many countries in the EU and also some locations in the U.S. have legal protections in place where this becomes a form of eavesdropping and will get one in legal difficulty quite quickly. So the Open Mic thing is really a much bigger issue than just a technical one. Yes, it may be technically feasible, but really is not a good idea. This is the reason why many phones and (for example) Amazon’s Alexa devices requires you to tap them in order to get them to listen to you.

DB

Great update mtriplett! I

Great update mtriplett! I always look forward to seeing where you take AVA next… :slight_smile: I wasn’t even aware the LattePanda was even available yet! Nice!! Another SBC for my wish list…

DB

AVA
What a wonderful robot. I really am blown away!
Keep up the great work!
P.S. I love how the ears move!
Wayne