After doing some programming in vexcode pro, I downloaded and ran the file and the robot would not turn the specified degrees. I put my code into comment and made a new program of just turning. I also ensured that the configuration is correct. I am using a clawbot with 4 motors, all using the green cartridge. Code looks like this. (Capitalization not correct but numbers are)
Drivetrain.setdrivevelocity(55,pct);
Drivetrain.setturnvelocity(45,pct);
Drivetrain.drivefor(forward,12,inches);
Drivertain.turnfor(right,90,degrees);
When the program is run, the robot drives forward then turn approximately 120-140degrees. I have the measurements on the drivetrain set up from axle to axle on the length and from center of wheel to center of wheel on the other side. I have the wheel sizes set correctly at 4 inches.
there’s a couple reasons that this might be occurring. either theres something wrong with the code (something i’m not familiar with enough to judge), or maybe too much backlash in the drivetrain if it’s a mechanical problem. do you have gears between the wheels or anything else that might cause extra backlash?
Are you using a gyro ? Inertial sensor ? If not, as @sazrocks said, make sure wheelbase etc. are correctly set, however, wheelbase can be a confusing value to determine, all depends on how many motors are driving the wheels and what type of wheels they are. Standard V5 clawbot with 2 wheels driven needs about 40mm IIRC, a 4 motor/4wheel drive will be different.
I used the motor set-up on the right side of the upper menu(looks like the ports on the brain). I used the drivetrain and set up all the ports and the dimensions of the drivetrain.
I do not have any additional sensors on the robot as of now I would like to start with those this season. The robot is a clawbot set from early cortex days that has been modified a few times. I measured the dimensions by measuring from the middle of the wheel to the middle of the other side from the front to get the tram width. I measured from center axle to center axle for the length. It is night in my area so I will try to play with different dimensions in the morning.
i dont think all the abhorrent, intrinsic, and overall bad build quality stemmed from the clawbot design is what’s directly causing your turning issues, but it may be a good place to start making modifications
my recommendation- replace any bent axles that may have resulted from the design, drill out the bearings with an 11/64, move the inner c channels and place them instead on the outside to secure the wheel, ensure that the wheel is fully constrained to the axle (replace gray inserts with newer ones if they aren’t tight enough; you want to reduce axle-wheel slop to something negligible), add some 3 wire encoders so you’re not relying on the whacky IME, replace the wheels with omnis to reduce turning scrub, add a good old pid loop and ur good to go
Something to consider is that different surfaces will have a big effect on accuracy if you aren’t using a gyro or inertial sensor. Whilst you can get away without, I’d strongly recommend having one.
Good recomendations. I am barrowing the claw bit from my team and do not have access to all the parts to do that. We use this as a demo robot at fundraising events so it might be nice to rebuild it using those recommendations.