2

Author Topic: Reasoning Robot  (Read 5550 times)

0 Members and 1 Guest are viewing this topic.

Offline CommanderbobTopic starter

  • Robot Overlord
  • ****
  • Posts: 146
  • Helpful? 2
  • Embeddedmicro.com
Re: Reasoning Robot
« Reply #30 on: June 15, 2009, 09:01:35 PM »
Well I got my Serial to USB converter from Amazon for $15.25, I wanted one that I knew would work with Linux. I also just got libfann to work with the gumstix and ran the first program on it, sadly the battery died so I have to wait for it to charge.

Thanks for all the suggestions! The current problem I have is how many angles should I take measurements at? I have the ultrasonic and IR sensors mounted on a HS-50 servo, which is fairly fast. I need a good trade off of scan points and speed. Does anyone have experience with this? I think the standard would be 5, full left, 45 left, forward, 45 right, full right.

Justin

Offline CommanderbobTopic starter

  • Robot Overlord
  • ****
  • Posts: 146
  • Helpful? 2
  • Embeddedmicro.com
Re: Reasoning Robot
« Reply #31 on: June 16, 2009, 04:19:07 PM »
 >:( Another set back...

The regulator in the ESC does not have the power needed to power the robostix/gumstix/netstix/wifi configuration (the wifi pushes over the limit). Whenever the wifi is in moderate use the gumstix resets. The ESC also gets pretty toasty just running the gumstix, not even the motors (stupid linear regulators). I ordered a switching BEC with 10A rating.

Offline moteutsch

  • Beginner
  • *
  • Posts: 2
  • Helpful? 0
Re: Reasoning Robot
« Reply #32 on: June 21, 2009, 04:25:48 AM »
If you want the robot to really "think" and "learn" you should look into neural networks. A good introductory tutorial can be found at http://www.ai-junkie.com/ann/evolved/nnt1.html.

Regards,
- Moshe

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,132
  • Helpful? 109
Re: Reasoning Robot
« Reply #33 on: June 21, 2009, 09:43:56 AM »
If you want more RAM then I've just bought some of these http://yhst-27389313707334.stores.yahoo.net/micaad.html which look pretty cool. Add a 4Gb micro SD card for a few bucks and you have 4Gb of RAM via an SPI interface. Will let you know how I get on - once they arrive from the USA
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline CommanderbobTopic starter

  • Robot Overlord
  • ****
  • Posts: 146
  • Helpful? 2
  • Embeddedmicro.com
Re: Reasoning Robot
« Reply #34 on: June 21, 2009, 01:26:41 PM »
If you want the robot to really "think" and "learn" you should look into neural networks. A good introductory tutorial can be found at http://www.ai-junkie.com/ann/evolved/nnt1.html.

Regards,
- Moshe


You must of not read the thread. libfann is "Library for Fast Artificial Neural Networks". That is what I am using.

If you want more RAM then I've just bought some of these http://yhst-27389313707334.stores.yahoo.net/micaad.html which look pretty cool. Add a 4Gb micro SD card for a few bucks and you have 4Gb of RAM via an SPI interface. Will let you know how I get on - once they arrive from the USA


I think you mean Flash not RAM. MicroSD cards use flash memory. Also the gumstix already has a microSD slot on it.

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,132
  • Helpful? 109
Re: Reasoning Robot
« Reply #35 on: June 21, 2009, 01:52:00 PM »
If you want more RAM then I've just bought some of these http://yhst-27389313707334.stores.yahoo.net/micaad.html which look pretty cool. Add a 4Gb micro SD card for a few bucks and you have 4Gb of RAM via an SPI interface. Will let you know how I get on - once they arrive from the USA


I think you mean Flash not RAM. MicroSD cards use flash memory. Also the gumstix already has a microSD slot on it.

Yes - I know all of that but thank-you for the lesson. ;D Of course by mentioning that it requires an SPI interface then I'd assumed everyone would realise that its not ordinary RAM in the mcu address space
 But the only difference between RAM and Flash is that one is persistent and the other isn't, and one is more complex/slower to access than the other. But at the end of the day its still a persistent memory - hard drive or call it what you will. 
Just thought that if you ONLY need more memory for storing maps/etc then this board may be smaller and need less power than a whole gumstix board.

So glad I took the time to give a comment  but good luck
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline CommanderbobTopic starter

  • Robot Overlord
  • ****
  • Posts: 146
  • Helpful? 2
  • Embeddedmicro.com
Re: Reasoning Robot
« Reply #36 on: June 21, 2009, 09:35:55 PM »
I see what you were saying, thanks for the suggestion.

I think speed/RAM is more a problem than Flash. Training and running a neural network takes a decent amount of power. Also you need to run Linux to use libfann, of course you could try to write your own that would fit in an AVR, but why reinvent the wheel?

Offline paulstreats

  • Supreme Robot
  • *****
  • Posts: 1,381
  • Helpful? 21
Re: Reasoning Robot
« Reply #37 on: June 23, 2009, 04:31:20 AM »
Just to add my experience with SRAM and a low level microcontroller (meaning without integrated memory support).
I have a 32 mb sram ic running on a board with a pic18f. the sram needs 32 I/O lines in order to use it (24 for addressing and 8 for data) as well as 1 for write enable. most low level microcontrollers dont have this amount of I/O available. especially not just for ram.

to get around this, i used 2 I/O expansion IC's. the expansion IC's use an I2C interface so the microcontroller sends I2C commands to the port expanders in order to control the SRAM IC. I2C isnt the fastest protocol in the world, and think about having to send 32 commands through I2C just to provide a read/write operation on 1 byte....

In short, SRAM might be faster but unless you have integrated support and and plenty of spare I/O you might find its actually slower than flash solutions.

(also you have to create a software storage architecture for reading/writing aswell as creating a small adressing system (mine means that 8bytes have to be read/written before the data byte can be accessed). Plus create an address stack to manage locations and free space)......

Its a lot more involved than it at first seems.

say we have a byte stored in a variable on the microcontroller. we want to transfer this into external ram so we transfer it to address FF2. now when we want to retrieve that byte of data, how does the microcontroller know where to get that byte from? if we keep the address stored in another variable then all thats happened is that weve freed up 1 byte from the microcontroller but used up 3 bytes in order to reference it.

Thats why a lot of thought has to go into creating an addressing system at the beginning of the external ram so it can store its own references

Offline CommanderbobTopic starter

  • Robot Overlord
  • ****
  • Posts: 146
  • Helpful? 2
  • Embeddedmicro.com
Re: Reasoning Robot
« Reply #38 on: November 21, 2009, 07:04:27 PM »
If anyone is still interested I started working on this project again, except now I'm doing it for school so I'll be forcred to work on it  ;).

