среда, 30 июня 2010 г.

Coupling Parallax Robot with iPaq – Part 2

You can read Part 1 here

So, I was able to successfully create a C# application for WinMo5 which reads input from BoeBot and can send data back to the robot. On the BoeBot I uploaded a program which reads data from IR sensors, reports it back to the COM port and wait for instructions where to go to.

The program on the iPaq has a built-in web server which allows me to connect to the application via WiFi and to read data from BoeBot, there is also a text field which can be used to send instructions back to the robot. So, for instance, via WiFi I can send a message to go forward and then receive on the web page values from IR sensors. It’s like a remote control via WiFi via built into the robot webserver.

I’ll post my current source code later.

пятница, 18 июня 2010 г.

Coupling Parallax Robot with iPaq

Recently I started a project of coupling parallax Boe bot robot with ipaq rx1950. Initially I thought it can’t be done since my Boe Bot only have a serial port, but then I found that rx1950 actually has a serial port and I can assemble a connector for this.

You might ask “why do I bother?” – the thing is that I always had a thought of implementing my science work in the university in the real life. It is a neural network which is being trained and programmed by a genetic algorithm. Basically this simulates how homo-sapience and other animals with abilities to collect knowledge evolved through the generations, but with computer you can speedup this process for a neural networks to a few minutes (it depends on the size of the network though).

PBasic that Parallax has in their robots and in controllers is quite modern and quite good language, but it won’t do what I need to implement for the whole thing. Plus, hardware restrictions won’t allow me to collect data for several thousands of virtual “species” (individual configurations of the neural network). That’s why I quickly realized that with BoeBot I can only create an “animal” with the “brain” (neural network), in order to train this thing I have to use external tools. I.E. I could select best fit for the brain, switch boebot on and program it to collect some performance data for the selected brain sample, then I can use collected data on a PC to optimize values. But this process will be very very time-consuming and not scalable and not flexible enough.

So, then I realized that I could use ipaq and connect it directly to the robot. Then I decided to proceed with 2 phases

- Phase I – a program on the iPaq will collect data from robot’s sensors and return back commands for actuators (motors). The program will include neural network and GA (genetic algorithm which will adjust the network).

- Pase II – a program will collect data about robot’s sensors and will train network which resides on the robot itself. So, even if ipaq is switched off, the “animal” will live, it just won’t evolve.

I thought I can use Linux on the iPaq (I already tried to port it and it worked quite well even with the wifi – send me a message if you want to know how, I know that it’s hard for the rx1950), but then I decided that it will be very unstable and again not flexible – it’s hard to compile for embedded Linux (I just never had enough time to learn how to do this). So I decided to go with WinMo5. VS2005+WinMo5SDK are very good development tools I should say, it was very easy to create ComPort application with C# and .Net Compact Framework.

Now I need to put everything together. I’ll let you know what I make.

P.S. iPaq rx1950 pinout for serial port:

http://www.gomadic.com/comipseradca.html

http://pinouts.ru/PDA/ipaq_22p_pinout.shtml