I’m using quad x.
I have been trying to edit the lines:
outputs[i] = roll * _rotors[i].roll_scale +
pitch * _rotors[i].pitch_scale +
thrust * _rotors[i].thrust_scale;
But there seems to be no effect on the drone behaviour even after a successful compilation(make px4_fmu-v3_default) and upload(make px4_fmu-v3_default upload) thru the console.bat. The same commands show proper effect when used to edit quad_x.main.mix
I want to remove the responsibility of roll completely from front motors(1 and 3) to ONLY to the rear motors(2 and 4). I don’t want to make a new custom airframe.
If im just able to see the code changes reflect in the behaviour of the quad, that’s enough for me to carry on.
I’m aware that this change will destablize the quad, but i will mount the motors physically different, not as represented by the geometry.
All I need is the code changes in MultirotorMixer.cpp to reflect in the behaviour.
Just to prove that any edits are not working I did a small experiment:
Even though i comment out the code for Airmode=Disabled(default). The Quad still seems to respond as before:
case Airmode::disabled:
default: // just in case: default to disabled
//mix_airmode_disabled(roll, pitch, yaw, thrust, outputs);
break;
It still responds to the rc inputs. According to me it should not respond to any yaw or roll desired on the radio sticks.
Is it because this code is running on PX4IO controller and the command (make px4_fmu-v3_default upload) only burns the code on FMU ?
What flight mode are you using to test? It could be that a higher-level control loop is compensating for your changes. Does acro mode produce the expected behavior?
Will try putting the logs. But just to understand, wanted to know for sure where the mixer code runs? And if it’s the io processor then is the Mixer code getting burnt there everytime i make change in mixer equation.
I had experimented with quad_x.main.mix as well
But i guess i can only do 2 things there
Change rpy Scaling values and
Tinker with aux input( not useful in my case)
My lookout is that i should separate the yaw and roll logic
Front two motors are only responsible for yaw
And
Rear two motors are only responsible for roll
And dont worry, the quad wont topple, it will be resting on a frictionless surface
Tried it in acro mode. Produces the same result.
Does that mean it’s not a loop compensation problem?
Does it mean that any edits are simply not reflecting in behaviour?
If yes, what will be the solution?