To do this, Chinthaka has been leading a team in using a standard radio-controlled quadrocopter drone fitted with a Raspberry Pi 3B+ and a Camera Module. They've worked on an automatic landing system, allowing the drone to be brought down to the ground without mishap.
“Automatic landing is a kind of automatic flight towards a specific landing spot and to achieve this with a drone it must find the landing spot itself,” Chinthaka explains. “I believe that landing spots can be recognised by processing the images from an on-drone camera, but this image processing needs to be implemented in real-time, generally less than 15 milliseconds.”
It's this need for fast on-board processing that led Chinthaka to consider using Raspberry Pi. “The idea is that flight control is conducted as soon as the images are processed, so we not only needed a good, lightweight camera but a lightweight on-drone computer too,” he reveals. “Raspberry Pi 3B+ is obviously lightweight and it can be easily implemented within a drone. Raspberry Pi 4 can be used for this too.”
The camera was chosen because it has a wide angle. “It's wider than the other cameras that are compatible with Raspberry Pi, so it can capture a large area and this capturing ability makes it easy to identify a landing spot,” says Chinthaka. A depth camera was also important. “During the drone landing, the ground object information can be easily recognised with a depth camera rather than a 2D camera.”
For optimal results, the camera lens is kept horizontal, even when the drone body is not in this position during the flight. “If the lens was not always horizontal, then it would be difficult to smoothly capture the landing spot during flight because of the shaking of the drone,” Chinthaka says. “We made our own lightweight gimbal to keep the camera lens horizontal but a commercially available gimbal may also be used for this task.”
H marks the spot
The idea is that the drone looks out for an H-shaped symbol placed on the ground at the landing location. Using software created by the team, the image is processed and converted into physical co-ordinates to generate a horizontal feedback.
“Some parts of the software include OpenCV library functions,” says Chinthaka. “We also wrote software for the landing process, but developing the necessary algorithms to detect the landing spot in real-time was the greatest challenge.”
Even so, the researchers were able to get the image processing time down to three milliseconds. This allows the drone to quickly fly over to the landing spot, hover over it and land vertically, all controlled by Raspberry Pi. “It's been a big success and we expect it will have a wide number of future uses,” Chinthaka concludes.