Skip to content

580 task thrust allocator auv#661

Merged
Q3rkses merged 32 commits intomainfrom
580-task-Thrust-Allocator-AUV
Mar 21, 2026
Merged

580 task thrust allocator auv#661
Q3rkses merged 32 commits intomainfrom
580-task-Thrust-Allocator-AUV

Conversation

@Q3rkses
Copy link
Copy Markdown
Contributor

@Q3rkses Q3rkses commented Feb 1, 2026

Refactored the thrust allocator module to be easier to build upon. Added more documentation in the readme file and some basic unit testing of the thrust allocator functionality. Added a new solver using CasADi and Fossen's formulation of the QP thrust allocation problem. Whenever i find time again i will add more comprehensible unit testing.

Lastly it would be nice to have simulator testing and perform some analysis on computation time vs accuracy tradeoff for both pseudoinverse and the QP solver but that is outside of the scope of this PR.

@Q3rkses Q3rkses linked an issue Feb 1, 2026 that may be closed by this pull request
3 tasks
@Q3rkses Q3rkses requested a review from jorgenfj February 1, 2026 23:03
@Q3rkses Q3rkses force-pushed the 580-task-Thrust-Allocator-AUV branch from f792d80 to a531809 Compare February 2, 2026 13:06
@Q3rkses Q3rkses requested a review from kluge7 February 2, 2026 13:06
@Q3rkses Q3rkses self-assigned this Feb 2, 2026
@Q3rkses Q3rkses added the AUV label Feb 2, 2026
Comment thread motion/thrust_allocator_auv/.gitignore Outdated
Comment thread motion/thrust_allocator_auv/LICENSE
Comment thread motion/thrust_allocator_auv/include/thrust_allocator_auv/allocator_config.hpp Outdated
Q3rkses and others added 3 commits February 2, 2026 14:20
…ubious and not testing the expected functionality. These are mostly tests for moments as sometimes the desired wrench and actual wrench will not physically be able to match given the constraints.
Comment thread motion/thrust_allocator_auv/include/thrust_allocator_auv/allocator.hpp Outdated
Comment thread motion/thrust_allocator_auv/include/thrust_allocator_auv/allocator_config.hpp Outdated
Comment thread motion/thrust_allocator_auv/solvers/qp_allocator.cpp Outdated
Comment thread motion/thrust_allocator_auv/solvers/qp_allocator.cpp Outdated
Comment thread motion/thrust_allocator_auv/solvers/qp_allocator.cpp Outdated
Comment thread motion/thrust_allocator_auv/solvers/qp_allocator.cpp Outdated
Comment thread motion/thrust_allocator_auv/include/thrust_allocator_auv/qp_allocator.hpp Outdated
the qp allocator and refactored some code because the node dies
everytime i try to launch it and use it in the simulator
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 5, 2026

Codecov Report

❌ Patch coverage is 62.04239% with 197 lines in your changes missing coverage. Please review.
✅ Project coverage is 36.95%. Comparing base (da8722f) to head (7f10bc5).
⚠️ Report is 33 commits behind head on main.

Files with missing lines Patch % Lines
...ust_allocator_auv/tests/thrust_allocator_tests.cpp 60.91% 2 Missing and 118 partials ⚠️
.../thrust_allocator_auv/src/thrust_allocator_ros.cpp 0.00% 58 Missing ⚠️
...lude/thrust_allocator_auv/thrust_allocator_ros.hpp 0.00% 5 Missing ⚠️
...st_allocator_auv/src/solvers/allocator_factory.cpp 50.00% 3 Missing and 1 partial ⚠️
.../thrust_allocator_auv/src/solvers/qp_allocator.cpp 96.03% 2 Missing and 2 partials ⚠️
...de/thrust_allocator_auv/thrust_allocator_utils.hpp 88.88% 0 Missing and 2 partials ⚠️
...ocator_auv/src/solvers/pseudoinverse_allocator.cpp 84.61% 1 Missing and 1 partial ⚠️
...e/thrust_allocator_auv/pseudoinverse_allocator.hpp 0.00% 1 Missing ⚠️
..._auv/include/thrust_allocator_auv/qp_allocator.hpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #661      +/-   ##
==========================================
+ Coverage   33.47%   36.95%   +3.48%     
==========================================
  Files          68       74       +6     
  Lines        4840     5288     +448     
  Branches     1245     1601     +356     
==========================================
+ Hits         1620     1954     +334     
+ Misses       2925     2913      -12     
- Partials      295      421     +126     
Flag Coverage Δ
unittests 36.95% <62.04%> (+3.48%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
..._auv/include/thrust_allocator_auv/casadi_utils.hpp 100.00% <100.00%> (ø)
...e/thrust_allocator_auv/pseudoinverse_allocator.hpp 0.00% <0.00%> (ø)
..._auv/include/thrust_allocator_auv/qp_allocator.hpp 0.00% <0.00%> (ø)
...de/thrust_allocator_auv/thrust_allocator_utils.hpp 84.37% <88.88%> (+84.37%) ⬆️
...ocator_auv/src/solvers/pseudoinverse_allocator.cpp 84.61% <84.61%> (ø)
...st_allocator_auv/src/solvers/allocator_factory.cpp 50.00% <50.00%> (ø)
.../thrust_allocator_auv/src/solvers/qp_allocator.cpp 96.03% <96.03%> (ø)
...lude/thrust_allocator_auv/thrust_allocator_ros.hpp 0.00% <0.00%> (ø)
.../thrust_allocator_auv/src/thrust_allocator_ros.cpp 0.94% <0.00%> (+0.94%) ⬆️
...ust_allocator_auv/tests/thrust_allocator_tests.cpp 60.91% <60.91%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@jorgenfj jorgenfj left a comment

Choose a reason for hiding this comment

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

Maybe move the "solvers" directory to src as that follows the standard ros package structure and maybe divide the headers into subfolders

Comment on lines +57 to +58
public:
explicit ThrustAllocator(const rclcpp::NodeOptions &options);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe rename this class to ThrustAllocatorNode to make it more explicit that this is the ros class

Comment thread motion/thrust_allocator_auv/src/thrust_allocator_ros.cpp Outdated
@jorgenfj
Copy link
Copy Markdown
Contributor

Maybe make solver type a launch arg instead of yaml param

Copy link
Copy Markdown
Contributor

@jorgenfj jorgenfj left a comment

Choose a reason for hiding this comment

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

LGTM!

Maybe add simulator tests for both solvers. This way it is easier to pinpoint if one specific solver is the cause of potential failures.

@Q3rkses Q3rkses merged commit 4fba8ee into main Mar 21, 2026
14 checks passed
@Q3rkses Q3rkses deleted the 580-task-Thrust-Allocator-AUV branch March 21, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task & Research] Thrust allocation / interface for new drone

4 participants