CppMonk
CppMonk
  • 8
  • 195 351
C++ Smart Pointers - Do I really need them? When?
Second part of Ownership and Argument Passing in C++. Here we look at cases when smart pointers become very useful and explore unique_ptr and shared_ptr.
Part 1: th-cam.com/video/LvHr2Wb0dDY/w-d-xo.html
Contents:
00:00 Intro
00:35 Motivational example
03:10 What's the issue?
04:40 Why this limitation?
07:52 By-Ref won't work
10:18 Issues with raw pointers
14:50 Use smart pointers!
16:04 unique_ptr to the rescue
24:21 make_unique is handy
25:18 When to use shared_ptr
มุมมอง: 8 801

วีดีโอ

C++ Fundamentals: Argument Passing and Ownership - Part 1
มุมมอง 2.2K4 ปีที่แล้ว
What's the difference between pass-by-value and pass-by-reference in C ? How does that link with ownership? Code: github.com/cbecker/ownership-cpp
Kalman Filter in C++ (and Pybind11) [Part 3C, Understand & Code a Kalman Filter]
มุมมอง 6K5 ปีที่แล้ว
Let's translate the functionality from Python to C . 00:00 Intro 01:02 KF Constructor 07:13 KF Predict 11:31 KF Update / Measurement 16:04 Adding more robust tests 19:25 Fixing a bug discovered by the new tests 21:09 Wrap up Playlist: th-cam.com/play/PLvKAPIGzFEr8n7WRx8RptZmC1rXeTzYtA.html Code: github.com/cbecker/kalman_python_cpp
Python Wrappers for C++ with Pybind11 [Part 3B, Understand & Code a Kalman Filter]
มุมมอง 7K5 ปีที่แล้ว
Let's prepare the python wrappers so we can run tests from python. 00:00 Intro 01:30 Parametrized tests in Python 05:22 Code the C Skeleton for the KF 10:25 Wrap a C class for Python 11:54 Wrap properties in C 14:09 Eigen - Numpy integration in pybind11 15:06 Make the python tests check the C class 17:55 Fixing named argument issues 18:51 Wrap up Playlist: th-cam.com/play/PLvKAPIGzFEr8n7WRx8Rpt...
Setting up CMake, Pybind11 and QtCreator [Part 3A, Understand & Code a Kalman Filter]
มุมมอง 10K5 ปีที่แล้ว
Let's implement a Kalman Filter for tracking in C ! This is the first part, check the playlist below for the rest. Playlist: th-cam.com/play/PLvKAPIGzFEr8n7WRx8RptZmC1rXeTzYtA.html Code: github.com/cbecker/kalman_python_cpp
Understand & Code a Kalman Filter [Part 2, Python]
มุมมอง 56K5 ปีที่แล้ว
Let's implement a Kalman Filter for tracking in Python. 00:00 Intro 00:09 Set up virtualenv and dependencies 01:40 First KF class 04:16 Adding tests with unittest and pytest 08:44 Using type annotations 09:25 Implement predict() 21:00 Plotting and interpreting mean and uncertainties 28:30 Implement update() 34:27 Plotting dynamics between predict() and update() steps 43:14 Robustifying the code...
Understand & Code a Kalman Filter [Part 1 Design]
มุมมอง 75K5 ปีที่แล้ว
Let's design a Kalman Filter for tracking. Playlist: th-cam.com/play/PLvKAPIGzFEr8n7WRx8RptZmC1rXeTzYtA.html 00:00 Intro and problem definition 01:59 State vector 02:58 Time evolution, constant acceleration model 07:03 Measurement update 08:09 Putting it all together into the KF formulas
Understand & Code a Kalman Filter in Python and C++ [Intro]
มุมมอง 29K5 ปีที่แล้ว
This is the intro video to design and code a Kalman Filter from scratch. In the follow up videos we design and code the Kalman Filter in Python and C , including tests. Playlist: th-cam.com/play/PLvKAPIGzFEr8n7WRx8RptZmC1rXeTzYtA.html

