# Scrubbing effect on turns

Working on the first coding project with Modkit VEX IQ with the “autonomous” robot drivetrain for my students where we ran into a situation I cannot explain.
Working on the first coding project with Modkit VEX IQ with the “autonomous” robot drivetrain for my students where we ran into a situation I cannot explain.

The simple project was to drive in a square.
I had read about the scuffing situation but I was not prepared for the situation that we all encountered.

When I did my sample before class, I kept changing the number of degrees to get the “actual” turns to get as close to 90° as possible. What I was expecting was some number greater than 90 but what I ended up with the code being turn left 77°, the turn speed & drive speed set to 25, & the timeout value was 1 second. Using the gyro to only display the degrees the robot was turning displayed/verified the four turns as: 90.159, 181.604, 273.444, & 3.850. The drive forward 250 mm & the turn left 77 deg was in a repeat 4 times loop.

So, I coded the left turn for 77° to get an actual turn of 90ish degrees.

I am not sure the students caught the 77 gets you a 90 but I need some explanation or am I really missing something???

Today I went & verified that the dimensions listed for the drivetrain were actually what the robot construction physically were. I had to change the width/track from 162mm to 172mm with all the other changeable dimensions being correct. Saving this track change & resaving the project to the Brain made a difference in my turns, i.e. each 90° turn now was roughly 94°. To get back to a 90° turn, I changed the turn left value from 77° to 73.7°, which gave me a 89.807, 180.494, 270.411, & 0.109. This change in width was what I had read with there being less friction the wider your drivetrain is set.

Again, why does coding 73.7° get me roughly a 90° turn???
Is there someplace (I have not found) that describes in detail what each Modkit VEX IQ command does?
I want something better than clicking on the question mark behind each command like the turn command below:

Turn – Turns the Drivetrain by a set amount of degrees (or revolutions) in the desired direction
Parameters – Direction – set the direction to turn
Angle – the number of degrees (deg) or revolutions (rev) to turn

Thanks - Dennis

The “scuffing” situation explains why the turns are not very repeatable.

I believe the number of degrees refers to the motor shaft, not the vehicle. Converting motor shaft degrees to vehicle degrees will involve drive gear ratios and wheel sizes, among other things.

Precise turns are better accomplished using the gyro and performing all turns at a slow speed to avoid inertial overshoot.

That is what I do in the projects I work on.

For first project coders, I did not think they would understand what I was talking about.
Seeing that they have seen the results, a class period explaining using the gyro would be in order.

As mmarquis said, the “Angle” parameter is how many degrees to turn the wheel, not the angle of the robot. Width, wheel diameter, gear ratio, type of wheel, ground surface, and even the length of the robot can change how far a robot will turn.

As the robot turns, the wheels create a circle, and (if you’re running one side forward, and the other side backwards) the circle should have a diameter equal to the width of the width of the robot.

I admit I can’t explain everything you’ve said. If you changed the robot from 172mm wide to 162mm wide, the wheels would travel a shorter distance, or around 162/172*77=72.5 + some added friction (scrub). However, if you changed the robot from 162 to 172, I would expect the distance to be closer to 82 degrees.

ascstech,

After rereading your post, I’ll admit I haven’t used Modkit in a couple years. I THINK you’re telling the robot in modkit to turn 90 degrees, with the other parameters set. My guess is that some parameter is not set correctly, and if you set the width to about 189, your 90 degree turn will work.

It’s actually quite interesting to do some experiments to work out what Modkit is doing with these turn commands. The thing you have to remember is that it’s just some maths that is done behind the scenes and since the only feedback available for the program to monitor is motor turns, there are loads of external variables that affect the amount that the robot actually turns.

I did some simple tests just to see roughly what is going on. I configured the drivetrain as per the standard AutoBot - 200mm wheels, connected wheels, 180mm track (Modkit suggests centre to centre of the tyre width), 76mm wheelbase, 2 motor rear.
On the desk, a 90 degree turn goes about 103 degrees according to the gyro, On the carpet, it’s much the same so friction of surface having very little effect.

I then calibrated it as per the instructions under the drivetrain but this didn’t make any difference to the accuracy.

I then measured the actual rotations of the wheels for the turn so I could see what effect the parameters have.

1. Setup as above = wheels rotate 305 degrees
2. Increased track to 250mm. My theory would be that the wheels would need to rotate further which they do, 387 degrees

For me on the standard AutoBot, 140mm track gave a correct 90 degree turn. The wheels turn through 255 degrees so on a 200mm travel wheel, thats about 140mm of travel.

Bottom line is, to get accurate turns, you need to use a gyro. When using the gyro, you do need to deal with overshoot though – I usually suggest turning 60% of the desired target at high speed and then the last 40% at a much slower speed.

​Steve, calvc01, mmarquis,

I appreciate the in depth discussion because that is what I was trying to find.
That points to a problem I have with Modkit, where do you find out that kind of info on what each command does behind the scenes?
Is there a web site where that is located or it really says I need to read through the forum more closely?
Is there a manual that could be bought & at what price a small school could afford?

Part of the problem is math is not my strongest subject. <VBG>
I mostly understand what you are all saying but it will take some “thinking” on what was said to really comprehend all the info.

Mmarquis mentioned that the number of degrees refers to the motor shaft, not the vehicle.
I’m curious where that is mentioned & it further points to my frustration with true detailed documentation.
Documentation is probably someplace, I just haven’t hit the correct Google phrase to stumble upon it.

Truly, I always use the gyro to make accurate turns & like calvc01 mentioned, I turn the first 60° at some higher speed but the last 30° at a power/speed setting of 5. That seems to work out well for all the things I’ve tried in the roughly one year I’ve had a VEX IQ robot to “play” with.

calvc01 is I’m guessing Chris from Rapid Electronics. If so, I would like to say I’ve watched most of your YouTube videos because they seem, to me, to be informative, to the point, & more accurate than a fair number of the videos produced for VEX IQ. And for that I thank you.

Thanks - Dennis

As far as I know, there is no full manual for Modkit.

In Modkit, the DriveTrain commands refer to degrees of turn of the robot itself. If you insert a stand-alone motor rather than a drive train, you then command the motor in terms of degrees or rotations of shaft rotation.

Glad you found my videos informative!