Wednesday, November 17, 2010

Sunday, May 23, 2010

Thursday, November 12, 2009

Demo or Die

Two days before tomorrow
Yesterday night when I arrived home it was almost 23 o'clock. It had been a busy and tiring day. I and Jorrit worked on the CyberRobot until 22 in the evening and then we were kicked out because the building was going to close.

When I looked back at the day I saw that despite all the obstacles and things which didn't work, we were succeeded to make our first Demo.

In the morning I bought the new LinkSys N+ wireless router. A wireless accesspoint is needed so the MacMini in the CyberRobot can connect to. Once in the office, I began to install. Although I have installed many wireless access points for myself, friends and families, but this one would not work. I was almost 3 hours busy with it and the result was negative. Later that day Johan, another colleague working on Webchair, appeared too. In no time, the office was in a real chaos! There was almost no room to sit and have the lunch.


Above: Chaos in the Room

It was about 5 o'clock when things began to work. The router started to work magically without doing anything and I finally could find why the serial ports couldn't be opened. The FTDI drivers should be loaded first by a shell script. I still have to find a way to automize it. I gotta learn unix/linux and shell scripting.

until about 22 o'clock I and Jorrit were busy trail and erroring and preparing things for tomorrow for the big day. We then had to leave the building.


The presentation and demonstration

In the morning I prepared a power point presentaion and then left for the Hage. My dear teacher Ans Sarianamual was also going to come too. When she arrived, I introduced her to Jorrit and then I went further preparing the MIEP and the walls.

Graham was in Germany in the last few days and he was on his way for the demonstration from Berlin. At 14.30 everything was setup and Graham, Christina, Ans and Jorrit were there. I have to admit that I was very stressed and nervrous. I started the presentation and explained them what I had done in the time I was there and what my results and perspectives were.


Above: Yosuf at his presentation

After the presentation, it was time for demonstration. I and Jorrit started what we had prepared and the show was started.
Jorrit was filming and here are some parts of the demo:







At presentation, everyone was quiet, but when the demo started, almost everyone was shouting. I and Jorrit were very happy that they liked it and most important of all that the CyberRobot was doing how it had to work.


Above: the CyberRobot with his big bro, from the older generation


I should say that the demostration would have not been possible without the hard work of Jorrit who built the Robot. Also Nicolo, another colleague from the HKU, is supposed to make one, but it still has to come.


Above: Jorrit building the CyberRobot

Tuesday, November 3, 2009

Yeahhhhhhhhhhh

After weeks of research and trail & error I was finally able to control a Robot through the Skype. In fact it is nothing but pressing the arrow keys on the keyboard to go left, right, backward or forward, but the difference is that this CyberRobot has the ability to be controlled from anywhere in the world if it is connected to the internet!

The great thing about using Skype as a communication meduim is that I as a programmer do not have to worry about opening different ports to let my program work. The other advantages using Skype is that it is free, it runs on many platform and makes audio visual communication possible.

So how does this thing work in general?

The CyberRobot is equipped with a MacMini or a MiniMac, whatever you call it, an Arduino board with a motor control(H-bridge), two 12V motors on each side, a 12V battery, a converter which converts the 12V to 19V for the MacMini and a Logitech 1.3MP wide zoom auto focus camera.

The Arduino board has an Atmel chip inside. I have programmed it in a way that it sends some characters as identification if a serial communication is available. Then it listens to serial and acts accordingly.

The MacMini runs on OSX and Skype is running simultaneously. The interface I have programmed is called the CyberRobot. It detects the Skype and the Arduino board and then waits for a call. When a call is received it creates a stream and then begins listening.

On the other side, a program called RobotDriver detects the skype first and then waits for an outgoing call. When the call is in progress, it tries to create a stream. So this is the same stream the CyberRobot program tries to create. If there are no further errors, the stream is being created and texts or telegrams can be sent and received through this stream.

It is now on the RobotDriver to send characters to the otherside which is then being sent to the arduino board. They are the characters of protocol to control the robot.

At the background Skype opens a video stream, so where ever the robot goes, you can follow and see. The realtime aspect of this system depends on the internet connection. The faster the internet connection, the quicker the data is transferred and the shorter the realtime protocol.

This is in short how the stuff works. In the next articles, some more information will be added regarding RFID and how it is being used to update the position.


Above: a screenshot of the presentation

Monday, October 26, 2009

The Gang goes to Zollverein in Essen

On the way