I am using libfann on the gumstix. So far I did some test code and it works fine on the gumstix. For anyone who wants it, I attached the bitbake file so you can use it in your projects.

Right now my code is very basic, it sets up a timer so the accelerometer is read 200 times per second. The latest 50 measurements are stored in an array. If the first two are 50 apart (5/8ths of a g) then it is considered a collision and the red LED on the gumstix is flashed.

Other than that it's not doing much else at the moment, it does create a log file on a microSD card.

Tomorrow I plan on writing a better collision detection function. Any suggestions on how to detect a sudden drop in data that only a collision would cause?

Offline CommanderbobTopic starter

  • Robot Overlord
  • ****
  • Posts: 146
  • Helpful? 2
  • Embeddedmicro.com
Re: Reasoning Robot
« Reply #39 on: December 19, 2009, 02:03:49 PM »
UPDATE: I now have the ultrasonic sensor scanning about once a second. It takes three measurement (-45, 0, 45 degree positions). The data collected is fed into the ANN which outputs two numbers, one for the motor, the other for the turning servos. For now the motor is not powered, but I can push the car around and it turns itself.

It is not learning yet, but I added some sample data that the ANN is trained off of just to test how well it will work. It surprisingly works really well with just 5 sample sets of data.

Do you think that three measurements with the ultrasonic sensor are enough to detect most objects? Has anyone had any experience with with? I was originally going to use 5 (-90 -45 0 45 90) but it took too long.

 


Get Your Ad Here