Experience of participation in RobotChallenge 2014
At the end of March of this year, with my team from the Bryansk State Technical University , I took part in the RobotChallenge 2014 international competition in sports robotics in Vienna.
And in this article, I would like to talk about our experience of participation and reveal the details of our approach to solving the problem. The format of the competition is very similar to the Olympiad, 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 so-called. tasks, and as a rule, the task is that you need to perform the task faster than others. We participated in the AirRace discipline, the idea of ​​which is that the robot should fly around 2 pillars in the form of a figure of eight in a completely autonomous mode. The winner is the robot that in 10 minutes flies in continuous flight more than all the "eights". Before this competition, I had only the experience of participating in the competition of flying robots of the KROK company, which took place in August 2013 in Moscow. At those competitions, we suffered a failure in the form of rain on the flight deck. Given that we were performing the task faster than the organizers on test flights, during a real flight, the visual robot odometer “blinded” on puddles and on black wet asphalt, and we could not even fly the labyrinth. Below is our test attempt at the KROK competition in 2013. ')
In Vienna, with weather conditions, everything was much better (+20 and clear sky). The competition was held indoors, so we were no longer afraid of the weather vagaries.
Due to the limited budget and time, it was decided to use the same robot and the same approach as at the KROK competitions at competitions in Vienna.
We were based on a bunch of AR.Drone + ground station in the form of a laptop. This choice (even during the preparation for the CRIC) was due to the fact that AR.Drone, in fact, already knows how to fly out of the box and there are SDKs with which we could manage it over Wi-Fi. The truth is now having experience with it, I tend to think that it is necessary to assemble another quadrocopter and strive to implement all the calculations on board. In fact, I have 3 complaints against AR.Drone. These are Wi-Fi, problematic hardware expansion and closed source code. Actually, we managed to expand the hardware of our AR.Drone by connecting to it additional ultrasonic range finders through the Arduino Nano board connected via onboard USB. Schematically it looks like this.
We used these range finders only at the KROK competition for orientation in the maze, and at the Vienna competition, the main AR.Drone hack was that we turned the front camera down and focused on it.
On the laptop, all of our software was based on the ROS framework. There are a lot of advantages of its use, 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 code modifications (only a few settings of the parameters of the regulators and the computer vision system). The simulation capability allows you not only 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 quadcopter.
As for the discipline of Air Race, the rules there are quite democratic. They allow the use of any additional navigation labels inside the field (both passive and active). The only limitation is that the robot must fly around the pillars on the “eight”, and it is purely conventional and should not touch the walls, pillars and the floor. A number of teams actively used this. For example, a team from Poland used an additional robot that travels down the dotted line, and a quadrocopter flies behind this robot. Last year they took the first place, and in this their reliability let them down and they could not fly a single lap. Some teams installed additional visual markers for orientation, and the team from Canada, generally installed 2 kinekta inside, but they also did not succeed.
We decided not to use anything extra on the field, but to focus strictly on the dotted line 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 on the image.
We divide them into groups according to their angle of inclination to the vertical.
We refer to the first group those rectangles that are the most vertical.
We draw through the centers of the rectangles of the first group a straight line.
We form a management team in such a way that the resulting straight line is vertical.
An example of the algorithm can be seen in the following video.
During the test runs 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 empty-handed to the competition. The trip to Vienna itself was quite interesting, because we traveled by car (1,800 km). It turned out to be cheaper than on a plane, and there was no fear that the robot would be broken during transportation on the plane.
16 teams were declared for our discipline, with 5 teams being Russian. In addition to our team, the rest of the Russian teams were from St. Petersburg Physics and Mathematics Lyceum No. 239. In total, 547 teams from 46 countries took part in the competitions, so we got up early and headed to the competition site to open the registration. In principle, as it turned out, there was no particular need for this. Since registration took place very quickly, and even though there was a queue, it did not take long to stand. The competition itself in our discipline was supposed to start at 12-30, and before that time something like qualification had to pass (each robot had to show that he was able to fly at least a circle). We all heard about German (Austrian) punctuality, but this rule did not work here. After registration, most of the teams started testing their robots, the judge, in principle, did not participate in this process at all, and when the qualification was supposed to start was not entirely clear. We were not going to pre-tune something on the robot, so we didn’t get into the testing queue. But at one moment it turned out that the field was free, I approached the judge and asked if we could qualify. He answered in the affirmative and we launched the robot. He pretty well flew 2 laps, and then the problems started with Wi-Fi. The robot began to hit the pole, I began to press the landing button. And here we were waiting for failure. I, trying to press the landing button, either from nerves, or from inattention, pressed the “emergency landing” button and the robot collapsed from 2 meters onto the marble floor. Picking him up from the floor, I immediately realized that his cross was broken and he could hardly fly now. What we felt then I think no need to explain. Suddenly a guy from the Czech team approached me, asked what had happened, advised me to rewind the drone with scotch tape and try to perform. Since there were no other options, so we did. I weakly believed that he could fly, but he flew. Reinsured, I did not put a heavy battery of extended capacity, but put my own, and that was my second mistake. Since the plane of the screws due to the broken crossings were not parallel to the floor, the engines had to work almost at the power limit and the battery was already on the 5th lap. As a result, we took the 4th place with 5 circles.
Of course, given the breakdown, we were very pleased with these results. And I hope that this experience will help us in future competitions.