Skip to content

Error state kalman filter - #564

Closed
Talhanc wants to merge 23 commits into
mainfrom
feeterror-state-kalman-filter
Closed

Talhanc wants to merge 23 commits into
mainfrom
feeterror-state-kalman-filter

Conversation

@Talhanc

@Talhanc Talhanc commented Apr 3, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@Talhanc Talhanc linked an issue Apr 3, 2025 that may be closed by this pull request
3 tasks
@Talhanc
Talhanc marked this pull request as draft April 3, 2025 17:21
@codecov

codecov Bot commented Apr 3, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 0% with 258 lines in your changes missing coverage. Please review.

Project coverage is 5.89%. Comparing base (00b09ea) to head (ea29da3).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
navigation/eskf/src/eskf.cpp 0.00% 134 Missing ⚠️
navigation/eskf/src/eskf_ros.cpp 0.00% 81 Missing ⚠️
navigation/eskf/src/eskf_utils.cpp 0.00% 20 Missing ⚠️
navigation/eskf/include/eskf/typedefs.hpp 0.00% 17 Missing ⚠️
navigation/eskf/src/eskf_node.cpp 0.00% 6 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            main    #564      +/-   ##
========================================
- Coverage   6.61%   5.89%   -0.72%     
========================================
  Files         37      42       +5     
  Lines       2117    2375     +258     
  Branches      50      52       +2     
========================================
  Hits         140     140              
- Misses      1977    2235     +258     
Flag Coverage Δ
unittests 5.89% <0.00%> (-0.72%) ⬇️

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

Files with missing lines Coverage Δ
navigation/eskf/src/eskf_node.cpp 0.00% <0.00%> (ø)
navigation/eskf/include/eskf/typedefs.hpp 0.00% <0.00%> (ø)
navigation/eskf/src/eskf_utils.cpp 0.00% <0.00%> (ø)
navigation/eskf/src/eskf_ros.cpp 0.00% <0.00%> (ø)
navigation/eskf/src/eskf.cpp 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Andeshog
Andeshog requested a review from Copilot April 4, 2025 06:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot reviewed 16 out of 18 changed files in this pull request and generated 2 comments.

Files not reviewed (2)
  • navigation/eskf/CMakeLists.txt: Language not supported
  • navigation/eskf/package.xml: Language not supported

Comment thread navigation/eskf/include/eskf/eskf.hpp

@jorgenfj jorgenfj 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.

Would be nice if odom is pubilshed in body(base_link) fame accompanied by a dynamic tf2 transform from odom to base_link.

Comment thread navigation/eskf/src/eskf_ros.cpp Outdated
Comment thread navigation/eskf/src/eskf_ros.cpp

void correct() {
Eigen::Matrix3d R_nb;
R_nb << 0, 0, -1, 0, -1, 0, -1, 0, 0;

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 expose this rotation as ros params for when the dvl mount is altered

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

There is still some issue here, but yes that is the goal

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

*s

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Im still fighting for "Set the frame assumptions internally and correct on the outside" - I.e. use TF2 on the ros side.

The TLDR is: You will fuck up transforms when rolling it yourself, so better let TF handle it and just make sure to use it properly

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.

^
Set transforms internally for standalone application.
Use ros defined transforms when used with the rest of the autonomy system. The cleanest way to do this imo is to include a boolean flag if ros transforms are to be used.
Instead of defining the ros transformations in the config file, just define the name of the frames. Then in the ros constructor you lookup these transformations using TF2. This way we avoid defining the same frame multiple places and keep the frame definitions in a centralized place (orca description).

This means stalling execution until the frames are available, but this is acceptable.

Comment thread navigation/eskf/CMakeLists.txt
Comment thread navigation/eskf/src/eskf_node.cpp
Comment thread navigation/eskf/src/eskf_ros.cpp Outdated
@kluge7 kluge7 changed the title Feeterror state kalman filter Error state kalman filter Apr 5, 2025
Comment thread navigation/eskf/src/eskf.cpp Outdated
Comment on lines +20 to +25

// @brief Update the nominal state and error state
// @param dvl_meas: DVL measurement
// @return Updated nominal state and error state
std::pair<state_quat, state_euler> dvl_update(
const dvl_measurement& dvl_meas);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We talked about generalizing away specific sensors for any update methods - is that still a go?

I think it would be really nice to write the eskf as a library, and have the user provide the spec for whatever sensor they bring.

You could call it PO, but having seen how many kalman filters have been written over the years, it would be really clean to have this be the go-to solution for years to come 🙏

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah, its the end goal, just making it work properly for the thesis now, but will be the next step before merge :)

@chrstrom

chrstrom commented May 8, 2025

Copy link
Copy Markdown
Member

image

@Talhanc
Talhanc force-pushed the feeterror-state-kalman-filter branch from d8de3a7 to dd0f97a Compare May 13, 2025 22:01
@Andeshog

Copy link
Copy Markdown
Contributor

Before merge, make a simulator test (could be just to start up the node in the ros environment and make sure the output is sufficiently good compared to ground truth, for instance) and add it in this list

@vortexntnu vortexntnu deleted a comment from Copilot AI Oct 5, 2025
@vortexntnu vortexntnu deleted a comment from Copilot AI Oct 5, 2025
@Talhanc Talhanc closed this Oct 5, 2025
@Andeshog
Andeshog deleted the feeterror-state-kalman-filter branch October 8, 2025 16:19
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.

[TASK] Implement ESKF for sensor fusion of DVL and IMU

5 participants