Coder Social home page Coder Social logo

mycodebits / term2-udacity-carnd-unscented-kalman-filter-project Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 3.03 MB

Implementing the Unscented Kalman filter in C++ for Self Driving cars.

CMake 0.22% Shell 0.02% C++ 98.55% C 1.21%
cars cpp driving filter kalman lidar radar rmse self simulator ukf unscented

term2-udacity-carnd-unscented-kalman-filter-project's People

Contributors

mycodebits avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

lpervi

term2-udacity-carnd-unscented-kalman-filter-project's Issues

Initialization of variable "is_initialized_" missing

Good job on this project !
But current release seem to have a bug: is_initialized_ variable should be initialized to false at the beginning of the UKF() creator. Something like this:

// if this is false, the UKF needs to be initialized (first step)
is_initialized_ = false;

Proper initialization of UKF state vector when using radar measurements

Initialization of state vector when using radar measurements seems to mess up from different angles: phi and yaw.
Notice that the following assignations are not correct:

        yaw = phi;
        double v = meas_package.raw_measurements_[2];

Since yaw is unknown during initialization, the following initialization is proposed:

void UKF::ProcessMeasurement(MeasurementPackage meas_package) {
if (!is_initialized_) {
// Switch between lidar and radar
if (meas_package.sensor_type_ == MeasurementPackage::RADAR) {

        double rho = meas_package.raw_measurements_[0];
        double phi = meas_package.raw_measurements_[1];
        double rhor = meas_package.raw_measurements_[2];
        double px = rho * cos(phi);
        double py = rho * sin(phi);
        double phir = 0.0;
        // Following is only true if phir = 0.0. This is a reasonable assumption during initialization
        // Note that yaw is not yet known.
        double vx = rhor * cos(phi);
        double vy = rhor * sin(phi);
        double yawd = 0.0;

        x_ << px, py, sqrt(vx * vx + vy * vy), atan2(vy, vx), yawd;

    } else if (meas_package.sensor_type_ == MeasurementPackage::LASER) {
         (...)
    }

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.