Skip to content

reference filter mode dependant pose convergence#664

Merged
jorgenfj merged 4 commits into
mainfrom
feat/reference-filter-pose-convergence
Feb 18, 2026
Merged

reference filter mode dependant pose convergence#664
jorgenfj merged 4 commits into
mainfrom
feat/reference-filter-pose-convergence

Conversation

@jorgenfj

@jorgenfj jorgenfj commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

Converted the convergence check to use current pose instead of x_.
Also mode the convergence logic mode dependant

@jorgenfj jorgenfj requested review from Andeshog and Q3rkses February 2, 2026 19:50
@codecov

codecov Bot commented Feb 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 65.11628% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 35.44%. Comparing base (5dce04d) to head (bc25184).
⚠️ Report is 58 commits behind head on main.

Files with missing lines Patch % Lines
...e/reference_filter_dp/src/reference_filter_ros.cpp 66.66% 11 Missing and 3 partials ⚠️
...sion/waypoint_manager/src/waypoint_manager_ros.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #664      +/-   ##
==========================================
+ Coverage   34.64%   35.44%   +0.80%     
==========================================
  Files          43       43              
  Lines        2823     2835      +12     
  Branches      749      757       +8     
==========================================
+ Hits          978     1005      +27     
+ Misses       1663     1647      -16     
- Partials      182      183       +1     
Flag Coverage Δ
unittests 35.44% <65.11%> (+0.80%) ⬆️

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

Files with missing lines Coverage Δ
...sion/waypoint_manager/src/waypoint_manager_ros.cpp 50.73% <0.00%> (-0.75%) ⬇️
...e/reference_filter_dp/src/reference_filter_ros.cpp 72.87% <66.66%> (+8.46%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment on lines +298 to +308
bool ReferenceFilterNode::has_converged_against_pose(
const Eigen::Vector6d& y,
const Eigen::Vector6d& r,
uint8_t mode,
double convergence_threshold) const {
const Eigen::Vector3d ep = y.head<3>() - r.head<3>();

const auto& p = current_pose_.pose.pose.position;
const auto& o = current_pose_.pose.pose.orientation;
Eigen::Vector3d ea;
ea(0) = vortex::utils::math::ssa(y(3) - r(3));
ea(1) = vortex::utils::math::ssa(y(4) - r(4));
ea(2) = vortex::utils::math::ssa(y(5) - r(5));

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.

The variable naming was already bad in this package, but you arent really contributing here 😆

Comment on lines +218 to +220
Eigen::Vector6d y;
y << p.x, p.y, p.z, vortex::utils::math::ssa(euler(0)),
vortex::utils::math::ssa(euler(1)), vortex::utils::math::ssa(euler(2));

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.

Could also construct it in one go

using vortex::utils::math::ssa;
Eigen::Vector6d y{p.x, p.y, p.z, ssa(euler(0)), ssa(euler(1)), ssa(euler(2)));

Comment on lines +298 to +302
bool ReferenceFilterNode::has_converged_against_pose(
const Eigen::Vector6d& y,
const Eigen::Vector6d& r,
uint8_t mode,
double convergence_threshold) const {

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.

Could you be explicit and take mode as Enum? Requires a conversion between ros msg and enum, but thats no problem

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.

Recently came across cppyy, which allows you to run c++ code in python. You may find that interesting

@Andeshog Andeshog left a comment

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.

lgtm

@jorgenfj jorgenfj merged commit 1ae24c2 into main Feb 18, 2026
18 of 19 checks passed
@jorgenfj jorgenfj deleted the feat/reference-filter-pose-convergence branch February 18, 2026 14:15
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.6.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@jorgenfj jorgenfj restored the feat/reference-filter-pose-convergence branch February 23, 2026 17:35
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.

2 participants