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
Remove actuators_pprz
#3203
base: master
Are you sure you want to change the base?
Remove actuators_pprz
#3203
Conversation
@dewagter I'm all in favor of removing
|
Thanks a lot for the reply. I like the idea of actuators as an array of structs. In the meantime, I proposed an intermediate step to standardize it: #3205 but I like making structs even better. SetRotorcraftCommands still needs to be done indeed. One option would be: https://github.com/paparazzi/paparazzi/pull/3203/files#diff-02e75cc9d71b8fb6997f5286311725c6d7cfc421e65da9e9b96f5e0a99ed46b2R133 |
a81a9e4
to
9a4441d
Compare
bypass the bypassing actuator_pprz Removed ACTUATORS_PPRZ
9a4441d
to
72425e3
Compare
there are now 3 types of numbers of actuators and 2 types of control command arrays:
SERVO_NAME_IDX
->actuators[]
-> must also be used in ABI messagesactuators_pprz[]
is called actuator but contains controller outputs which not always map 1 to 1 to actuatorsSERVO_NAME no=""
-> CAN: should never be used in code. I would like to remove thedefine
from theairframe.h
file to avoid errorsthere are now problems with adding virtual actuators when the number of commands becomes larger than the number of actuators and there are no checks if
INDI_NUM_ACT
is smaller than the actuator array size: see Rot mech fix pr #3180actuators_pprz
index numbers are often the same numbers as the actuators, so many users confuse them, but they are not always the same. One is the sequence in the INDI and the other is the list of servos.SERVO_NAME_IDX
andSERVO_NAME
are sometimes confused in code: Hide actuator driver number from code #3206Safety features on commands are OVERRULED (e.g.
FAILSAFE
) when using INDI: command-laws in xml must re-implement functions like killCommand laws contain raw INDI indexes: not very readable + eff_sheduling relies on a specific order but cannot check this.
RC_COMMANDS
andRC_AUTO_COMMANDS
are broken with INDIThe simulator needs harmonized actuator commands (
-MAX_PPRZ
->MAX_PPRZ
), which required theactuators_pprz
but this can be solved differently: actuators[ ] array of structs with pprz units and driver units #3205some modules write PWM directly to actuators and ignore the servo MIN and MAX
-> so I want to remove
actuators_pprz
: and instead do what was always the case beforecontrol ->
stabilization_cmd
with the command sequence of the airframe file, and then set theactuators
in theActuatorsFromCommands
block, just like the name says.You can then:
RC_COMMANDS
etc repaired...