Experience participating in RobotChallenge 2014

And in this article, I would like to talk about our experience of participation and to reveal the details of our approach to solving the problem. The format of the competition is very similar to the Olympics, because There is a whole set of different disciplines and the participant can choose the one that is most interesting to him. The disciplines themselves are relatively simple with tasks, and as a rule, the task is that it is necessary to complete the task faster than others. We participated in the AirRace discipline, the idea of which is that the robot should completely fly around 2 columns along the trajectory in the form of a figure “eight” in a completely autonomous mode. The winner is the robot that in 10 minutes flies in a continuous flight more than all the “eights”.
Before this competition, I had only experience in participating in the competition of flying robots of the KROK company, which took place in August 2013 in Moscow. In those competitions, we failed in the form of rain on the flight deck. Despite the fact that on test flights we performed the task faster than the organizers, during a real flight the visual odometry of the robot “went blind” on puddles and on black wet asphalt and we could not even fly through the maze. Below is our test attempt at CROC competitions in 2013.
In Vienna, the weather was much better (+20 and clear sky). The competition was held indoors, so we were no longer afraid of weather vagaries.
Due to the limited budget and time, it was decided to use the same robot in Vienna competitions and the same approach as in CROC competitions.
We were based on a bunch of AR.Drone + ground station in the form of a laptop. This choice (even in the period of preparation for CROC) was due to the fact that AR.Drone, in essence, already knows how to fly out of the box and there are SDKs with which we could control it via Wi-Fi. True, already having experience with it, I am inclined to believe that it is necessary to assemble another quadrocopter and strive to implement all the calculations on board. In fact, I have 3 complaints about AR.Drone. This is Wi-Fi, hardware expansion issues, and closed source. Actually, we managed to expand the hardware of our AR.Drone by connecting additional ultrasonic rangefinders to it through an Arduino Nano board connected via on-board USB. Schematically, it looks as follows.

We used these rangefinders only at the CROC competition for orientation in the maze, and at the competitions in Vienna, the main hack of AR.Drone was that we turned the front camera down and orientated ourselves along it.
On a laptop, all our software was based on the ROS framework. The advantages of using it are quite a lot, in my opinion the main thing is the ability to test the code on a virtual model in the Gazebo physical simulation environment. In fact, the transition from a virtual model to a real one occurs without any alterations to the code (only a few settings for the parameters of the regulators and the computer vision system). The ability to simulate not only allows you to create a working code without a real drone, but also allows you to check the code changes in the field before it is used on a real quadrocopter.
As for the discipline of Air Race, the rules there are quite democratic. They allow you to use any additional navigation marks (both passive and active) inside the field. The only limitation is that the robot must fly around the pillars in the "eight", and it is purely conditional and should not touch the walls, pillars and floor. A number of teams actively used this. For example, a team from Poland used an additional robot that travels down a dashed line, and a quadrocopter flies behind this robot. Last year they took first place, and in this they were let down by reliability and they could not fly a single lap. Some teams installed additional visual markers for orientation, and a team from Canada generally installed 2 kinekts inside, but they also didn’t succeed.
We decided not to use anything extra on the field, but to orient ourselves strictly along the dotted line drawn on the floor. Accordingly, the key functions of the control system were based on the principles of computer vision. The main idea was as follows:
- We are looking for black rectangles in the image
- We divide them into groups according to their angle of inclination to the vertical.
- We assign to the first group those rectangles that are most vertical.
- Draw a line through the centers of the rectangles of the first group.
- We form a control command so that the resulting line occupies a vertical position.
An example of the algorithm can be seen in the next video.
During test launches on the “home” field, we wound 15-16 laps in 10 minutes, which was slightly more than the result of the winner in 2013. Therefore, we did not go to competitions empty-handed. The trip to Vienna itself was quite interesting, because we traveled by car (1800 km). It turned out to be cheaper than on an airplane, and there was no fear that the robot would be broken during transportation on an airplane.
16 teams were declared for our discipline, and 5 teams were Russian. In addition to our team, the remaining Russian teams were from St. Petersburg Physics and Mathematics Lyceum No. 239. In total, 547 teams from 46 countries took part in the competition, so we got up early and headed to the competition venue to open the registration. In principle, as it turned out, there was no particular need for this. Because registration took place very quickly, and although there was a queue, it did not take a long time to stand. The competitions themselves in our discipline were supposed to start at 12-30, and before that time something like qualifications had to pass (each robot had to show that it was able to fly at least a circle). We all heard about German (Austrian) punctuality, but this rule did not work here. Most of the teams after registration began to test their robots, the judge, in principle, did not participate in this process at all, and when the qualification was to begin, it was not entirely clear. We were not going to pre-configure something on the robot, so we did not go into the queue for testing. But at one point it turned out that the field was free, I went to the judge and asked if we could qualify. He answered in the affirmative and we launched the robot. He flew off quite well 2 laps, and then problems began with Wi-Fi. The robot began to hit the pole, I began to press the landing button. And here, failure awaited us. Trying to press the landing button, either from nerves or from inattention, I pressed the “emergency landing” button and the robot crashed from 2 meters onto the marble floor. Having lifted it from the floor, I immediately realized that it had a broken cross and that he was now unlikely to be able to fly. What we felt then I think there is no need to explain. Suddenly, a guy from the Czech team came up to me, asked what happened, advised me to rewind the drone with tape and try to speak. Because there were no other options, we did so. I weakly believed that he could fly, but he flew. Being reinsured, I did not put a heavy battery with expanded capacity, but put it in my own and this was my second mistake. Because the plane of the screws was not parallel to the floor due to the broken crosspiece, the engines had to work almost at the limit of power and the battery sat down already on the 5th lap. As a result, with 5 circles we took 4th place. I did not put a heavy battery with expanded capacity, but put it in my own and this was my second mistake. Because the plane of the screws was not parallel to the floor due to the broken crosspiece, the engines had to work almost at the limit of power and the battery sat down already on the 5th lap. As a result, with 5 circles we took 4th place. I did not put a heavy battery with expanded capacity, but put it in my own and this was my second mistake. Because the plane of the screws was not parallel to the floor due to the broken crosspiece, the engines had to work almost at the limit of power and the battery sat down already on the 5th lap. As a result, with 5 circles we took 4th place.
Of course, given the breakdown, we were very pleased with these results. And the experience gained, I hope, will help us in future competitions.