Replies: 6 comments 1 reply
-
The problem I see is that we'll have to manage a bunch of extra files, not explicitly related to airframe, although it is the case in reality.
and
About the issue on rotation matrix, I agree the naming is not correct and defining matrices (for rotations) in config file is not nice. It could have been in Euler angles format with initialisation of the matrix at runtime rather than direct static initialisation. |
Beta Was this translation helpful? Give feedback.
-
The file could be related to the airframe file if it is mentioned in it, then it's semantically very similar to the <include href="rotations.yaml" processor="imu_rotation.py"/> I am not in favor of the solutions you propose as this is still hardly readable, and will still require specific handling by the OCaml generator. Maybe at a longer term we need to allow modules to register "preprocessors" with standardised "hooks" to generate code to be integrated in the airframe/flightplan/settings. I am in favor of resolving this specific case with a user friendly solution, even if this is a bit "hacky", and start thinking about a more general solution to handle complex specific data in a separate discussion. |
Beta Was this translation helpful? Give feedback.
-
I prefer to keep it in the airframe and have something like this (can also be different in name and maybe like all have the name
|
Beta Was this translation helpful? Give feedback.
-
The general policy about backward compatibility is that only major release should break it. So I don't mind breaking and cleaning things, however I would like to first make a stable release (v6.4, should have been done already anyway), then start a 7.x series with the proposed changes. And the proposed changes / specs / objectives should be clarified a bit more in my opinion, as we have several options and it is probably a bad idea to implement them all.
In the meantime, changing a few names can be done to clarify the different rotation. I'm also in favour of defining the rotation matrices by angles (and compute the rotation matrix at runtime). It is human-readable and gives more guarantees that the matrix is a proper rotation matrix, without too much approximation due to number of digits. |
Beta Was this translation helpful? Give feedback.
-
Yes that can be done in the meantime, but changing it to angles is not always enough for us. We had some bad IMU's with inverted axis, so preferably we also keep the matrix options. |
Beta Was this translation helpful? Give feedback.
-
For the depreciation can we at keep a list of all the items that needs to be removed/changed in the next release somewhere? |
Beta Was this translation helpful? Give feedback.
-
Hi @fvantienen, @gautierhattenberger
I think we should discuss about the IMU/sensors configurations.
This message is also supported by @FlorianSan 😃
the problems
the naming:
When
IMU_BODY_TO_IMU_[PHI/THETA/PSI]
are defined,IMU
does not refers to the sensor, but more to the reference frame of all sensors. Therefore, I think it could be namedBODY_TO_BOARD
.changing meaning:
Before the following line, the
body_to_sensor
field seems to contain a board_to_sensor rotation matrix. (can you confirm?)It makes it harder to understand the code.
paparazzi/sw/airborne/modules/imu/imu.c
Lines 386 to 387 in 9c1e21d
over-complicated retro-compatibility:
There is more than 130 lignes of macro preprocessing for the configuration in imu.c. Don't you think it's too much?
Can we drop the old way of defining the configuration and focus on the new way?
As much as I like when it's unambiguous, the configuration for a sensor is awfully long:
<define name="ACCEL_CALIB" value="{{.abi_id=24, .calibrated={.neutral=true, .scale=true, .rotation=true},.neutral={-10,-47,-130}, .scale={{36821,8142,5741},{60003,13319,9358}}, .body_to_sensor={{0,-16383,0,16383,0,0,0,0,16382}}}}"/>
Most of this line is generated by the calibration tool so it's ok for me, but adding the
body_to_sensor
field is tedious.Maybe this field should be separated from the rest, especially because:
the solutions
What can we do about that is up to discussions!
A possible solution is to write the rotations in a separated file that could be handled either by the airframe generator, or by the calibration tool.
This file would be an optional argument of
calibrate.py
. If present, thebody_to_sensor
part of the structure would also be generated, making the copy-paste easy again.The rotation file could look like this:
Using a file like this, the
body_to_imu_rmat
could entirely be removed from the code, leaving just thebody_to_sensor
fields, without the naming issue.What do you think ?
Beta Was this translation helpful? Give feedback.
All reactions