Giter Site home page Giter Site logo

The question of head file "csv_reader.hpp" and member function "void EKF::updateJA(const double dt)" in the class of ekf about gps_imu_kalman_filter HOT 7 CLOSED

karanchawla avatar karanchawla commented on July 22, 2024
The question of head file "csv_reader.hpp" and member function "void EKF::updateJA(const double dt)" in the class of ekf

from gps_imu_kalman_filter.

Comments (7)

liyuebit avatar liyuebit commented on July 22, 2024

Hello,
Have you solved your problem?

from gps_imu_kalman_filter.

863217373 avatar 863217373 commented on July 22, 2024

No

from gps_imu_kalman_filter.

karanchawla avatar karanchawla commented on July 22, 2024

Will push a fix by tonight. It's basically the jacobian of the matrix.

from gps_imu_kalman_filter.

karanchawla avatar karanchawla commented on July 22, 2024

Apologies for the delay,

here's how you can compute the jacobian of the dynamic matrix A

# Calculate the Jacobian of the Dynamic Matrix A
    # see "Calculate the Jacobian of the Dynamic Matrix with respect to the state vector"
    a13 = float((x[3]/x[4]) * (np.cos(x[4]*dt+x[2]) - np.cos(x[2])))
    a14 = float((1.0/x[4]) * (np.sin(x[4]*dt+x[2]) - np.sin(x[2])))
    a15 = float((dt*x[3]/x[4])*np.cos(x[4]*dt+x[2]) - (x[3]/x[4]**2)*(np.sin(x[4]*dt+x[2]) - np.sin(x[2])))
    a23 = float((x[3]/x[4]) * (np.sin(x[4]*dt+x[2]) - np.sin(x[2])))
    a24 = float((1.0/x[4]) * (-np.cos(x[4]*dt+x[2]) + np.cos(x[2])))
    a25 = float((dt*x[3]/x[4])*np.sin(x[4]*dt+x[2]) - (x[3]/x[4]**2)*(-np.cos(x[4]*dt+x[2]) + np.cos(x[2])))
    JA = np.matrix([[1.0, 0.0, a13, a14, a15, 0.0],
                    [0.0, 1.0, a23, a24, a25, 0.0],
                    [0.0, 0.0, 1.0, 0.0, dt, 0.0],
                    [0.0, 0.0, 0.0, 1.0, 0.0, dt],
                    [0.0, 0.0, 0.0, 0.0, 1.0, 0.0],
                    [0.0, 0.0, 0.0, 0.0, 0.0, 1.0]])

This is a python implementation. So, you'll have to convert it to C++

This is based off of work from @balzer82.

from gps_imu_kalman_filter.

HandsomeDragon3 avatar HandsomeDragon3 commented on July 22, 2024

There might be a mistake that you wrote" const double r13 = turn_radius * (-cos(dt * psi_dot) + psi);" in utils.cpp

from gps_imu_kalman_filter.

balzer82 avatar balzer82 commented on July 22, 2024

@karanchawla Would be nice, if you mention the Author of this code snipped, because I released it under CC-BY 2.0 License.

from gps_imu_kalman_filter.

karanchawla avatar karanchawla commented on July 22, 2024

Definitely. Apologies for not doing that. Will add it to the Readme as well.

from gps_imu_kalman_filter.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.