Our team has set up Holonomic X-Drive this year with a 1:2 (24 tooth and 48 tooth) gear ratio. While setting up the code to drive the robot using the remote wasn’t horrible, our team is having trouble with how to appropriately calculate the gear ratio since the wheels are turned at 45 degrees. This is needed for autonomous skills. The team believes that they need to multiply their current ratio by 1.41 to capture the effects of the X-drive, however, they are stuck on how to actually enter this data into vexcode IQ since decimals are not allowed when setting up the gear ratio. Any suggestions on how to accomplish this? Is the team’s assumptions of multiplying by 1.41 sound correct?
Technically it is 2^1/2 (square-root of two), but they are right. I’m not sure how to do that. Are you using block code?
You enter the gear ratio as normal. You cannot use the VEXcode drivetrain configuration for X-drives. The team must program the drivetrain movement themselves, adjusting for the angle of the wheels.
If you are using block code and have a drivetrain from the add device section, you probably could change how much the wheels are spinning for the auton by changing the gear ratio there.
P.S. I’m not a coder, so ignore this if this is a bunch of amateur yapping.
Yes, they are an elementary team and use the block code.
By entering the gear ratio as normal, would distance be the only measurement effected? Should “Turn right 90 degrees” or “Turn to heading 270” still be applicable since those turning motions are completed on a linear turn and not effected by the 45 degree angles?
It’s possible to use the VEXcode drivetrain, it’s just that using it doesn’t let you strafe (go sideways), basically reducing the X-drive to a tank drive. If you set up the drivetrain right, turning would not be affected. (I don’t understand what you mean by a linear turn, can you explain?) The two ways that I can think of to code the autonomous drivetrain movement (not using the VEXcode drivetrain) is to automate the calculation process (from distance to motor movement) with a My Block or to calculate it yourself. I recommend My Blocks because there are less opportunities for mistakes.
I gotcha. Yes, I am not sure our elementary kids have wanted to strafe in their autonomous, or have not seen a need that caused them to want to investigate it from an autonomous programming. So they are using the 4 motor tank drive drivetrain. Below is what I was attempting to communicate that it does when it “turns right” on a linear motion.