Changing Velocity of Individual Motors of Drivetrain for Driver Control not working

For Driver Control, my robot is tipping a a lot to the right, and I am sure this is because there is more weight on that side. So, I am thinking of adding counterweights to balance this. But, I also wanted to ask if there was any way to do this like a P or PID Controller. Also, when I tried to change the velocity of one of the motors of the drivetrain, nothing would change. I don’t know if this is because of the controller. Any help would be highly appreciated

1 Like

This may be a problem with your ports being wrong, a shaft being out of the motor, a bad wire, or a bad motor. Is there any way that you could move weight to the other side instead of add it?

I could, but is there any way to do it in code ?

I have both built and programmed in my years of vex. Whenever I have a robot move too far to one side instead of moving strait (and all ports are correct), then it is a robot problem. There could be ways to do this in programming, but doing it in build would be far more effective. Are your frictions both the same on your base halves? How many motors do you have?

We have two motor drivetrain, and in planning on adjusting the weight on the sides.

Ok. That should work, but I suggest adding more motors to your base. It will evenly distribute more power.

We only get six motors to use, and we are using all of them, we don’t have pneumatics, so we can’t do slider pto as well.

Is this IQ or V5?

Please provide pictures of the robot and code if you want more specific help.

If you are using the built in joystick programming functionality (as opposed to writing the code in the coding window under your “When Started” or “When Driver” block) then setting individual motor speeds will be overwritten immediately as the joystick continues to send it’s signal based on whether you are pushing the sticks or not.

There is a way of coding this yourself and then derating the left or right side in code, but that should be a last resort after you have exhausted any mechanical problems that could be causing this.

2 Likes

Its IQ, and yeah we are using the built in joystick programming functionality, because I don’t know how else to do it, we are trying to balance the weight through our robot. Thank you for clarifying that the controller controls the velocity itself. I will try changing things mechanically, but anyway could you please tell me how you do it without just to know if something happens ?

If you open your vexcode and go File-Open Examples you will find how to code your joysticks (left arcade, right arcade or split) using what I will call ‘hard code’ rather than the built in joystick selector capabilities. This would be the first step in moving towards understanding how to adjust your robot with code if your mechanical fixes fall short.

Yeah, I am using a PID for my autonomous, I didn’t know what to do for Driver control. Thank you !