Thank you from Russia! Thanks to your explanation in the video, I was able to use a similar algorithm for the light sensor!)) I like what you do! it’s a pity that nobody’s translating your videos for the Russian segment of UA-cam) P.S Спасибо :)
Thank you very much dude! 😉 You really help a lot especially since I tried to apply the PID system to the gyro and it didn't turn out so well.. You're the best 😊
Awesome video. I have been trying to build something like this for AGES for my into orbit FFL robot and now I have the answer!!! Really nice tutorial, keep it up.
Thank you for this. I converted it to LeJOS/Java (personal preference, I'm not fond of the EV3 GUI software, probabaly an age-thing :) ) and it works a treat.
You're very welcome! I love your team name btw! My first FLL team was almost called "Bacon Bits." I hope you crush it in your next FLL competition. Cheers!
Hi, great video, you have to limit the summative error from integration, because if there is no limit this till grow on each cycle and code is useless. Thx!
Thank you! Your video was great, and helped us so much! I think you should make a video talking about how to make a robot design presentation. Best wishes from Brazil! Obrigado!
Hi. I realized when doing a 90 degree turn after doing a straight move with the PID, it overturns and underturns. When I do PID after that it takes too long to correct when going straight. Is there any way I can make my PID and turns accurate together.
I've been having a lot of trouble using the gyro sensor and the different methods. Inevitably, the robot will start to drift off to one direction and then start spinning in place. I'm trying to steer my team towards more sensor use, but I can't make a good demonstration myself. Are my K values the cause or am I doing something else wrong?
The K values are likely the culprit, specifically Ki from what you have described. I would encourage you and your team to keep trying, with a smaller Ki value.
I've had this issue, but with positive power. My power setting was set to 35 because my robot requires positive power to move forward. It starts ok but then starts to drive increasingly tight spirals until it eventually just spins in place. How to fix?? Is it the Kp values?
Which tire/wheel combination are you using? The best way to counter this is to use acceleration and deceleration algorithms to ramp up and ramp down the robot's speed smoothly when it starts and finishes driving. I have videos on how to make these algorithms.
We are using the wheels that come with the EV3 Education Core Set. The problem is only when we are turning. I cleaned the wheels and made sure no wires are touching the wheels.
That is strange, those wheels usually have very good traction. The only thing I can think of next is the weight distribution on your robot. The heaviest part of the robot is (usually) the EV3 brick, and if it is too far away from the wheels, it can increase the robot's moment of inertia and make it very difficult for the robot to turn.
Question, whenever we start the robot driving straight with this code and any other drive straight block it veers of to the right but then corrects itself. This causes the robot to end up over an inch from the target path. Any ideas to fix it?
The initial jerk to one side is caused by slight manufacturing differences between the two motors. You can fix this using an acceleration and drive-straight (motor encoders) combo in the first second of driving before switching to the gyro. I have a tutorial on how to make this algorithm.
Hey it turns out it was a problem with the ball caster, we had 2 in each corner and when we tried it with just one in the center it went perfectly straight. Thanks for the suggestions though!
Hey I just used the program and it worked on forward driving in my robot but when I tried driving back it started well but suddenly started turning around. Any suggestions for negative driving
@@Builderdude35 Great video. Robot go really Exstremely Straight. Great job. I have the same question like Javier. Driving back. I try to negate K values but no results. Can you show us some example?
Hey i loved your video good job, but when I put it into the my block builder and made it into one block i cannot use 2 of the blocks in the same line of code.
Hi Kyle hope all going well at mit. Just a little reflection on your book I bought on amazon for kindle. It absolutely fab, brill content, interactive and well illustrated. Only gripe is I use an iPad and the table of contents is really difficult to read in a blue serif type character font, almost as if it was a piece of code. Makes it difficult to scan. Regards Paul
Thanks for the video. It worked well while running as a standalone program. When we put it in a myblock it doesn't work. While creating myblock we made sure to select only the required code as shown in your other video. Do you have any suggestions?
Remember to reset the gyro angle before the PID algorithm starts; that's usually the biggest error that arises when trying to use these programs in context.
hi there! i find your video very useful and informative but i stumbled upon a problem. after setting the Kp I tried to set the value for Kd but the robot will jerk to the left and move in fixed position. can you help?
Hey Kyle, Leo here. Just brushing over these videos again for this year's tournament and I stumbled upon this video. I made the same one for my robot (by description runs on negative 70 power, is very heavy and compact). I haven't had much experience with these followers before and everyone said they are amazing, however i'm having trouble adjusting the K values. I set all but P to 0 like you said, however it always exponentially gains degrees as it goes further. (ive already re calibrated the gyro in my method. I sent you a comment yesterday about that) Ive tried your K values but it went for a small bit and then span in circles. I feel like even a slight Kp value (0.002) doesn't keep the robot straight and large one (5) turns in circles right away. If i put it to 0 its useless (driving blind). How do I work these values?? Have I stuffed something up in the code? I really want to make it to nationals this year and your channel has basically been the best thing ever and I doubt that this problem is your fault. Please help, Leo.
I think i might know the problem, if the P is working correctly (like the robot is driving and fixing and stuff) and even a little ki or kd effects it badly thing, it might be that the sum of the errors and the last error variables aren't "carried" over to the next iteration of the loop, if you're doing it in a myblock try to copy all of the code into a normal program and try running it there. (just a guess hopefully it will work).
Thank you from Russia! Thanks to your explanation in the video, I was able to use a similar algorithm for the light sensor!)) I like what you do! it’s a pity that nobody’s translating your videos for the Russian segment of UA-cam)
P.S Спасибо :)
I love these tutorials and I had the idea to remake it for SPIKE Python. I translated it and it worked nicely
Ask ChatGPT about it 😉😂
You save our FLL Robot Game!, THANKYOU SO MUCH
Thanks! You saved my FLL!
Thank you very much dude! 😉 You really help a lot especially since I tried to apply the PID system to the gyro and it didn't turn out so well..
You're the best 😊
Thank YOU for watching! :)
Thank you! the video really helped with programming our robot and understanding PID in general.
Thanks from Israel!
I am glad you enjoyed the video! Good luck in FLL!
Awesome video. I have been trying to build something like this for AGES for my into orbit FFL robot and now I have the answer!!! Really nice tutorial, keep it up.
Thanks! I'm glad to hear that this was just what you needed !
4 years later and it still works, using it rn for coding class. Hell yeah.
How do you know if the ki, kp , and kid and is values are too big or small? Please reply!
Thank you for this. I converted it to LeJOS/Java (personal preference, I'm not fond of the EV3 GUI software, probabaly an age-thing :) ) and it works a treat.
Thank you so much Builderdude35! This is helping us so much in Lego League. From Cookies and Milk FLL team
You're very welcome! I love your team name btw! My first FLL team was almost called "Bacon Bits." I hope you crush it in your next FLL competition. Cheers!
Hi, great video, you have to limit the summative error from integration, because if there is no limit this till grow on each cycle and code is useless. Thx!
hello! if have a video about pid if you want to see! i have download link too!
Thank you!
Your video was great, and helped us so much!
I think you should make a video talking about how to make a robot design presentation.
Best wishes from Brazil!
Obrigado!
I have a question why we put the target as zero not one?
Hi can you help with adjusting the kp ki and kd
YES! This will help our FLL team a ton
Hello sorry to bother you, but do you still have this program on your computer?
Yes I do although our team has modified it a fair bit to work with our robot and other programs. He explains how to create the program in the video.
Excellent, but would a two sensor gyro pid make it better? And if it would, where would you put the two gyro sensors?
Could you update this to the Prime hub mechanics?
you have ruind my life my dad makes me watch you every day
omg a hater
Hi. I realized when doing a 90 degree turn after doing a straight move with the PID, it overturns and underturns. When I do PID after that it takes too long to correct when going straight. Is there any way I can make my PID and turns accurate together.
good morning, great video really helpful. But i just wanted to ask how do you take the values of kp , ki and kd.
Those K values need to be determined via trial-and-error, which can be a tedious process, but it is worth it in the end.
I've been having a lot of trouble using the gyro sensor and the different methods. Inevitably, the robot will start to drift off to one direction and then start spinning in place. I'm trying to steer my team towards more sensor use, but I can't make a good demonstration myself.
Are my K values the cause or am I doing something else wrong?
The K values are likely the culprit, specifically Ki from what you have described. I would encourage you and your team to keep trying, with a smaller Ki value.
I've had this issue, but with positive power. My power setting was set to 35 because my robot requires positive power to move forward. It starts ok but then starts to drive increasingly tight spirals until it eventually just spins in place. How to fix?? Is it the Kp values?
Thank you so much this helps my FLL team so much! Can you combine this with the PID line follower for an ultimate straight program?
Absolutely, that will make a really powerful drive-straight algorithm. Maybe I will cover it in a future video!
Cool, I have a question: our FLL team has been programming and we have really bad wheel slippage. Do you have any suggestions to fix this problem?
Which tire/wheel combination are you using? The best way to counter this is to use acceleration and deceleration algorithms to ramp up and ramp down the robot's speed smoothly when it starts and finishes driving. I have videos on how to make these algorithms.
We are using the wheels that come with the EV3 Education Core Set. The problem is only when we are turning. I cleaned the wheels and made sure no wires are touching the wheels.
That is strange, those wheels usually have very good traction. The only thing I can think of next is the weight distribution on your robot. The heaviest part of the robot is (usually) the EV3 brick, and if it is too far away from the wheels, it can increase the robot's moment of inertia and make it very difficult for the robot to turn.
Question, whenever we start the robot driving straight with this code and any other drive straight block it veers of to the right but then corrects itself. This causes the robot to end up over an inch from the target path. Any ideas to fix it?
The initial jerk to one side is caused by slight manufacturing differences between the two motors. You can fix this using an acceleration and drive-straight (motor encoders) combo in the first second of driving before switching to the gyro. I have a tutorial on how to make this algorithm.
Here is the link to the video: ua-cam.com/video/TdzxopzcIsY/v-deo.html
Thanks for the help I hope it works
Hey it turns out it was a problem with the ball caster, we had 2 in each corner and when we tried it with just one in the center it went perfectly straight. Thanks for the suggestions though!
if this happens with different codes it is probably your build
ummm why did you include the link of this vid into the description????
why not
Hello builderdude! What would you change if you were trying to go backwards?
Hey I just used the program and it worked on forward driving in my robot but when I tried driving back it started well but suddenly started turning around. Any suggestions for negative driving
Please I really need it
You will need to negate the K values to drive in reverse, as well as set the new target to 180 degrees.
@@Builderdude35 Great video. Robot go really Exstremely Straight. Great job. I have the same question like Javier. Driving back. I try to negate K values but no results. Can you show us some example?
EWith any pid system the tuning and establishing the base constant s critical, took us a while but got their eventually...thnx
Hey i loved your video good job, but when I put it into the my block builder and made it into one block i cannot use 2 of the blocks in the same line of code.
Id love if u could help!
How do you make it go a certain distance for rotations with this program
See my tutorial on programming loop exits.
Hi Kyle hope all going well at mit.
Just a little reflection on your book I bought on amazon for kindle.
It absolutely fab, brill content, interactive and well illustrated.
Only gripe is I use an iPad and the table of contents is really difficult to read in a blue serif type character font, almost as if it was a piece of code.
Makes it difficult to scan.
Regards
Paul
MIT went well, but certainly very busy. Thank you for the feedback!
what is the easiest way of finding the K values?
It is something that must be tested through trial-and-error.
Would you need to adjust the variables based on speed?
By variables I meant k values
I found that with a proportional gyro drive-straight program I needed too
You may need to decrease the Kp and Kd if you drive at a faster speed.
Thanks for the video. It worked well while running as a standalone program. When we put it in a myblock it doesn't work. While creating myblock we made sure to select only the required code as shown in your other video. Do you have any suggestions?
Remember to reset the gyro angle before the PID algorithm starts; that's usually the biggest error that arises when trying to use these programs in context.
Man plz help, our fll robot is done but the gyro sensor is upside down, what things should i change in the program
If the gyro sensor is positioned upside down, you will need to simply negate all K values.
@@Builderdude35 eyyy it worked, thanks m8
I would suggest fixing the direction of the gyro. Most gyro sensor programs and tutorials don't accommodate for upside-down gyros.
should kp be less than or greater than 1?
It depends completely on your robot.
Does it matter if your gyro is mounted 90 degrees to the drive motors?
Nope, as long as the rotation axis is vertical, any orientation will work.
hi there! i find your video very useful and informative but i stumbled upon a problem. after setting the Kp I tried to set the value for Kd but the robot will jerk to the left and move in fixed position. can you help?
I think it may be that your Kd is too large. Try a smaller value.
Hey Kyle, Leo here.
Just brushing over these videos again for this year's tournament and I stumbled upon this video.
I made the same one for my robot (by description runs on negative 70 power, is very heavy and compact).
I haven't had much experience with these followers before and everyone said they are amazing, however i'm having trouble adjusting the K values.
I set all but P to 0 like you said, however it always exponentially gains degrees as it goes further. (ive already re calibrated the gyro in my method. I sent you a comment yesterday about that)
Ive tried your K values but it went for a small bit and then span in circles.
I feel like even a slight Kp value (0.002) doesn't keep the robot straight and large one (5) turns in circles right away. If i put it to 0 its useless (driving blind). How do I work these values?? Have I stuffed something up in the code?
I really want to make it to nationals this year and your channel has basically been the best thing ever and I doubt that this problem is your fault. Please help, Leo.
I think i might know the problem, if the P is working correctly (like the robot is driving and fixing and stuff) and even a little ki or kd effects it badly thing, it might be that the sum of the errors and the last error variables aren't "carried" over to the next iteration of the loop, if you're doing it in a myblock try to copy all of the code into a normal program and try running it there. (just a guess hopefully it will work).
@@kissanoita255 Thankyou for your reply but it's all good I figured out the solution. I forgot to negate the K values!
Do you have a Python Program Form this ?
i do not understand why you need to multiply by kp
How to use?
Thx mate your the best
I use the block, and then use it again later in the program and it doesn't work
Make sure you reset the gyro (not recalibrate!) before each time you use it.
I was lost. You must be so smart!
Oh, now I think I get it.
can you go backward with this
Yes, but you will need to negate all of the K values.
I dont knew how to put how many rotchin
Please help me
Sorry to be that guy but drive is spelled wrong in the thumbnail
Wow, that's hilarious! Thanks for letting me know! :D
👍
i figured out an easier way