It was 6.30 in the morning when we gathered in Schiedam Centrum to leave for Essen. Although it was very early, but it seemed that everybody was awake in the early dark of 14th November. As we moved the roads were getting busier and it was getting brighter. I with Jorit, Annelies, Danielle and Jolien were in my car. Graham, Christina, Niek, Nicolo, Clara, Marte and Rick were in other cars leaving respectively from the Hague and Utrecht.

During the drive in the Netherlands some were seeing the sun coming up and others were getting a nap.


Above: Annelies getting a nap.

Once I entered Germany I pushed the gas pedal to the bottom. In a few seconds 210 km/h was reached. The other four were watching the KM meter quietly and stressful. Although the top was not reached, I reduced the speed to 180 to avoid panic.

At 8.30 we were at Essen. We were earlier than planned, so we went to cash some money and then we went to a bakery



Above: Just finished with the breakfast.


At Zollverein
At 10.00 we were at Zollverein, the famouse industerial place in Essen. The first look was amazing. It could be seen from far away.




Above: The very well known Zollverein Tower of the coal production

After visiting Anja and Jens we all sat around the table and begun brainstorming about the whole projects and different aspects in different groups. I was with Annelies Nocolo, Jorrit, Graham and partly Christina.

Above: The kick off meeting table where we were all gathered and were brainstorming in groups.


Sunday, October 4, 2009

The CyberRobot plugin

"When there is a CyberCity with robots, these robots should be called the CyberRobots."

The Main part of my traineeship assignment is the plugin to be developed in java to communicate with the CyberRobot(CR) through Skype. There is already an application called the CamControl which also communicates through Skype and is written in java, but it is like a mix of long spaghetti ropes where the beginning or the end cannnot be found. This plugin works acutally very well and stable, but it can't control the CR. It is written by Tim. He has written this for the Webchair. A meeting was arranged with him so I could get some explanations. We finally met on a friday afternoon and he begun to look at his own code. It was a while ago since he had developed it and obviosely he had to look, search and think on many things. The meeting finished and I still had no idea of how and where. Maybe because it was friday late? ;)

The next time I sat behind my desk, I began destroying the spaghetti in anyway I could. It definitly helped me to find where it begins. On the other hand I found a very useful example which made some parts clear.

I have now begun to develop my own code with the help of the two examples I have. There are no good documentation on the Skype4Java API so that is also most of the times try and catch ;). But there is some progress. The main things acheived until now are:

- detect skype on mac safely (very unstable and thread unsafe)
- listen for a call (both incoming and outgoing)
- listen to the call status change
- distinguish friends or non-friends (in skype it's possible to call even someone not on your list)
- automatically answer if the caller is a friend or reject if not a friend

It seems that skype4java works very stable and easy on windows os. On Mac OSX it doesn't do the same thing expected. So every step should be tested and tried on both OSs.

The next step will be to create a handshake and a stream. The handshake will be used for confimation and the stream will be the the canal through which the application will control the CR(CyberRobot).

Here is where the CR's home

The Arduino Mega

It has been a while since my last blog update. It has been busy days working on the code development. In this periode I have mainly worked on two things: the Arduino Mega and CyberRobot plugin. CyberRobot plugin will be discussed in a separate subject.

Arduino Mega(AM) is an open source board developed by a company in Italy. This board will be used on the Robot to control the drive motors via an H-bridge. It has an Atmega microprocessor, PWM output, Digitial output and Analog input onboard. But the most useful thing about AM is that it is equipped with FTDI chip which makes the direct usb input possible. Otherwise a usb-serial converter should be used.


Above: the AM. Click to enlarge.

An Arduino Alpha program is developed by some programmers which users can directly code in java and compile and upload their program in AM. So that is also a plus point for me, although the main language for programming such boards and chips is assembly and C.

In an our I managed to install the whole thing and write my very first "Hello World" proggy and upload it on the AM. The Next step was to manage the communication between the pc and the AM, so I could use the communication for later purposes. The next day I could write a little program for AM to confirm a handshake. The handshake is very important because the AM should be recognized automatically by program. What is does now is that it sends a message to the device which tries to connect. With the help of that message the program on the device can decide wether to attach to AM or not.

The next step was to manage and play with some leds on AM. Because if the leds can be controlled, the same signal can be used later to control the drive Motors via H-bridge.

Also a little proggy is developed in java to work in the PC to recognize and attach to the AM. It goes through all available ports and waits for the handshake. When the handshake is received the program remains attach to that port.


Above: The proggy developed in java to control the AM. Click to enlarge.
Down: AM attached to my PC. Click to enlarge.