Sunday, 12 July 2009

diary from graz

diary from graz. somehow, we didn't manage to post all our experiences from graz into our blog, actually none of them. it was always getting up early in the morning with a lack of sleep, driving to the city hall, hacking our code and getting back late in the evening, thus none of us were in the mood to write an interesting report at 2am. as a cold comfort, we managed to upload at least some pictures that are worth a thousand words. this one week has been awesome for all of us, despite our problems with the nao hardware that had our moods going like a rollercoaster. our journey began on monday at 1am in the early morning, or better... night. i just went home from our robo-lab at the university and, in a hurry, thomas and i picked up some clothes, our laptops and of course three thermos jugs full of coffee. surprisingly, it took us only seven hours to arrive in graz in the morning. so, later at the city hall of graz while waiting at the registration queue, we saw some mates from the robocup german open and had some small talk. when you go to austria you might expect the impressive mountain ranges of the alps, but not in graz. we didn't really feel like we were in austria.

after registration, we were a bit annoyed, because according to our badges and certificates our team had been renamed to 'nao-team hwtk' instead of 'nao-team htwk', so it took us nearly another hour of waiting at the service queue to get our name corrected (on the robocup website they also misspelled our team 'nato-team htwk'... our name isn't that hard to write i thought). later on, we 'opened' our little 'camp' and bootstrapped our hardware. next to us were the team 'kouretes' from the technical university of crete, greece and some members of robo erectus from technology innovation centre of singapore polytechnic, who weren't officially registered.

in the evening at the hotel we watched the simulation league on where our team had an interesting match against the university of pennsylvania, which ended 4:2 for us. the simulation league is quite similar to the real standard platform league. the virtual soccer games also deal with the nao robots from aldebaran and last as long as the robocup, so chances of becoming world champion are good if you manage to grab a good position at the top of the list during the week. all of tuesday we did some programming and tested stuff on our real naos. our new framework, written in good-old c, encapsulates the aldebaran c++ framework into a single shared library with a small subset of interfaces we need. now, debugging and writing code is like heaven - our kernel-like framework was worth all the hard work! things were looking good for us... so far. bring on the test games! a new controller for the simulation league had also been added to robotstadium.

later in the evening at the hotel we wachted the game via live-stream and we realized that something went wrong with the bots. it looked like a missing motion file... sure enough, the next day we found out that a spelling mistake of a file name caused our defeat. things got debugged and updated that day, but luck wasn't with us... we suffered a close defeat at the hands of the team from university of pennsylvania. but the chain of misfourtune continued. within round robin queue 1, pool b our first (rather test-)game was against northern bites from bowdoin college in maine, usa. we had trouble with the nao hardware, so no robot from our side was able to play. one robot had a broken usb-stick (with our firmware on it) and another one took nearly 15 minutes to boot (we suppose due to filesystem check) and went up approx. ten minutes after the final whistle of the first half. bad luck for us. during the second half, we managed to bootstrap at least one of our robots with a new usb-image. after a minute on the field he seemed to crash. his movements repeated in an infinite loop. we were wondering why, because the robots never displayed such strange behaviour and all our code worked fine until that game. so, after our disappointing 0:2 loss, we dove into debugging the code. bug, where are you? hmm... no error and no crash. we really expected something else! during a brief team-meeting, we decided to take the old code from hannover, because debugging more than 10k lines of code within a half day and with a lack of sleep can cause a lot more trouble and surely new bugs, so it was time for our back-up solution. this was a really hard decision for us, because none of us wanted to step backwards, but pragmatically it was the most reasonable decision, because things worked fine at the german open. nevertheless, this crashing-problem had occupied us the whole week. but at this point in time, we've been busy implementing the old nao controller. however, it didn't work on the first try. spoiled by the nice debugging possibilities from our new framework, we needed to fall back into the ugly aldebaran framework and from then on, printf had a renaissance. this was really depressing.

later in the week the problems with our framework were clarified. there was actually no real bug within our code that could have caused the loop. a ssh session timeout made our program quit. because of the fact that we have our own binaries that got executed via ssh terminal (and not via aldebaran module starter) they are child-processes of the terminal, so when a timeout causes a hangup signal of the pseudo terminal, all their child-procs will be cascaded with the SIGHUP.
this was why our strategy got killed while our motion player was still playing the last motion (it's integrated into our encapsulation lib for naoqi). during testing at the university we were logged into our wireless net all the time, so the ssh deamon has had no reason to cause a timeout. in graz on the other hand, only the robots were allowed to use wireless, so unplug the cable and you're done. things got fixed either by using the command line tool nohup or by overwriting the SIGHUP action handler. it's very annoying that such a silly mistake occupied us for so long.

on thursday we had two games scheduled. the first, rather considered as a test game against the eagle knights from laboratorio de robotica, division de ingenieria, from itam in mexico and the second game, which decided who remained in the challenge, against team cerberus from the department of computer engineering, from bogazici university in turkey. somehow, the bad luck from the days before followed us. two of our three naos have been in repair (defects with the head: mainboard/cpu problems and the other one with a broken ethernet interface), so only one player should decide our progress.

as was expected, our player had problems with booting. this time the naoqi framework from aldebaran went up fine, but the ssh server didn't start, so we had no terminal connection to our player. the game ended with a 0:0 and a coin flip brought us a 1:0 win. pressed for time we copied the disk images from our keeper onto a usb stick and prepared him for the match, because we got one nao head back from repair a few minutes before our game against cerberus. we used the break between these two games to implement the new, faster and more reliable image segmentation from our new framework into the old controller, which worked without too many errors. when the game started our color calibration didn't work well, so the player detected balls where there actually were no balls and always went out of bounds.

luckily, time ran out without any goals for either side, altough cerberus got all three players playing. so then our mission was to prepare for penalty shooting at 8pm. after hours of programming things didn't look so bad, but during penalty shooting, again... no luck. temperatures of the servos went up during training, but normalized after a few minutes on break. somehow, the right foot pitch broke during penalty shooting causing our robot to fall while trying to walk towards the ball. finally, we lost 0:2 and after it all we were worn out. really, it's not an understatement to say that we've experienced murphy's law to it's fullest extent!
we took the rest of the evening off and watched the simulation game at the hotel. after one win and one loss we needed to win this game - again against the university of pennsylvania who headed up the list. after uploading some improved motions we were able to walk with a top
speed of 1.4km/h. a concise victory brought us up to the 1st place (together with pennsylvania) again. the game itself resulted in 3:3 and after a (from our side.. untested) penalty shooting we scored with 5:3. our goalie stopped all five of the opponent's tries!

back to the real naos... even if everything went wrong, the worst would've been to give up! so we were heading towards the technical challenge! we even skipped the banquet in order to prepare and program our nao. at this point in time we were able to switch back to our new framework and things went far more comfortable.
the technical challenge is divided into three parts: the anyball challenge, the passing challenge and the localization challenge. the aim is to improve quality for the real gameplay. in the anyball challenge a nao has to recognize as many balls of different sizes, colors, and structures as possible. points can be gathered by shooting them at least one meter. a ball that lands within the goal scores extra credits. the challenge began... team one and team two didn't recognize any of the balls, so zero points. afterwards, b-human was up... their nao walked to the first ball, paused for a moment and, instead of shooting, he decided to walk to the next ball... again, same procedure, and in the end, no credit. team humboldt from the humboldt university of berlin shot two balls. the rest of the teams didn't earn much points. we won this challenge with a
big difference in points by shooting three balls, we even got one into the goal! we were happy! in the passing challenge two robots have to pass a ball from side to side. not a single team managed to pull this off. at least b-human won the localization challenge where a single robot has to walk to three coordinates on the field only through recognition of their local position by getting information from the camera image. together with b-human we won the technical challenge! yippie! we were so happy about that. at least this worked out for us!

back to the simulation league on robotstadium... after the game on thursday, which looked more like a rugby game, we decided to change the arm stiffness so that both players do not tilt anymore. this was a smart move, because our robots stopped falling down on collision (only our opponents went to the ground). so, the final match on friday went fine for us with a 7:1 win against the university of pennsylvania! wow, again, 1st place!

as already mentioned at the beginning, this week was awesome despite so many ups and downs. we were able to take a unique experience back with us to germany (along with a nice trophy)! we've already mapped out new plans and new ideas for the next german open and luckily there's a lot more time to prepare for this than we've had in the past.


No comments:

Post a Comment