SPIKE 2.x PID Balancer with Scratch for SPIKE Prime / 51515: Gyro Girl

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 พ.ย. 2024

ความคิดเห็น • 88

  • @yyasinkilic
    @yyasinkilic 3 ปีที่แล้ว +3

    Thanks for the video, and explaining really nice. But I think the multiplication with "0.25" works better if used first on the integral first and summed with the error later. As it is now, the integral is always going to max and not forgeting.

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

      can you please elaborate?

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

      @@micheleraucci9070 i think this person is experiencing integral windup with their code, if the integral cant effect the stability enough it will grow to a large value instead of being in a stead state. usually the solution to this is clamping integrals max or min value, this can be done with set integral to Min of (Max of (Integral, -1), 1)

  • @yongfenggu3738
    @yongfenggu3738 ปีที่แล้ว +1

    how do you tune it

  • @OneCuriousMaker
    @OneCuriousMaker ปีที่แล้ว +1

    This is so DAMN COOL! thanks for sharing!

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

    Hi! Where does the 0.25 come from in the integral? Why not multiply error by the time between the 2 measurements?

  • @DavidBr888
    @DavidBr888 2 ปีที่แล้ว +1

    How to add steering to this algorithm?

  • @theredstonereed3274
    @theredstonereed3274 3 ปีที่แล้ว +5

    I thought about making one of these, but I thought that the delay between the hub and the motors was too high for it to balance

  • @hakanunal9743
    @hakanunal9743 3 ปีที่แล้ว +2

    Where can I download codes?

  • @kareemjg16
    @kareemjg16 10 หลายเดือนก่อน +1

    how did u add the last pink block?

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

      It was available in Spike App 2 or below (now we call it Spike Legacy app) in More Movement extension, but spike 3.0 does not contain it anymore ):

  • @tanmaynamburi9880
    @tanmaynamburi9880 11 วันที่ผ่านมา

    can u upload the code file

  • @gapy187
    @gapy187 4 ปีที่แล้ว +3

    can i do that with the 51515?

  • @mMochim
    @mMochim 3 ปีที่แล้ว +1

    Where do you get the start moving straight 0 at % power

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

      You'll find it in the 'More Movement' blocks in the extensions on the bottom left of the software. Garry

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

      I didn't find it garry

  • @yongfenggu3738
    @yongfenggu3738 ปีที่แล้ว +2

    it only moves when it fall😭

  • @PaulLee-r7p
    @PaulLee-r7p 2 หลายเดือนก่อน

    I can't find the "start moving at %power" block :(

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

      There is a start moving at % power in the More Movements (Extra) Blocks

  • @ShrekBigscary
    @ShrekBigscary 3 ปีที่แล้ว +1

    I dose not work for me do you think it could because in using 51515

    • @CreatorAcademyAustralia
      @CreatorAcademyAustralia  3 ปีที่แล้ว +1

      Hi! It should work fine for 51515, we have used it for another live video before :)

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

      It balances ok for like 3 seconds but it then falls over ether on its face or back when it falls its always going to fast to try and balance its self do you have any suggestions on what to fix or tweak btw I made my robot Exactly like yours so I think it’s in the code thanks for your time.

    • @CreatorAcademyAustralia
      @CreatorAcademyAustralia  3 ปีที่แล้ว +1

      It sounds like it will require more tweaking of the PID values, note it will work better on carpet because the spike wheels are very smooth and harder to grip on smooth surfaces. Although I have seen some people successfully balancing this robot on facebook ☺️

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

      Thanks I’ll give it a try

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

      I didn’t work I fell like It can go on most surfaces but it keeps on falling over because it’s moving too fast in either direction and I also tweaked the PID And it still stayed the same l think I need to tweak the speed or the reaction time but I don’t know how to can you tell me something I can do to fix it thank you for your time

  • @johangroenewald3080
    @johangroenewald3080 4 ปีที่แล้ว +2

    mine doesn't work because the last block that you used doesn't exist!

    • @CreatorAcademyAustralia
      @CreatorAcademyAustralia  4 ปีที่แล้ว +3

      Hi! You can find the missing blocks in “more movement” by clicking the block extensions on the bottom left of the coding area. Good luck!

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

    Very good!!

  • @BorisBrock
    @BorisBrock 4 ปีที่แล้ว +1

    Thanks for the video! I tried to recreate this bot (same build, same code), but for me it is very unstable. It stands for max. 1 second before getting out of control. Also the motion block you are using in the end send not to be available for 51515 (even with additional blocks turned on). So I used two blocks: drive forward + set speed.

    • @CreatorAcademyAustralia
      @CreatorAcademyAustralia  4 ปีที่แล้ว +1

      Hi! If you need help finding the blocks in 51515, you can see me reproduce this project with the Inventor kit here: Discovering LEGO Mindstorms/SPIKE Gyro Pitch Deadzone

    • @gibfordsrobotlab
      @gibfordsrobotlab 3 ปีที่แล้ว +1

      The surface was very important. He mentioned in the video it worked on carpet, and that was the only place it worked for me.

  • @KevinMahaffey-gu6mr
    @KevinMahaffey-gu6mr 6 หลายเดือนก่อน

    I bought the build for my class. The software wants to be in another release. they have not updated it. We (We being two software teachers and an engineering teacher) tried to do what they suggested, and we found that it was too difficult for middle schoolers to do and it still did not work. We tried several ways including stopping the video and building the blocks that we saw. Basically it was a no go. Therefore do not waste the 4 bucks until they update the software.

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

      If you search for Spike Prime Balancing Robot, you will see Builderdude35, Igor Bogorod, Brickmania all successfully using this model and code to balance. As mentioned in our message before, your SPIKE version must be 2.x in order to function.

  • @松动风的
    @松动风的 4 ปีที่แล้ว +2

    可否提供spike版本程序学习一下呢?

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

      Hi! Code is at 11:40 :)

    • @松动风的
      @松动风的 4 ปีที่แล้ว

      @@CreatorAcademyAustralia 啊,我的意思是有没有scratch版本,不要Python的

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

      這個視頻裡面是Scratch版了😊Spike是可以用Scratch同Python

  • @gapy187
    @gapy187 4 ปีที่แล้ว +1

    can it drive?

  • @raymillard4171
    @raymillard4171 3 ปีที่แล้ว +1

    Would you please share the code in python? We got this awesome program to work in scratch, but can't keep the bot stable in the same python code. Thank you for sharing these fantastic videos and python tutorials!

    • @CreatorAcademyAustralia
      @CreatorAcademyAustralia  3 ปีที่แล้ว +1

      Great idea! I’ll see what I can do 😊 Thanks for watching! Garry

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

      @@CreatorAcademyAustralia Would love the simple python code as well. Would save A LOT of time.

  • @Unbrickme
    @Unbrickme 4 ปีที่แล้ว +1

    I just created this Segway robot! You made an excellent explanation and I really didn't know about PIDs until this video. I did plenty of more research on PIDs and I was fascinated! I didn't know Segways used the PID controller! I also know that a lot of other self balancing programs have you hold the robot upright, and over the course of about 2 seconds, the gyro sensor calculates the average value of the sensor, and then the robot uses that average for self balancing. By any chance, do you know how can the gyro average be calculated?

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

      Thanks for your feedback! I believe the average value is intended to work out the ‘roll target’ which I enter manually in my code. If it could be calculated then it could make the balancer a bit more reliable. I will have to investigate how this is done!

    • @Unbrickme
      @Unbrickme 4 ปีที่แล้ว +1

      @@CreatorAcademyAustralia Hello, after experimenting a lot, I think I figured out how to calculate the average value over 50 readings. Would you like me to send you a screenshot of the code?

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

      Yes please! Would love to see your work

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

      Creator Academy Australia I sent the email

    • @meet-robotics2024
      @meet-robotics2024 หลายเดือนก่อน

      ​@Unbrickme my spike robot hub is working with Normal python code but rejecting a PID code. What do you think may be the issue

  • @sumanoharan
    @sumanoharan 3 ปีที่แล้ว +3

    For me, the gain values didn’t work so if you have the same problem try using these gain values kp: 5.6 ki: 1.6 kd: 25

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

      Thanks for sharing your gain values! I will try them out as well :) Garry

  • @burakeren
    @burakeren 4 ปีที่แล้ว +1

    Does pinching motor cables like that stresses the wire, or are there enough space for wire to bend comfortably?

    • @CreatorAcademyAustralia
      @CreatorAcademyAustralia  4 ปีที่แล้ว +1

      Great observation! The SPIKE PRIME motors all have a groove that allows the wire to pass through comfortably even if it is attached flush to another surface like this robot. You can see in the build portion of the video how the wire sits in the groove at 3:20

  • @yulius20111
    @yulius20111 2 ปีที่แล้ว +1

    very interesting to study at school, may I have the program code...thank you 👍

  • @lizicheng3210
    @lizicheng3210 4 ปีที่แล้ว +1

    无论我如何调整pid还是会倒下

  • @mikey4590
    @mikey4590 3 ปีที่แล้ว +1

    Very nice!

  • @jaydenchannelo_o1703
    @jaydenchannelo_o1703 4 ปีที่แล้ว +2

    很好

  • @funnytv348
    @funnytv348 2 ปีที่แล้ว +1

    👍🎵🎵🎵

  • @yongfenggu3738
    @yongfenggu3738 ปีที่แล้ว +1

    the includes you

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

    What should I define the "Roll Target" value as? Do I just have to put the variable in, or do I have to define it?

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

      Hi Max, the roll target is the roll value of the hub when the model is as balanced as possible. If you built the model exactly as the video, feel free to use the same variable. Good luck! Garry

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

      @@CreatorAcademyAustralia I understand now! Thanks so much for helping me!

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

    Hi. Great work. I would like to program this with python. but i can not find roll target or the PID functions.
    May you can explain this in a further video? would be Great if possible anyway.
    Cheers

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

      Great suggestion! I will see what I can do 😊 Garry

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

      @@CreatorAcademyAustralia Great! Im study this for my self. Do you know: Is the python program from Lego fully functional?
      Or are there commands may missing?
      For ex. for PID we use this:
      PID = (target-value).kp+(integral+error).ki+(error-last_error).kd

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

      from our experience, python in LEGO 51515 is fully fledged, so all that remains is creating the objects and variables. G

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

    Hello.
    I used on the big motors.
    What should I change?
    Even the brick is standing. Besides the pitch, what else should I change?
    Thanks

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

      Hi! The gain values will also need to be tuned again. Garry

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

      @@CreatorAcademyAustralia could you help me a bit with the values? Thank you

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

    Hi Garry, Do you have idea how to use Spike prime to create self balancing bike by using flywheel instead of spinning front wheel? I have problem to find out the formula to decide the size and weight of flywheel. I am sorry to leave message here. Would you shed a light for me? Thanks a lot.

    • @CreatorAcademyAustralia
      @CreatorAcademyAustralia  2 ปีที่แล้ว +1

      Hi! The code will be very similar. When we started building the robot, we had a flywheel design but the problem is that we couldn't find a heavy enough flywheel, and also the torque on the LEGO motors aren't strong enough. Garry

  • @Unbrickme
    @Unbrickme 4 ปีที่แล้ว +2

    Hello, I sent you the email

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

      If I want to build this and coding the same program
      Set to 0.25 to make robot better.

  • @ВладиславВасинкин
    @ВладиславВасинкин 3 ปีที่แล้ว

    Hello. If I set "set movement motors" block to "A+E" instead of "E+A", the robot falls down instantly. Why?

    • @CreatorAcademyAustralia
      @CreatorAcademyAustralia  3 ปีที่แล้ว +3

      Hi! This is because the motors will reverse direction. Remember that the first letter refers to the left motor, and the second letter refers to the right motor. Garry

    • @ВладиславВасинкин
      @ВладиславВасинкин 3 ปีที่แล้ว

      @@CreatorAcademyAustralia I got it. Thanks.

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

    Probably doesn't help that there is so much backlash in the gear boxes, but nice effort.

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

    The scream where there is code is very blurry I can't tell which block to use

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

    This build is not stable and keeps on breaking. So I tried your program for th-cam.com/video/asVunW7lb6M/w-d-xo.html but it didn't work. Can you explain the program for this build? Thanks in advance.

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

      Hi there! The code explanation here applies the same way for the TL robot as mentioned in the video. The TS robot is more mechanically stable so the tuning values are more forgiving, but you’ll still need to tune it yourself. Goodluck!