ความคิดเห็น

  • @rumaadhikary185
    @rumaadhikary185 หลายเดือนก่อน

    Great work I will try🎉

  • @tariqahassan5692
    @tariqahassan5692 7 หลายเดือนก่อน

    I do not know whether you are teaching or learning Python code ???

  • @jairam2788
    @jairam2788 9 หลายเดือนก่อน

    Which literature is good to study kalman filter

  • @diodin8587
    @diodin8587 10 หลายเดือนก่อน

    have you considered the memory layout issue between Eigen and Numpy?

  • @shaheedchikkumbi1902
    @shaheedchikkumbi1902 ปีที่แล้ว

    Why have you used Q= G × G^t × a; and taken R=meas_variance

  • @jacobjonm0511
    @jacobjonm0511 ปีที่แล้ว

    I found this video to be more helpful on the pybind side. Greate work!

  • @code2compass
    @code2compass ปีที่แล้ว

    this is indeed a very good tutorial. However, I would like to know about the steps for designing a kalman filter let's say for natural phenomenon like ionosphere changes, etc how should we design a state space vector for this? Can you please make a detailed video on how to implement a kalman filter for GPS and INS integration in Python?

  • @bearship9
    @bearship9 ปีที่แล้ว

    This is so good! Helped me a lot to comprehend it.

  • @PTNLemay
    @PTNLemay ปีที่แล้ว

    38:05 When you say "As we make measurements..." where in the code is the measurement located exactly? For example, suppose I wanted to implement a code similar to this on a real robot car. And the measurements would be provided by a sensor, rather than being purely simulated like they are here. Where would I go in the code to insert the data from my sensor? I know it's something in the Predict/Update function of the KF class, but I'm not sure where exactly.

  • @KetevaniDzebniauri-fo4pq
    @KetevaniDzebniauri-fo4pq ปีที่แล้ว

    Hey Cool video Can you help me to write code for 2d object tracking Kalman filter

  • @PTNLemay
    @PTNLemay ปีที่แล้ว

    It's funny, keeping the errors in sort of helps with the learning process. You're forced to go back and go "Oh that's why this needs to be like this, or it just doesn't work".

  • @harryshuman9637
    @harryshuman9637 2 ปีที่แล้ว

    If you have 3 state system (position, velocity, acceleration), can you just integrate the G function into F ?

    • @krishnareddy5589
      @krishnareddy5589 10 หลายเดือนก่อน

      Acceleration will be a input variable, i think we can't take it as state variable

    • @MesutBahtiyar61
      @MesutBahtiyar61 2 หลายเดือนก่อน

      @@krishnareddy5589 You can, and you then use jerk as the input variable. Jerk is the time derivative of acceleration.

  • @KasimKhan-lk4sw
    @KasimKhan-lk4sw 2 ปีที่แล้ว

    bit hard to understand for new comers because sometimes you just trying something and messed it with the main code or whatever ...so if you could upload a revised version of the same video would be highly beneficial for the students like me..thanks

    • @cppmonk3731
      @cppmonk3731 2 ปีที่แล้ว

      I tried to be as honest as possible and show that making mistakes is ok, it is partially on purpose. I'm sorry to hear you find it confusing. You can skip those parts or make the video faster. Thanks for your comment!

  • @igorgk1573
    @igorgk1573 2 ปีที่แล้ว

    Very useful 👍 like your programming style, wish you had some course about such things 😀

  • @marcosandreuoliva2318
    @marcosandreuoliva2318 2 ปีที่แล้ว

    Awesome video! Thanks!

  • @openedx121
    @openedx121 2 ปีที่แล้ว

    Thanks very much for these wonderful videos. Certainly there must be a performance upgrade with C++ implementations, but I was wondering if you could address it as well. Thanks.

  • @makelebanon1
    @makelebanon1 2 ปีที่แล้ว

    python is such an aweful language, what do you think?

  • @sneezydanger
    @sneezydanger 2 ปีที่แล้ว

    Amazing insightful and helpful video. I came for a kalman implementation example in code, but I learned much more on the way. Thanks for making these from a impressed engineering student.

  • @zenianggara4958
    @zenianggara4958 2 ปีที่แล้ว

    Hello sir, can this code be implemented in real-time conditions?

  • @etclee6630
    @etclee6630 2 ปีที่แล้ว

    so cool!

  • @mamo2652
    @mamo2652 3 ปีที่แล้ว

    great work , can you also make videos on EKF , UKF , that would be beneficial

  • @mshirazbaig6055
    @mshirazbaig6055 3 ปีที่แล้ว

    I think, its presentation could be improved.

    • @samirelzein1095
      @samirelzein1095 3 ปีที่แล้ว

      waiting for your video on Kalman

  • @IshyMimic
    @IshyMimic 3 ปีที่แล้ว

    Thanks so much for the video, helped me create a Kalman filter for my research project.

  • @petrasvestartas4359
    @petrasvestartas4359 3 ปีที่แล้ว

    Work well also on windows: 1. Create CMakeLists.txt 2. mkdir build 3. cd build 4. cmake .. 5. cmake --build . --config Release 6. cd Release 7. ls If you are using vs code and cannot run python for command line, you can try this: import sys folder = "C:/IBOIS57/_Code/Software/Python/cpp/build/Release/" if folder not in sys.path: sys.path.append(folder) import kf_cpp addition = kf_cpp.add(1, 2) print(addition)

    • @niflag
      @niflag ปีที่แล้ว

      Why do you have to specify Release? Does it work the same with Debug? GDAL python bindings are broken now.

  • @samirelzein1978
    @samirelzein1978 3 ปีที่แล้ว

    What i dont like about Kalman filter, is that it doesn't diagonalize a matrix and I believe any powerful solution should include eigen vectors.

  • @scottnortman
    @scottnortman 3 ปีที่แล้ว

    Thank you for a great video! You made a comment that P = (I-KH) * P has a better form'? Can you please elaborate?

  • @kaushikramabhotla4635
    @kaushikramabhotla4635 3 ปีที่แล้ว

    running pytest is giving me this error : from kf import KF kf.py:1: in <module> import numpy as np E ImportError: No module named numpy I have installed numpy already

  • @medelkouache
    @medelkouache 3 ปีที่แล้ว

    Thank you very very much ! 49min was for me a few minutes . At each step, as soon as I ask myself you answer me. For an ather time Thanks a lot

  • @darioniermann9473
    @darioniermann9473 3 ปีที่แล้ว

    Very good programming practice and explanations! I program every day in python and still learned new stuff from you other than kalman specifics!

  • @belldanime
    @belldanime 3 ปีที่แล้ว

    At 11:44 , do you mean to say the inverse?

    • @cppmonk3731
      @cppmonk3731 3 ปีที่แล้ว

      yes you are right, a speech typo ;) The equation is ok, it is the inverse. thanks for letting me know.

    • @agarvipul
      @agarvipul ปีที่แล้ว

      @@cppmonk3731 :)

  • @mohamedradwan388
    @mohamedradwan388 3 ปีที่แล้ว

    The By Ref example works with my microsoft visual studio compiler. and I am not sure anyway why it should not. why is the struct re-used? the function is invoked with three different parameters, and I suppose each has a different memory location, right?

  • @charlesfleetwood3914
    @charlesfleetwood3914 3 ปีที่แล้ว

    Thank you very useful video.

  • @vasylcf
    @vasylcf 3 ปีที่แล้ว

    Thanks for this clear explanation!

  • @hectorcasanueva
    @hectorcasanueva 4 ปีที่แล้ว

    Hi! If I would like to implement this code to forecast temperature (for example). So, my data will be historical registers of temp. Could I apply this code? What should I change in the code? Thank you!

    • @cppmonk3731
      @cppmonk3731 4 ปีที่แล้ว

      Hi! It will depend on your assumptions on historical data. I would rather say not that you can apply the same code, but instead that you derive the dynamics of the process you are observing and use that to then implement a similar piece of code. Also, for forecasting have a look at Gaussian Processes, that have a connection to Kalman Filters but provide a few more advantages (and also usually higher computational cost, but will depend on your application)

  • @vahidnateghi9862
    @vahidnateghi9862 4 ปีที่แล้ว

    Thanks a lot you sir! I have tried so many Cpp extension methods but just this one worked for me.

  • @wahsmail
    @wahsmail 4 ปีที่แล้ว

    Very informative, good notation, thank you!

  • @ЛеняКостин-ю4ъ
    @ЛеняКостин-ю4ъ 4 ปีที่แล้ว

    If we have acce1eration, then we shou1d write newX= F*m_mean +G*m_accelvariance; in 29 string?

  • @bigbadwolf4075
    @bigbadwolf4075 4 ปีที่แล้ว

    Can someone explain as to what is the purpose of using the determinant of a covariance matrix? Also I didn't understand the concept of plotting self.x+-2*np.sqrt(self.p)

  • @adityaadmane4493
    @adityaadmane4493 4 ปีที่แล้ว

    I have a silly doubt, Which command prompt is used to create virtual environment and opening visual studio.

  • @MartianArrow
    @MartianArrow 4 ปีที่แล้ว

    Learned many things from a single tutorial on Kalman Filter. Thank you. I second Ronaldo Nogueira's comment, requesting another video on extended Kalman filter with C++.

  • @elghark
    @elghark 4 ปีที่แล้ว

    minute 7:44 .Could you please explain what coefficient "0" belongs to? Thanks

    • @cppmonk3731
      @cppmonk3731 4 ปีที่แล้ว

      you mean in [1 0]? because we want zk = xk, but xk_vec = [xk, vk], so we need to multply that by [1 0] to get only xk. I hope that makes sense, it's not easy to do math on youtube :)

    • @elghark
      @elghark 4 ปีที่แล้ว

      @@cppmonk3731 thanks, yes it makes sense

  • @hezhao8422
    @hezhao8422 4 ปีที่แล้ว

    Thanks for sharing. May I ask: why your state predict() step does not have the process noise?

    • @cppmonk3731
      @cppmonk3731 4 ปีที่แล้ว

      I though it'd be simpler to keep it to zero for this example, though you make a good point: it's something that is very relevant in practice.

  • @MrAnandml
    @MrAnandml 4 ปีที่แล้ว

    This is some great content. .

  • @ronoguern
    @ronoguern 4 ปีที่แล้ว

    Thank you! This playlist helped me a lot. I would appreciate it if I made the extended Kalman filter.

  • @ronoguern
    @ronoguern 4 ปีที่แล้ว

    Great playlist! Thanks!!!

  • @roxferesr
    @roxferesr 4 ปีที่แล้ว

    Loved this explanation! thanks for the clear examples, they made shared_ptr finally clicked for me. I have one question though, I've seen people passing shared_ptr by reference '&'. When is appropiate to do that, and why would you want to in the first place

  • @harunsalman1199
    @harunsalman1199 4 ปีที่แล้ว

    This is really an excellent tutorial. But I couldnt follow on the further sections due to below issues: When I try editing the CMakeLists.txt I dont get the functions highlighted. Also when I created the wrappers.cpp I get: #include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (/home/user/kalman/cpp/wrappers.cpp).C/C++(1696) cannot open source file "Python.h" (dependency of "pybind11/pybind11.h")C/C++(1696) Therefore I couldnt build the project. Would you have ideas how I can find whats missing?

  • @diegoosorio3491
    @diegoosorio3491 4 ปีที่แล้ว

    OMG your tutorials are further more than Kalyan filters. This was a tutorial where I also learned unittest! Thank you!

    • @cppmonk3731
      @cppmonk3731 4 ปีที่แล้ว

      I'm very happy to hear that, thanks for your feedback!

  • @adrian-w3h2c
    @adrian-w3h2c 4 ปีที่แล้ว

    Thank you, this was very helpful!

  • @Користувач-ю2э
    @Користувач-ю2э 4 ปีที่แล้ว

    Good video) thanks!