Skip to content
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

Make control allocation and actuator effectiveness a non-module-specific library #24196

Merged
merged 6 commits into from
Jan 15, 2025

Conversation

Jaeyoung-Lim
Copy link
Member

@Jaeyoung-Lim Jaeyoung-Lim commented Jan 10, 2025

Solved Problem

When trying to implement a separate metric control allocation module, it seems that sharing the control allocation library seems like a sensible solution.

Solution

  • Make ControlAllocation and ActuatorEffectiveness a library that can be shared across multiple modules
  • Keep Vehicle Specific ActuatorEffectiveness implementation as part of control_allocator module and only keep the ActuatorEffectiveness base class in the library.

Changelog Entry

For release notes:

Feature: Control allocation as a standalone library

Test coverage

Tested in SITL

Context

@Jaeyoung-Lim Jaeyoung-Lim force-pushed the pr-control-allocation-lib branch 3 times, most recently from 0028f92 to a164aa7 Compare January 10, 2025 16:28
@Jaeyoung-Lim Jaeyoung-Lim changed the title Make control allocation and actuator effectiveness a library Make control allocation and actuator effectiveness a non module specific library Jan 10, 2025
@Jaeyoung-Lim Jaeyoung-Lim changed the title Make control allocation and actuator effectiveness a non module specific library Make control allocation and actuator effectiveness a non-module-specific library Jan 10, 2025
Copy link
Contributor

@sfuhrer sfuhrer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make ControlAllocation and ActuatorEffectiveness a library

I would consider having it grouped in one folder, as one cannot live without the other one.

Otherwise I agree with libraries as much as makes sense, and it should incentivize us to make certain functions more generic while going very specific for others.

@Jaeyoung-Lim Jaeyoung-Lim marked this pull request as ready for review January 13, 2025 11:56
@Jaeyoung-Lim Jaeyoung-Lim force-pushed the pr-control-allocation-lib branch from 326ff29 to b257fe9 Compare January 13, 2025 11:57
@Jaeyoung-Lim
Copy link
Member Author

@sfuhrer Great, I have grouped the libraries to a directory as requested

Pedro-Roque
Pedro-Roque previously approved these changes Jan 13, 2025
Copy link
Member

@Pedro-Roque Pedro-Roque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@dagar
Copy link
Member

dagar commented Jan 14, 2025

This might be nitpicky, but allocation seems potentially ambiguous (memory allocation, etc).

Copy link
Contributor

@sfuhrer sfuhrer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with Daniel. I think there is no hurt in calling the folder "control_allocation" to be as precise as possible.

src/lib/allocation/control_allocation/CMakeLists.txt Outdated Show resolved Hide resolved
@Jaeyoung-Lim Jaeyoung-Lim force-pushed the pr-control-allocation-lib branch from af7a622 to 3a61839 Compare January 14, 2025 16:38
@Jaeyoung-Lim
Copy link
Member Author

@dagar @sfuhrer Fixed directoy name as suggested :)

Copy link
Contributor

@sfuhrer sfuhrer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks clean, thanks for the initiative!

@Jaeyoung-Lim Jaeyoung-Lim merged commit 974446c into main Jan 15, 2025
58 of 61 checks passed
@Jaeyoung-Lim Jaeyoung-Lim deleted the pr-control-allocation-lib branch January 15, 2025 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants