Swerving due to delay in starting motors in VEXcode V5 Python

Our custom drive function for autonomous begins like so:

dt_left.spin_for(direction, (abs(inches)/(math.pi*self.wheel_diameter))*self.gear_ratio, TURNS, wait=False)

dt_right.spin_for(direction, (abs(inches)/(math.pi*self.wheel_diameter))*self.gear_ratio, TURNS, wait=False)

The left drivetrain starts turning before the right drivetrain. After testing, we have determined that this is what causes a slight swerve when driving. Is there any way to fix this problem (by having both start spinning at the same time) in Python?

Thank you.

Although motors will be started sequentially, it’s unlikely the difference in starting them would be more than 10mS. It’s more likely what you are seeing is backlash through the gears or increased friction on one side.

5 Likes

thin spacers (metal or plastic) will be your best friends in this. Also if your gearing your drive train, lithium greese might help as well. My teams had that when they geared their motors, found it to be friction due to not only gearing, but also slop from the gears turning the wheels. Check to make sure the gears turn the wheels at the same time when they get power, best bet is to screw the wheels to the gears with spacing