On July, 2019, for the fourth time in a row, the team Copter Express won the annual tests of unmanned vehicles "Robocross". Tests are held at the GAZ test site near Nizhny Novgorod.
The main objective of the tests in the UAV category was to localize and destroy the target - the red balloon - autonomously.
robocross2019 ROS package is divided into two parts:
red_dead_detection ROS nodelet recognizes the red ball,
ball.py implements high-level flight logic.
red_dead_detection nodelet recognizes the red ball on the image from the forward looking quadcopter camera (
/front_camera/camera_info topics). The simplest method of filtering the image by color is applied. Then the nodelet calculates the geometric center of the detected segments, and performs camera distortion compensation (
Using the known focal lengths of the camera (from
camera_info), the nodelet calculates the vector directed towards the target. The resulting vector is published to the topic
/red_dead_detection/direction; its coordinate system (
frame_id is associated with the front camera
To fly towards the ball, the direction vector
red_dead_detection/direction is used, which is set as a setpoint for the velocity of the drone. The yaw angle is also set towards the ball. The target is considered destroyed when the total area of red pixels is less than the threshold for a certain amount of camera frames.