Motor Stuttering, Please Help!

Our base has started having some stuttering issues. The base can turn left and right, but can’t drive forward and backwards. when we do, the motors stutter and skip. Our wiring is as follows: 2 Left Motors on “Y” cable port 2, 2 Right Motors on “Y” cable port 3, Claw lift 1 port 4, Claw lift 2 port 5, Claw motor 1 port 6, Claw motor 2 port 7, Lifter motor 1 port 8, Lifter motor 2 port 9. We found that by multiplying the joystick value, it can smooth out the motor rotations, but we are looking for an actual solution, as this is not perfect, and we have never seen anyone use it before. Code is below. Please note that we have LCD screen code, but it may cause interference, so we commented it out. We are using RobotC.

#pragma config(Sensor, in1,    expanderBatterY, sensorAnalog)
#pragma config(UART_Usage, UART2, uartVEXLCD, baudRate19200, IOPins, None, None)
#pragma config(Sensor, dgtl1,  encoderLeft,    sensorQuadEncoder)
#pragma config(Sensor, dgtl3,  encoderRight,   sensorQuadEncoder)
#pragma config(Motor,  port2,           leftBaseMotor, tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port3,           rightBaseMotor, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor,  port4,           clawLift1,     tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port5,           clawLift2,     tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor,  port6,           clawMotor1,    tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port7,           clawMotor2,    tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor,  port8,           liftMotor1,    tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port9,           liftMotor2,    tmotorVex393_MC29, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

task main()
{

	bLCDBacklight = true;
	string primaryBattery, expanderBattery;

	while(true)//this makes the code loop forever
	{

		motor[leftBaseMotor] = vexRT[Ch1] * 1.5; //this makes it when jostick goes to the left, the robot pivots to the left
		motor[rightBaseMotor] = -vexRT[Ch1] * 1.5; //this makes it when jostick goes to the right, the robot pivots to the right

		if(vexRT[Btn5UXmtr2] == 1) //this makes when button 5 up is pressed, the claw goes up
		{

			motor[clawLift1] = 120;
			motor[clawLift2] = 120;

		}

		else if(vexRT[Btn5DXmtr2] == 1) //this makes when button 5 down is pressed, the claw goes down
		{

			motor[clawLift1] = -120;
			motor[clawLift2] = -120;

		}

		else //this makes when no buttons are pressed, keeps the speed at zero
		{

			motor[clawLift1] = 0;
			motor[clawLift2] = 0;

		}

		motor[clawMotor1] = vexRT[Ch3Xmtr2] / 2.75; //This uses the joystick of the partner controller to controll the motors at varioius speeds.
		motor[clawMotor2] = vexRT[Ch3Xmtr2] / 2.75;

		if(vexRT[Btn6UXmtr2] == 1) //This activates strong arm!
		{

			motor[clawMotor1] = vexRT[Ch2Xmtr2] / 2;
			motor[clawMotor2] = vexRT[Ch2Xmtr2] / 2;

		}

		motor[leftBaseMotor] = vexRT[Ch3] * 1.5; //this makes it when you make joystick go up, robot goes foward
		motor[rightBaseMotor] = vexRT[Ch3] * 1.5; //this makes it when you make joystick go down, robot goes backwards

		if(vexRT[Btn7UXmtr2] == 1) //this makes when button 7 up is pressed, the lift goes up
		{

			motor[liftMotor1] = 120;
			motor[liftMotor2] = 120;

		}

		else if(vexRT[Btn7DXmtr2] == 1) //this makes when button 7 down is pressed, the lift goes down
		{

			motor[liftMotor1] = -120;
			motor[liftMotor2] = -120;

		}

		else //this makes when no buttons are pressed, keeps the speed at zero
		{

			motor[liftMotor1] = 0;
			motor[liftMotor2] = 0;

		}

		/*clearLCDLine(0);
		clearLCDLine(1);

		displayLCDString(0, 0, "Primary: ");
		sprintf(primaryBattery, "%1.2f%c", nImmediateBatteryLevel/1000.0,'V');
		displayNextLCDString(primaryBattery);

		displayLCDString(1, 0, "Expander: ");
		sprintf(expanderBattery, "%1.2f%c", SensorValue[expanderBatterY]/280.0, 'V');
		displayNextLCDString(expanderBattery);

		wait1Msec(100);*/

	}

}
 

Just from looking at your code, you are assigning values to the base motors twice each loop. Towards the top you are assigning them from Ch1, and down the way you are assigning them from Ch3.

motor[leftBaseMotor] = vexRT[Ch1] * 1.5; //this makes it when jostick goes to the left, the robot pivots to the left
...
motor[leftBaseMotor] = vexRT[Ch3] * 1.5; //this makes it when you make joystick go up, robot goes foward

And multiplying by 1.5 isn’t good, because at the joystick extreme of 127 you are assigning 190, which isn’t a valid motor value. I’m guessing you want a variant of arcade control, but split between the 2 joysticks instead of all on one joystick? We’ve been using tank drive, just Ch2 and Ch3 to control the left and right sides so you can get full power. Arcade control seems to halve your forward and reverse power, and the motors only get full power while turning.

And I don’t think you need that wait1Msec(100) at the end of your while loop. If you do leave it, make it smaller, like 10, so you are updating more than 10 times a second.

Combine the two instructions so that the code isn’t telling the motor to do two things and the stuttering will go away:

motor [leftBaseMotor] = vexRT[Ch3] + vexRT[Ch1]; // Ch3 is forward and reverse vector, Ch1 is turn vector
motor [rightBaseMotor] = vexRT[Ch3] - vexRT[Ch1];

This is typically called arcade drive, and is often mapped to a single joystick (i.e. change Ch1 to Ch4 in the code above.) Putting all the drive control on one joystick frees the other joystick for something else, like arm movement.