Caution Tape Robotics is proud to present the first 2 videos in our educational mini series “Caution Tape Learning”.
These videos aim to give students and educators alike a leg up in their programming, enabling all teams around the world to take their programming skills to the next level!!!
The first 2 videos cover how to use a p-straight function with a gyro, and how to properly write gyro turn functions. These videos are live now on our youtube channel, and the links can be found below.
We would love to hear what other topics you would like us to cover in future “Caution Tape Learning” Videos!!!
Distance should be pretty obvious, just the degrees that you want each motor to turn. Heading is also self explanatory, Keep your current rotation, so it doesn’t change its heading. For velocity and kP, if your robot is overshooting as it corrects you want to lower them. If its going too slow and can move faster accurately then increase them. Also, for distance you can convert inches to degrees for other projects that you already started, with Distance(in inches) *25.4/200 * 360. 25.4 is converting inches to millimiters, dividing by 200 is for calculating how many turns your motors have to make, and then times 360 is changing turns to degrees. If your drivetrain isnt 1:1 then change the divide by 200 accordingly. For example, ours is a 2:1 so we divide by 400 because it covers twice as much distance per turn.
basically, you want largest Kp with minimal overshooting. it’s a trial and error process. it’s a painful process. But eventually, your hard work and patience will pay off.
That’s great. We would like to see team to improve based on the basic code. Our intention is to help the new team who knows nothing about PID to have to starting point, there is a lot room to improve after this.
These videos are great! Thank you so much for your contributions to the community! I am prepared to see some nutty autons in the next few weeks! I have a couple of questions and suggestions though
Why do you only get the heading of the left drive motor, and not both motors in the PStraight loop? It would probably best to get both headings and divide by two, I would think.
Also, in your future videos, can you zoom in a bit more on the important part of the code? Sometimes it was a little hard to see.
Otherwise, great video, and this seems like it will be a great series!
It is correct that doing that will be more accurate for distance, but the video is for proportional Control, so we simply focus more on the kp part. BTW, the full code snippet is in the blog.
There are always room to make it better. But we do intend to create some sample auton at the end of season to show everybody what you can achieve with simple code like this.
Tuning the Kp and momentum on a full size bot (the weight and wheelbase differences from a small bot make a difference) , would be a great follow up video in this series.
Thank you, this is just the kind of next step that one of my teams was very much looking for.
Can anyone verify that omni-wheels are also 200mm circumference? We made an excel sheet last night to convert the distances from motor degrees to inches and there was significant error.
As a result, we will likely empirically make a distance chart that is tuned to our robot instead of relying on what the calculations say it should be.