Today we will talk about P600 outdoor UAV one of the highlights of the function “pod frame selection tracking”. The platform is equipped with a Q10F 10x zoom single-light pod with USB port and has developed its own ROS driver. Through the built-in KCF box selection tracking algorithm in the airborne system, the realization of specific targets (human/vehicle/other uAVs, etc.) based on * image vision is realized. Box selection, trace and follow. The following will be described from two aspects: principle description and real machine operation.

I. Principle description

1. KCF principle

KCF (Kernelized Correlation Filters) is a kind of discriminant tracking method. Generally, a target detector is trained in the tracking process, and the target detector is used to detect whether the predicted position in the next frame is the target, and then the training set is updated with the new detection results to update the target detector. In the training of the target detector, the target area is generally selected as a positive sample, and the area around the target is a negative sample. Of course, the closer the area is to the target, the more likely it is to be a positive sample. Compared with other tracking-by-detection methods, THE speed of KCF is greatly improved and the effect is relatively good.

Flow chart of KCF algorithm

2. Node diagram

The pod tracking node figure is as follows:

3. Tracking control principle and main message flow

Tracker_ros nodes subscribe to the image topic from the pod and get the XY offset and the original and actual box size, both in the position_diff topic. The offset of XY can be obtained from PID of Serial_node to control the yaw roll of the pod and sent to the pod through serial port 2. The expected speed of THE UAV in the x direction is obtained by PID from the original frame size and actual frame size in target_tarcking node.

Pod control

Pitch Angle control: PID control (the error comes from the deviation distance between the detection frame and the center point of the camera image) Yaw Angle control: PID control (the error comes from the deviation distance between the detection frame and the center point of the camera image) The PID codes of the pitching Angle and yaw Angle of the pod are as follows:

Uav tracking control

The yaw of the UAV reads the yaw of the pod and keeps it in sync with the yaw of the pod. X direction speed control: PID control (the error comes from the difference between the size of the current detection frame and the size of the initial manual frame selection) X direction speed PID control code is as follows:

Two, real machine operation

The outdoor test requires NoMachine to connect to the remote desktop of TX2. Meanwhile, the target to be tracked is selected in the box on TX2. After completing the preliminary test, the pilot is allowed to test the aircraft in self-stable mode or fixed-point mode

fly_track_outdoor.sh

file

/home/amov/track_ws/src/px4_command/sh/sh_for_P200/fly_tracking_outdoor.sh

Observe each terminal and make sure there is no error. Enter 0 to select PID and 1 to select GO ON in the last terminal window

Enter 1 in the penultimate terminal window to select Go on and 777 to select Track

The pilot tries to switch offboard mode. If the switch succeeds, the pilot will fly to a certain altitude in position mode. Check whether the observation speed data is normal. If so, continue to check the target:

Pilot offboard mode aircraft start tracking, and note that in the event of an accident control aircraft cut to self-stable or fixed point mode.

More detailed information

Refer to the Wiki manual:

Prometheus – wiki. Readthedocs. IO/zh_CN/lates…

– End –

With the rapid development of technology, AMu Lab will keep up with the pace of technology and constantly recommend the latest technology and hardware in the robot industry to everyone. The greatest value of our training is to see our trainees make rapid progress in technology. If you are in the robotics industry, please follow our official account, we will continue to publish the most valuable information and technology in the robotics industry.