PIDF Loops & Arm Control | FTC | 16379 KookyBotz

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

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

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

    So good. Such a great representation of what’s needed for PIDF Loops.

  • @dreher0
    @dreher0 4 วันที่ผ่านมา

    Thanks for the explanation, we are here from Brazil, FTC #23069 and FRC #9047

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

    Awesome video! Gonna show this to my teams new members

  • @Frc492
    @Frc492 9 หลายเดือนก่อน +1

    On Discord, I saw many people referencing this video, so I got curious and watched it. Good job in presenting this, btw. I do have a few questions though. The ff term (gravity compensation) in this code is assuming the arm is zero degree at horizontal. With this assumption, it means people need to zero calibrate their arm at perfectly horizontal position. Also, the ff calculation is applying cos on the target. Shouldn't it be applied to armPos instead? Applying on target means the gravity compensation is not correct until the arm has reached target position. It may be more natural to allow people to have their arm zero at "resting position" where that's the most likely position when you first power up the robot that will reset the motor encoder. To allow this, it may be better to assume zero degree at vertical down position which means the ff calculation should use sin instead of cos. To account for the zero position not at vertical down, the code needs to add a Zero Offset to the calculated arm degree. Therefore, the ff line should be: ff = Math.sin(Math.toRadians(armPos / ticks_in_degree + zeroOffset )) * f;

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

      You are correct. The feedforward could be calculated here based on the current position of the arm to help the pid along all the movement, but the end effector should reach the same end position(or close) with a feedforward based on the target too. When it comes to resetting the position of the arm, that's up to the teams. In the end this video (and a lot of other videos) shouldn't be used as a plug and play solution, but more of an explanation of how it works and how to tune. (They also use a mp at the end so this is kinda cheating the ff based on end target a bit, but you get the point). Anyways good points!

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

    is that mason stuart talking?

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

    Hi. great video. We implemented it with no problem in our code, but, we want it to hold for a certain time in that position and then move back to the initial one and we havent figured out a method to do that. We tryed using sleep() but the arm falls because of gravity, then we tryed using a EllapseTime variable but it doesnt stop in the position, it continues to move. Any ideas?

  • @MeeraR-f4b
    @MeeraR-f4b 7 หลายเดือนก่อน

    Our team was using this code to tune our PID values, but when we went to FTC dashboard we got a message saying "Op mode controls have not initialized". The config pops up but we are not able to run the opmode. We aren't using any special sensors if that matters. So is there a specific reason this may be happening? Do we need to change something in our code?

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

    First of all amazing video. I was just wondering how I would be able to implement this into roadrunner or something of that sort? (More specifically into markers as they can't have a while loop within them and I was worried about the arm pos not being updated)

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

    Whoa! that was an amazing video! 😃😃😃

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

    Have you used the PIDF controller that is available in the DcMotorEx class? How does it compare to implementing this?

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

      The PIDF controller built into DcMotorEx operates at only 20hz, whereas the PIDF controller on our robots subsystems update at 250hz. This increase in refresh rate leads to significantly better performance, both accuracy and efficiency wise

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

    Very helpful video! Also, did you mean to spell maven like that in the url 2:27

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

      I think they did Mr. Thopunadorripunoori!

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

    Hi, I encountered a problem while trying to implement this code for an arm controlled by 2 Yellow Jacket goBILDA 5202-2402-0014 DC motors. I found out that no matter how close I've got with tunning the controller, it will allways oscillate arround the target position, because it will never reach it exactly. I want to know if this is a common issue for a PID controller or if it's something in my code. Also, I'm not sure what's the value for the ticks per revolution for these motors. On their website I saw 384.5 PPR but it doesn't seem right to me

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

      Hey, try increasing your D term if you are seeing oscillations

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

      I'll also add that sometimes PID systems are best with a deadzone, that is, errors close to 0 are clipped down to exactly 0 so that you don't get micro-oscillations in systems where the precision of the encoder is greater than the max realistic precision of the motor

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

    where could I find my motor's ticks per degree?

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

      It's not a motors ticks per degree but rather your encoders ticks per degree. Typically you know this cause your encoder will say it on their website what the ticks per revolution is but if you can't then you could record your tick position at 0 degrees then spin the rotor a revolution and get the difference between them then divide that by 360

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

    Hello, i have a question, how do i implement the pid into a subsystem, i tried every method, followed what they said on the ftclib docs but to no result, please help.

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

      Hey, could you share what you have right now?

  • @AayanKhan-fd2cf
    @AayanKhan-fd2cf ปีที่แล้ว

    What about the integral part, do we change that?

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

      integral is usually left alone in most cases

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

    7:27