-
Notifications
You must be signed in to change notification settings - Fork 14k
Maintenance: Fix sequential desaturation unit test dependency #24735
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
base: main
Are you sure you want to change the base?
Conversation
104e41f
to
f2d2d93
Compare
Just rebased on main basically to rerun CI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we then just move the unit test out of the library until the implementation is fixed?
I agree that this maybe the easier route compared to no unit test at all.
However, I am concerned that without concrete plans to address this it will never be touched until it really matters later
I considered that, but moving the ControlAllocationSequentialDesaturation test out of the libraries folder feels off. It's more useful to have the test easily accessible than to avoid relying on CMake to add a dependency that is currently residing in a module, compared to a library. What structure changes are planned next to make control allocation more modular? Is the sequential desaturation ever used without the actuator effectiveness infrastructure? If no then that's basically a strict dependency of the library and needs to be available if not then the unit test should test without using it. |
@MaEtUgR There is no structural changes required. As far as I understand it is ONLY the unit test implementation that uses vehicle dependent actuator effectiveness that is part of the module. Therefore we just need to fix the unit test. |
@Jaeyoung-Lim ok I check if there's another way, I'm working on it anyways atm. That's why I made this pr. I propose this improvement to remove the duplication in advance of bigger changes... |
Solved Problem
When trying to add a new desaturation test for a degraded hexacopter configuration, I found that in #24286 the solution taken was to duplicate the functionality used from the
ActuatorEffectiveness
instead of fixing the dependency and including the existing implementation.I can only imagine the reasoning was to not have any dependency of the control allocation library on the control allocation module which totally makes sense for any autopilot hardware or simulation build. But for the separate unit test build I'm less concerned about this dependency than the duplication of things. If the folder is moved within the repository CMake will take care of including the correct file and if the dependency is broken then the test should fail and not keep on running with its own duplicate possibly outdated implementation.
I highly suggest to for now keep this dependency for the unit test instead of adding duplication from a maintenance perspective. We can still further adjust the structure of the allocation to have the individual pieces available top down in the library but for the current structure I'd prefer this way.
Solution
ActuatorEffectiveness
parts that are used in the unit test.Changelog Entry
Test coverage
The test works as before and expected.