-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
WIP: Control Allocation #13351
WIP: Control Allocation #13351
Conversation
Many Ci failures will be fixed by #13336 |
798399f
to
6a7f1b3
Compare
src/modules/control_allocator/ControlAllocation/ControlAllocation.cpp
Outdated
Show resolved
Hide resolved
59d024d
to
4646f2a
Compare
2ca4fd2
to
38a5391
Compare
You might want to rebase on master to fix the Mac OS build. |
8ac3340
to
d5a7215
Compare
Here is a demo of what can be done with this new module: Motor failure handling! On an hexacopter robot, two motors are manually disabled with minimum impact on the flight: the robot keeps hovering without drifting. As motors are disabled (simulating motor failures), a new allocation matrix is automatically computed and the hexacopter keeps flying as if it was an asymmetric pentacopter, then a quadcopter. The robot is not disturbed because the asymmetry is immediately compensated for in the allocation module. Without the logic implemented in the allocation module, the robot would drift sideways and downward while the integrators build up to compensate. |
So the only piece missing from a real vehicle would be detecting the motor is missing and removing it from the allocation table? |
@jkflying Yes! |
8c2f446
to
9c0b4af
Compare
5a712f2
to
f45c17f
Compare
platforms/common/include/px4_platform_common/px4_work_queue/WorkQueueManager.hpp
Outdated
Show resolved
Hide resolved
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
…n updated Reduces stack + RAM usage
And limit the operations to the number of configured outputs. Only using the number of configured actuators reduces CPU load by ~2% on F7 @1KHz.
Mostly important in cases where the ouputs would change (e.g. param change)
…ting the matrix Just to be on the safe side.
@jlecoeur @bkueng @RomanBapst Let's take the time to wrap this up! |
- control allocation module with multirotor, VTOL standard, and tiltrotor support - angular_velocity_controller - See #13351 for details Co-authored-by: Julien Lecoeur <julien.lecoeur@gmail.com> Co-authored-by: Silvan Fuhrer <silvan@auterion.com> Co-authored-by: Roman Bapst <bapstroman@gmail.com>
- control allocation module with multirotor, VTOL standard, and tiltrotor support - angular_velocity_controller - See #13351 for details Co-authored-by: Silvan Fuhrer <silvan@auterion.com> Co-authored-by: Roman Bapst <bapstroman@gmail.com>
- control allocation module with multirotor, VTOL standard, and tiltrotor support - angular_velocity_controller - See #13351 for details Co-authored-by: Silvan Fuhrer <silvan@auterion.com> Co-authored-by: Roman Bapst <bapstroman@gmail.com>
- control allocation module with multirotor, VTOL standard, and tiltrotor support - angular_velocity_controller - See #13351 for details Co-authored-by: Silvan Fuhrer <silvan@auterion.com> Co-authored-by: Roman Bapst <bapstroman@gmail.com>
- control allocation module with multirotor, VTOL standard, and tiltrotor support - angular_velocity_controller - See #13351 for details Co-authored-by: Silvan Fuhrer <silvan@auterion.com> Co-authored-by: Roman Bapst <bapstroman@gmail.com>
This is really cool! But I have a question. How does the system know that a motor has failed? Does it imply that there is fault detection in the system? |
@mengchaoheng yes you would need a detection mechanism. The failure is set manually in the demo above. |
# @name 3DR Iris Quadrotor SITL | ||
# | ||
# @type Quadrotor Wide | ||
# | ||
# @maintainer Julian Oes <julian@oes.ch> |
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.
I don't think so 😄
*/ | ||
void setFlightPhase(const FlightPhase &flight_phase) override; | ||
|
||
int numActuators() const override { return 7; } |
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.
int numActuators() const override { return 7; } | |
int numActuators() const override { return 8; } |
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.
This may explain why standard_vtol never worked with control allocation.
Work in progress control allocation module.
Edit: We decided to bring it in with multicopter support only for the start, and bring in FW/VTOL support in a followup. I've grouped the WIP items accordingly.
Minimal multicopter support (with this PR):
=> this is clean from a user perspective (
A: 0-15
mixer definition), not so much internally (it actually uses two additional control groupsactuator_controls_4
andactuator_controls_5
)Followup PR: