Johannes Spielmann
Johannes Spielmann
  • 4
  • 11 700
Controlling a spaceship with your code: a simple PID controller from the ground up in python
This time, we're going to play a simple spaceship game: park the ship in the center. In fact, we're going to play the game so well that we will write a program to play for us. That program is going to implement a PID controller to efficiently and easily park the spaceship for us. PID controllers are one of the most well-used techniques in control theory and are everywhere, from car cruise controls, over ship and plane autopilots to industrial factory controls. They're fascinating, but also in principle very simple.
Find the code and more information here: gitlab.com/jspielmann/shippid/
Instructions for getting started are a bit further down on the page: gitlab.com/jspielmann/shippid/#getting-started
มุมมอง: 10 716

วีดีโอ

Interactive Programming with Python: Reloading code while it's running
มุมมอง 3623 ปีที่แล้ว
I want to show you a bit of interactive programming. Let's say you want to implement some algorithm. One nice way of doing that is having a program running and calculating things continuously, while we program. To do so, we need the program to reload itself while we work on it. In this video, we'll see how that works in Python, with a custom Reloadable class that does just that. Do you want to ...
Antibody cookies
มุมมอง 1973 ปีที่แล้ว
Today, we're getting us some antibodies. They look super cute, look here: en.wikipedia.org/wiki/Antibody#Structure By the way this doesn't mean that you've had an infection.These are, after all, just antibodies against bad mood. Recipe 500g flour 250g butter or margarine 125g powdered sugar 2 eggs 2 teaspoons of dutch-process cocoa powder 50g finely grated chocolate a pinch of salt Mix the flou...
Making Corona cookies
มุมมอง 4303 ปีที่แล้ว
Corona is a serious thing, but we won't let it get us down! Cookies are good for everyone (and these are delicious). You'll need: an aluminium baking/bbq tray sharp scissors hammer needle-nose pliers straight edge and marker some cardboard glue You can upcycle the aluminium tray from used or unneeded trays that you already have. Or you buy new ones, you can find those in most supermarkets in su...

ความคิดเห็น

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

    I have a masters degree in mechanical engineering and took a controls course in undergrad. I have recently been working on a project that I needed to brush up on controls. I’ve read lots of papers and watched a lot of videos, but this video was exactly the succinct example I needed

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

    Underated video.

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

    genius!!!! grettings from mexico city!

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

    Excellent! Exactly the sort of explanation I hoped for. Clear and easy to follow.

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

    Awesome video! When I download from github and run game.py there already seems to be PID working as it docks with out any user input. How can I reset it to a state like you have in the start of your video?

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

      Sorry for the late answer. The repository is set up to end in the state of the video. Simply go into driver.py and remove the return value from `get_inputs`. The ship won't do anything automatically then. I should change that so it starts off empty...

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

    Hi, nice explanation. What headset are you using? sound mic is good

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

      Oh that's just some crummy old Logitech headset. I was in a hurry recording this video, I usually have better hardware. 😀

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

    Absolutely amazing explanation and demonstration of a PID controller, the game really helped the lesson hit home

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

    One of the best demonstrations of PID and how the parameters interwork I have seen on TH-cam - Superb

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

    Using "serialize_vars" is pretty neat Johannes, I don't even find a python documentation on it. What baffles me is how to access last_res with self.last_res only, why not with self.serialize_vars[0] or sth like that? Anyways, very cool stuff.

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

    Da kriegt man ja richtig Appetit auf gesunde Antikörper!

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

      Dann schnell losbacken!

  • @claraweynerowski-sp3669
    @claraweynerowski-sp3669 3 ปีที่แล้ว

    Hannes, du bist ein Käpsele!!!