This project is to implement GEO FENCE technology through PPM conversion signals. Therefore, the controller signal (PPM) signal is transmitted from raspberry pi to pixhawk to enable GEO FENCE. For PIXHAWK, it is equivalent to flying according to the control signal.
The figure below is a schematic diagram of the system. As shown in the figure, the PPM signal is not received and transmitted directly to the Flight Controller, but is transmitted through the Raspberry Pi. At this time, if it is inside the Geo Fence from the Raspberry pi, the PPM signal received as input is transmitted to the Flight Controller as it is. However, if it is outside the GEO fence, it transmits a new signal to the Flight Controller through the control loop, not the PPM signal received as input.
The control was performed using PI control. At this time, the P gain was set large. This is because the main goal is to enter the GEO FENCE in a rough direction rather than coming to the exact location. More detailed control will be possible if the P and I gains are found more precisely.
Before the Actual Test, simulation flights were conducted using Gazebo and px4 HITL. In Simulation, control was good. When leaving Geo Fence, where the drone was set, it returned well in any direction.
You can set the Geo Fence. The blue line is the set Geo Fence.
2) INSIDE GEO FENCE
Inside Geo Fence, it flies to the control signal.
3) OUTSIDE GEO FENCE
Outside of Geo Fence, the controller signals are ignored. Specify the target point inside the Geo Fence. Thereafter, error distatnce is calculated through a GPS sensor. Based on the error distance, the degree of tilt of the throttle and drone is determined through PI control. The current posture is estimated through IMU sensors and EKF. Based on this, the rotation ratio of roll and Pitch is calculated. This allows the drone to enter the Geo Fence.
4) Inside Geo Fence
After returning to the target point inside the Geo Fence, if the distance to the target point is less than 0.2m for more than 3 seconds, the autonomous driving mode is turned off and the controller signal priority mode is returned. It can then fly inside Geo Fence based on the controller signal.
|1||Raspberry Pi 4||Raspberrypi poundation||Main Computer|
|2||Arduino uno||arduino.cc||Safety alarm system|
|3||MPU 9250||invensense||9-axes IMU sensor|
Project Source code
Source Code Link: https://github.com/rladntjd/capstone2020
Simulation Testing Video
Video Code Link : https://youtu.be/1OroQyp9Y-I
Actual Testing Video
Video Code Link : https://youtu.be/L7eE2ov9xuc