2024.08.03 20:19
작성자: 박준규, 신지환
<aside> 📢 Path Generation!!! A first at Yonsei Drone! (물론 시간 없으면 걍 손으로 좌표점 찍어서 가야될 수도…)
Update 2024.08.04 05:41 Searching a bit online reveals this requires A LOT of REAL FLIGHT TESTING to tune. Unlike multicopter mode, there are lots of parameters to tune for path generation AND tracking in fixed wing mode (the tracking controller implemented in PX4 even optimizes the control action accounting for wind, and real flight tests are required to tune related parameters). These parameters affect flight and waypoint “reach” performance a lot.
A lot of the stuff for path generation is done, just need to do coordinate conversion. Path tracking controller is already in PX4.
</aside>
Step 1 to 3 (until the path tracking controller) are all done in the mission (companion) PC.
The problem with doing step 3 by ourselves is that the dynamics/kinematics of the system has to be taken into account. PX4 already has two controllers for this implemented, and it’s 508 lines of code (just for the horizontal control one). So we shouldn’t try to do pure velocity setpoint control or attitude+thrust setpoint control. It will be a worse version of what’s already there.
Before we begin, we should understand how the default position setpoint controller works in PX4 for fixed-wing mode.
Note: Offboard Waypoint Following Related (this contains how to get position setpoint working)
No implementation for path generation AFAIK. This is step 2 from the 3 steps above. So this should be done by an external program, which then gives the positions.
Given a path (a.k.a. position setpoints), the path tracking is done with a combination of TECS (for altitude and airspeed control) and NPFG controllers (for horizontal heading/position control). This is step 3 from the 3 steps above.
https://docs.px4.io/main/ko/config_fw/position_tuning_guide_fixedwing.html https://discuss.px4.io/t/px4-fixed-wing-mission-acceptance-radius/34693/4
Source code for fixed wing position control (more like position “track”?):