I have this new airframe and the following controls
Main outputs: 8 VTOL motors
Aux outputs:
1 elevator
2 aileron
1 rudder
1 aux for 4 tilt motors
Because the motors will tilt the leading edge rotors, Iām wondering how to modify pixhawk software flight control so that it is aware of tilt motors and takes care of transition from VTOL to cruise and back.
On my RC, I have one toggle switch to signal transition. What Iām struggling with is how to correctly modify pixhawk flight control software?
Iām using pixhaw 2.4.8.
Any help on flight control is appreciated. @LorenzMeier@bresch Could you please share your expert opinion?
Let me share the way, I think I will implement it. Please correct me if Iām wrong.
When the transition switch is toggled, the aircraft starts to transition from MC to fixed wing flight. I know the airspeed at which the tilt motor should be powered to tilt the leading edge rotors for forward flight. Using an airspeed data, software can send a command to tilt motors and switch of trailing edge rotors off. This can happen for both VTOL transitions
mode::TRANSITION_TO_FW and mode::TRANSITION_TO_MC in the VtolAttitudeControl::Run() method.
My doubt is about the mixer generated based on geometry because it is generated for one position of rotors when they are vertical. How will the thrust components be resolved and handled during forward and reverse transition? What Iād like to see is a smooth transition without pitch up or down during transitions.
Please help!
Thanks,
Kashyap
Hi, @gkashyap I think your airframe isnāt really different from a standard tiltrotor (such as the Convergence). Isnāt it working using the usual tiltrotor airframe config + mapping the outputs properly?
Just in case, @sfuhrer is more up-to-date with the current tiltrotor code.
Hi @gkashyap, as @bresch mentions your setup doesnāt strongly differ from other tiltrotor systems that are officially supported by PX4 - like the Convergence. The mixing problem you mention (roll/yaw coupling) is absolutely correct - though normally it doesnāt prevent the vehicle from doing stable transitions.
Front-transitions: Due to the nature of tiltrotors, you have a lot of possible forward thrust that accelerates the vehicle quite fast to an airspeed region that starts providing aerodynamic stability, such that actually little control actuation is needed to keep it stable (make sure that your vehicle is aerodynamically well designed)
Back-transitions: motors are immediately tilted upwards, without tilt - thus no problem here.
While the static mixer doesnāt really prevent stable transitions on most vehicles, we still are currently working on adapting the control pipeline to replace the mixers with a dynamic control allocation. Any contributions/flights testing there would be highly appreciated! https://github.com/PX4/Firmware/pull/13351. With that in, we could also e.g. support a hybrid flight mode where the user can fly the vehicle with any motor tilt.
Thanks for pitching in @bresch@sfuhrer. I agree with you. I was a concerned because I didnāt want to lose my aircraft again.
I did some digging into the code last night and I saw that there is a Tiltrotor class. Iāll start my work from there and adapt the code to my needs.
Sure, Iāll be happy to contribute to the control allocation development. Let me first go through and analyze the code and will start when I develop a good understanding.
Thanks for your time.
Hi Kashyap, I want to change airframe wrt my airframe , I donāt want to reinvent the wheel but I donāt know where and which folders or files can be changable , I know your post is old but I donāt find anything about changing existing airframe with clear explanation maybe they were easiy but I am beginner of beginner.
Hi Tugbakara,
Sorry for the late response. Iām not active on the forum these days.
If the directory structure has changed slightly, you should still be able to find these files and make changes. It is not described anywhere and I understand your frustration. It took a bit of digging and detective work to determine everything.
Here are the steps, Iāve used ā_trā suffix to differentiate the new file.
Add a new config file as defined here: Adding a New Airframe Ā· PX4 Developer Guide
It is best to start by reusing and modifying a config file which most closely resembles the aircraft that we have. In this case it was ā13010_claireā.
a. The first airframe file is defined to be 13020_tr and is added to src/Firmware/ROMFS/px4fmu_common/init.d/airframes.
b. Update the CMakeLists.txt in /src/Firmware/ROMFS/px4fmu_common/init.d/airframes to include 13020_tr in the build.
c. Define the mixers: main and aux files here: /src/Firmware/ROMFS/px4fmu_common/mixers (tr.main.mix and tr.aux.mix).
d. Update the CMakeLists.txt in /src/Firmware/ROMFS/px4fmu_common/mixers where the mixers were defined.
e. For SITL configuration define the mixer in /src/Firmware/ROMFS/px4fmu_common/mixers-sitl and update the CMakeList.txt file.
f. Update the toml file in /src/Firmware/src/lib/mixer/MultirotorMixer/geometries. This file is tr.toml.
g. Update the CMakeLists.txt in /src/Firmware/src/lib/mixer/MultirotorMixer for the new toml file added for mixer.
h. In the file āFirmware/src/modules/simulator/simulator_mavlink.cppā modify the case statement ācase MAV_TYPE_VTOL_TILTROTORā to update ān = 8ā for 8 motors. Adjust as per your case.
i. Run the āmake airframe_metadataā command from /src/Firmware to build the metadata used by QGroundControl for new airframe.
j. Build px4.
k. Build
j. Launch QGroundControl and connect with pixhawk board to check that new airframe is displayed in the group to which airframe was added. The airframe can be seen only after flashing the firmware. It should appear in VTOL tiltrotors group.
Hi gkashyap, thanks for reply Ichanged this airframe a little and I added its aux.mix file into sd card of the fc with the same name on ~/PX4-Autopilot/ROMFS/px4fmu_common/mixers ,and then I replug the sd and I opened QGC but nothing happened, I donāt know when I changed existing airframe aux file something has to happen or shown me in QGC?
And this is the changes in my aux file because I just want to eliminate 2 tilt servos which are in the back for two motors, and the elevator and rudder I wan to make them as one for vtail. Here is my changes what I made, but I donāt get it itās working or not:
I summirize the steps as mentioned in doc forum:
I create etc/mixers folder in SD card of fc.
In the mixer folder I create which its name is vtol_TTTTAAER.aux.mix ( same as in folder ~/PX4-Autopilot/ROMFS/px4fmu_common/mixers.