-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
all axis/sign definitions should follow aerospace conventions (e.g. roll command from rc) #124
Comments
I fully agree, but is there a solution to change this without touching airframe or radio files ? |
Probably not... at least I can't think of any. |
Wrong signs:
Please list everything you can find that doesn't comply here... |
Ok, I changed the signs of RC roll and yaw in all the functions taking radio_control.values as input in the rotorcraft firmware. See flixr/paparazzi@532c810c2b69f in my aerospace_conventions branch... I also corrected it in the radio control input for the nps sim. @lamestllama The spektrum signs still need to be adapted as well, do we just need to change the signs of RC_SPK_THROWS in the spektrum_dx7se(_joby).h files or do we need to consider something else as well? @gautierhattenberger From http://paparazzi.enac.fr/wiki/Radio_Control#Direction it seems that roll is also wrong for fixedwings. Does this actually need any changes in the code? Or is this only reflected in the radio_control.xml file and the command_laws in the airframe file? Any other commands, whatever that don't follow the sign convention? |
You probably need to change the code. AP commands and RC commands have to match. command_laws mixing are at the very end (do they really need to be changed ?). |
What am I missing? I'm confused... It never says anywhere what signs the h_ctl_aileron_setpoint and h_ctl_roll_setpoint (same for h_ctl_elevator_setpoint and h_ctl_pitch_setpoint) actually have. While I have never done much in the fw control, I was always fairly sure that the commands obey the standard aerospace axes conventions, since the attitude (estimator_[phi|theta|psi] does. |
firmwares/fixedwing/main_ap.c:353 looks very suspecious. I think it's a this line that the radio sign is change to have the roll setpoint correctly |
ah, that was well hidden... What about yaw for fixedwings? As far as I can see that seems to be correct, can you confirm that? So far, (afaik) the only thing that needs to be changed by the user, is the RC configuration to get the rc values with the correct signs for roll and yaw. Of course any custom flight_plans, modules or other code that directly read the radio control channels will have to follow the sign convention as well. @dewagter What about cam point? Are you using that? @martinmm What about rc_datalink? Where is that configured, or where would this need to updated on the ground side? Anything else we need to change? Anything on the ground segment that needs to be adapted for this? |
Nose right positive.
Yes we use that. This can get quite complex due to the large amount of
|
good, thx... just weird that expected RC yaw input was then only inverted
Ok, I can change all the signs where RADIO_ROLL is read for cam_phi in |
For rc_datalink, the airborne code is only passing the values coming from the ground without sign modifications. |
ok, merged into 4.0_beta If you encounter any issues, please report them... and don't forget to do proper pre-flight checks (as you should always) before going into the air ;-) |
I'm just realizing that we discussed the idea of changing the signs, but not what are the correct signs...
|
Well, our "commands" are quite different from classical plane commands you have on piloted aircrafts, no?
hm... that really doesn't make sense to me, since as I said we take that as a roll setpoint (positive is bank right), so the rc input setpoint should not have the opposite sign... right? You propose to make all the commands the opposite, or which commands are you referring to? |
Good question... in flight dynamics we also define a positive DEFLECTIONS However, in paparazzi (except in RC_DIRECT), sticks are mapped to commands. -Christophe On Fri, Mar 16, 2012 at 9:34 PM, Gautier Hattenberger <
|
As Christophe said, the aeronautical convention make sense for A/C without autopilot (positive command = positive deflection). |
You should make a canard aircraft, then you can pitch up with a positive PS: I personally never saw a convention that defines the signs of cockpit So for me: pitch-up-stick = positive in a "conventional" airframe elevator = - (minus) pitch-stick -Christophe On Fri, Mar 16, 2012 at 9:59 PM, Gautier Hattenberger <
|
This issue was originally only about the inconsistent signs of the RC command input (which in most cases could be more appropriately called RC setpoint). You guys surely have more knowlege of "conventional aerospace flight dynamics & control" knowledge. The way I know it is that setpoints are expressed in the normal axes conventions, so pitch-up = positive, etc.. If we are talking about the commands going to the actual actuators (servos) for the control surfaces on fixedwings, then I guess we could also reverse them to follow the sign of the deflections. I also tend to mostly think about the multicopters, etc... so there it is more intuitive for me to have the actuator commands with the same sign as the attitude or rate setpoint. And I guess we don't want to mix it... then what about vehicles where you have both? Like the quadshot. The main problem was that it wasn't internally consistent, roll had this sign, pitch the other... |
Actually, this also can appear in the control_laws section by changing the signs of roll or pitch Anyway, you have a good point when saying that few people are really aware/caring about "low level" aerospace conventions... |
I really don't mind much which convention we follow... as long as we follow the same one on all axes! So concerning fixedwings, in 4.0_beta we have right now: Roll axis:
Pitch axis:
If you fly in auto1 or auto2 it is correct right now, since the h_ctl_roll_setpoint (from rc) now has the same direction as roll axis. But in manual, where you just copy the values from RC to aileron_setpoint, you need to reverse it. So that currently needs to be changed in the rc_commands section in the airframe file, which then generates SetCommandsFromRC.
|
ok, with commit de5b966 the final roll command is now positive for a bank right as well. Unfortunaltey this means changing the command_laws and/or the servos sections in the airframe files (make sure rc input is correct first):
The *_example airframes in the repository are updated accordingly. The h_ctl_aileron_setpoint is still negative, but that is only internal and requires no configuration changes. @dewagter said he will fix that as well before the release. |
Will fix roll setpoint code before the release of paparazzi4 and also check the issue from Eduardo lavratti: Hello, i am testing mi lisa_m and twog for a week. Changing the MAX_ROLL to more than 45deg in AUTO1 the attitude never go more than 45deg. In AUTO2 the same occour. Felix make some tests in simulation and confimed the problem. another problem is : For my purpouse i need make a survei with 25m grid. With another autopilot my plane make close turns less than 25m without problem. |
In the simulator, the max roll angle is bounded (hard coded, sw/simulator/flightModel:149) to 0.7 rad. For the nav radius, I can set it to any value while flying the STANDBY block of basic FP. For the survey, the radius is statically set by the grid attribute. The radius of the circles will be half of it (so grid="50" for a 25m radius turn). If you use a variable to change it dynamically, you will have to go out of the survey block and enter again. |
Ok, with 9ce4478 I changed the sim to take ROLL_MAX_SETPOINT instead of the hardcoded 40degrees. Btw, this has nothing to do with the sign conventions... if there is a problem with the max setpoints it should probably get it's own issue (Eduardo was testing with master). |
Closing this issue since signs are corrected from the user point of view. |
Currently the roll command from rc does not follow the normal aerospace convention, but is reversed.
This is very confusing, especially when debugging.
The text was updated successfully, but these errors were encountered: