Skip to content

Conversation

@jorgenfj
Copy link
Contributor

@jorgenfj jorgenfj commented Jan 6, 2026

Pose filtering ros package plus track manager library.
Mainly used for testing and development.
Intended use case is to have the landmark server include the library and do the landmark filtering

@jorgenfj jorgenfj self-assigned this Jan 6, 2026
@codecov
Copy link

codecov bot commented Jan 6, 2026

Codecov Report

❌ Patch coverage is 44.41748% with 229 lines in your changes missing coverage. Please review.
✅ Project coverage is 36.99%. Comparing base (24b00d6) to head (4072a26).

Files with missing lines Patch % Lines
...ring/pose_filtering/src/ros/pose_filtering_ros.cpp 0.00% 110 Missing ⚠️
...ltering/src/ros/pose_filtering_ros_conversions.cpp 0.00% 40 Missing ⚠️
...ose_filtering/src/ros/pose_filtering_ros_debug.cpp 0.00% 40 Missing ⚠️
...tering/pose_filtering/test/test_pose_filtering.cpp 78.16% 2 Missing and 17 partials ⚠️
...ring/pose_filtering/src/lib/orientation_filter.cpp 72.50% 8 Missing and 3 partials ⚠️
...ring/pose_filtering/src/lib/pose_track_manager.cpp 95.40% 1 Missing and 3 partials ⚠️
..._filtering/include/pose_filtering/lib/typedefs.hpp 40.00% 3 Missing ⚠️
.../pose_action_server/src/pose_action_server_ros.cpp 0.00% 1 Missing ⚠️
.../include/pose_filtering/ros/pose_filtering_ros.hpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #655      +/-   ##
==========================================
+ Coverage   35.58%   36.99%   +1.41%     
==========================================
  Files          38       47       +9     
  Lines        2254     2665     +411     
  Branches      686      822     +136     
==========================================
+ Hits          802      986     +184     
- Misses       1273     1477     +204     
- Partials      179      202      +23     
Flag Coverage Δ
unittests 36.99% <44.41%> (+1.41%) ⬆️

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

Files with missing lines Coverage Δ
.../include/pose_filtering/lib/pose_track_manager.hpp 100.00% <100.00%> (ø)
.../pose_action_server/src/pose_action_server_ros.cpp 0.00% <0.00%> (ø)
.../include/pose_filtering/ros/pose_filtering_ros.hpp 0.00% <0.00%> (ø)
..._filtering/include/pose_filtering/lib/typedefs.hpp 40.00% <40.00%> (ø)
...ring/pose_filtering/src/lib/pose_track_manager.cpp 95.40% <95.40%> (ø)
...ring/pose_filtering/src/lib/orientation_filter.cpp 72.50% <72.50%> (ø)
...tering/pose_filtering/test/test_pose_filtering.cpp 78.16% <78.16%> (ø)
...ltering/src/ros/pose_filtering_ros_conversions.cpp 0.00% <0.00%> (ø)
...ose_filtering/src/ros/pose_filtering_ros_debug.cpp 0.00% <0.00%> (ø)
...ring/pose_filtering/src/ros/pose_filtering_ros.cpp 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@Andeshog Andeshog left a comment

Choose a reason for hiding this comment

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

part1

Comment on lines +3 to +5
pose_sub_topic: "/aruco_detector/board"
pose_array_pub_topic: "/filtered_pose_array"
landmark_pub_topic: "/filtered_landmarks"
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason these topics are not part of the topic list in orca.yaml, like the rest of the packages in vortex-auv?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This package is not supposed to be used in production. Only for tuning/testing and debugging. The plan is to have the landmark server import the /lib part of this package. So this package will mainly be used to tune for various different obejcts etc.

Comment on lines 49 to 53
/**
* @brief Get the list of currently maintained tracks.
* @return const reference to internal track vector
*/
const std::vector<Track>& get_tracks() { return tracks_; }
Copy link
Contributor

Choose a reason for hiding this comment

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

Would also add const at the end to signal that the function does not modify

const std::vector<Track>& get_tracks() const;

Comment on lines 121 to 122
// Internal bookkeeping
int track_id_counter_ = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

Would use brace init for consistency

Comment on lines 80 to 82
void setup_debug_publishers();
void publish_meas_debug();
void publish_state_debug();
Copy link
Contributor

Choose a reason for hiding this comment

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

picky, but nice to group methods/member variables

Comment on lines 21 to 22
output='screen',
parameters=[config, {'use_sim_time': True}],
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is use_sim_time default to true? Do we even have a \clock topic in sim?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just used this for testing with a rosbag and then tf2 is very quick to complain about timestamps. I can add a comment explaining its use case

Comment on lines 22 to 23

Eigen::Matrix<double, 3, Eigen::Dynamic> Z(3, measurements.size());
Copy link
Contributor

Choose a reason for hiding this comment

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

Z? Perhaps a more descriptive name? 😅

Comment on lines 43 to 51
if (q.w() < 0.0) {
q.coeffs() *= -1.0;
}

double norm_v = q.vec().norm();

if (norm_v < 1e-6) {
return 2.0 * q.vec();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

for these "magic operations" maybe a comment would be nice

Comment on lines +14 to +18
initial_position_std_ = config.initial_position_std;
initial_orientation_std_ = config.initial_orientation_std;
ipda_config_ = config.ipda;
existence_config_ = config.existence;
max_angle_gate_threshold_ = config.max_angle_gate_threshold;
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps have the config as a member instead of the individual fields?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it might become more cluttered if i do that as the code is now. The most structured solution would probably be to refactor and separate out a position filter similar to the orientation filter class. I will work on that later if I have time.

I should probably add some dynamic reconfiguration of ros parameters to aid in the tuning process and that might reveal a more intuitive struct setup.

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.

3 participants