Skip to content
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

Unscented Kalman Filter in python #1411

Merged
merged 19 commits into from
Jun 11, 2024
Merged

Conversation

rolalaro
Copy link

@rolalaro rolalaro commented May 22, 2024

  • Added the non-linear complex example in Python
  • Added the examples in Python documentation
  • Predict can now be called several times in a row
  • Fix documentation

Copy link

codecov bot commented May 22, 2024

Codecov Report

Attention: Patch coverage is 5.88235% with 16 lines in your changes missing coverage. Please review.

Project coverage is 44.44%. Comparing base (f95b137) to head (20cf165).
Report is 20 commits behind head on master.

Current head 20cf165 differs from pull request most recent head 39c3954

Please upload reports for the commit 39c3954 to get more accurate results.

Files Patch % Lines
modules/core/src/math/kalman/vpUnscentedKalman.cpp 0.00% 11 Missing ⚠️
modules/core/src/math/matrix/vpMatrix_cholesky.cpp 25.00% 3 Missing ⚠️
example/kalman/ukf-nonlinear-complex-example.cpp 0.00% 1 Missing ⚠️
...les/core/include/visp3/core/vpUKSigmaDrawerMerwe.h 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1411      +/-   ##
==========================================
- Coverage   45.55%   44.44%   -1.12%     
==========================================
  Files        1082     1082              
  Lines      109238   109248      +10     
  Branches    18658    18675      +17     
==========================================
- Hits        49767    48552    -1215     
- Misses      59471    60696    +1225     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

modules/python/examples/ukf-nonlinear-complex-example.py Outdated Show resolved Hide resolved
modules/python/examples/ukf-nonlinear-complex-example.py Outdated Show resolved Hide resolved
modules/python/examples/ukf-nonlinear-complex-example.py Outdated Show resolved Hide resolved
modules/python/examples/ukf-nonlinear-complex-example.py Outdated Show resolved Hide resolved
modules/python/examples/ukf-nonlinear-complex-example.py Outdated Show resolved Hide resolved
modules/python/examples/ukf-nonlinear-complex-example.py Outdated Show resolved Hide resolved
modules/python/examples/ukf-nonlinear-complex-example.py Outdated Show resolved Hide resolved
modules/python/examples/ukf-nonlinear-complex-example.py Outdated Show resolved Hide resolved
modules/python/examples/ukf-nonlinear-complex-example.py Outdated Show resolved Hide resolved
@rolalaro rolalaro requested a review from SamFlt May 29, 2024 12:01
Copy link
Contributor

@SamFlt SamFlt left a comment

Choose a reason for hiding this comment

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

Looks great! a few remaining things but nothing big ;)

for j in range(nbLandmarks):
mean[(2*j)+1] = np.arctan2(sumSin[j], sumCos[j])
orientations = np.arctan2(sumSin, sumCos)
mean[1::2] = orientations[0::1]
Copy link
Contributor

Choose a reason for hiding this comment

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

you can omit the [0::1]: this is the default behavior (start from, iterate until the end with a step of one)

such as v[0] = dist_0 ; v[1] = bearing_0; v[2] = dist_1 ; v[3] = bearing_1 ...

@param[in] meas Measurement to which we must substract something.
@param[in] toSubstract The something we must substract.
:param meas Measurement to which we must substract something.
Copy link
Contributor

Choose a reason for hiding this comment

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

should be :param meas:

"""
@brief Compute the commands realinp.sing a turn at constant linear velocity.
Compute the commands realinp.sing a turn at constant linear velocity.
Copy link
Contributor

Choose a reason for hiding this comment

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

should be realising ;)

@fspindle fspindle merged commit 4ab566c into lagadic:master Jun 11, 2024
71 of 72 checks passed
@rolalaro rolalaro deleted the feat_ukf_python branch June 13, 2024 08:51
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