Robot deviating to the side in straight motion

It’s a 200 rpm cartridge motor.
I think the sides are aligned because we’re using a c channel that keeps them parallel.
I really don’t understand where there could be friction because we have checked several times and we really can’t see it.

just because it’s connected by a c channel doesn’t mean it’s aligned.
Pivot

take a look at this for example. you only have one screw in each of these connections, and even if you tighten it way down, you’ve essentially just created a really tight pivot, not a rigid connection. I can see instances of this single screw mounting elsewhere on your bot as well, like on your towers.

so by doing this, you’ve essentially made a very tight parallelogram on each side of your drive, that may look and seem rigid, but in reality can squash or stretch in a way that puts a ton of friction on your axles and misaligns the drive.

always use at least two screws in connections like this. Also keep in mind that even with two screws, the c channel will be able to pivot somewhat. this is because the holes are significantly larger than the screws so there is some wiggle room there. This coupled with the extremely low levels of torque a 2 motor 280 rpm drive will have means that it’s almost certainly a friction issue.

Do you mean that it even by using that


It won’t work?

those things definitely help, but I think it’s far better to use two screws instead of one of those.

Isn’t it the same as using two screws?

Okay then thank you very much we’ll try replacing them with two screws.

Also what do you think could be causing friction in our drivetrain?
Thanks

I’m not entirely sure how using those parts compares to 2 screws, seeing as I’ve never used them before but my intuition tells me that using 2 screws is better than using one screw with a plastic insert.

More importantly than that though is that you make sure all your connections are squared up before you tighten them. You want your drive to be perfect rectangles, not parallelograms.

I also highly recommend using 4 motors on your drive.

Yeah we just checked it’s a perfect rectangle.
Actually we used screws at first but then the holes on the c channels would widen. That’s why we changed them.
Also we didn’t use 4 motors for financial reasons. Do you think it would be the same if we tried gearing the drivetrain all the way to the front motors so that the motors actually control all the wheels?

well, one really easy way to check for friction is to just disconnect the shafts from the motors and try to freespin the drive. all your wheels should freespin for the same amount of time.

another way to test is to put your drive on it’s side and then run your drive full speed and then suddenly stop, and observe if one side comes to a stop before the other.

We tried doing it the first way and they actually spin the same amount.
We suspected it was a programming issue so instead of using a PID that uses the average position of the two motors, we coded a PID for each motor. But it didn’t work either :frowning:
Isn’t there any other thing that could be wrong with the programming or the hardware?

try doing it the second way. one of your motors might have more internal friction than the other.

We actually even tried replacing the motors with other ones. It doesn’t work.

Have you tried this yet?

Yes we have. We noticed no difference at all.

Yes we have. We noticed no difference at all.

Do you notice the veering when you are controlling the robot with a controller. If you don’t notice any veer then your program is the issue, if it veers then its a mechanical issue. When your doing that have the brain constantly display rpms and motor temperatures.

We do notice that when we’re driving too. But we can’t figure out what the mechanical problem is to solve it.

Does it always veer, or does it veer at the beginning and then drive straight?

2 things to check and an important test to perform:

- Motor and bearings are aligned. Sometimes unplugging the shaft and checking free-spin fails because the source of friction is the misalignment between the motor and the bearings. This is a common problem when a motor goes through 2 bearings, resulting in 3 points of contact total on the axle. 2 points of contact always define a line that your axle can freely spin about, but 3 will likely define a curved parabola that your axle will flex and dig into the bearings trying to match.

- Weight distribution. The 4 wheels may not be getting the same downforce and are slipping. This will effect the center or rotation and turning too. This is most relevant for light robots like changeup bots who already have very little traction with the ground. Try moving the battery and brain to distribute weight more equally.

TEST to perform: (push test)
Try unplugging the motors and turn the robot off. Then push the robot to glide forward on its own momentum. If the robot deviates from the initial direction, then check sources of friction and weight distribution. This is a relatively holistic assessment of the robots symmetricity and ability to drive straight.

Note that your initial push will probably not send the robot to your intended direction but what’s important is the deviation from the straight line that the robot first settles into. Try to push the robot as straight forward as possible however because the lateral movement of the omni wheels may affect results and cause the robot to spin. I would repeat this test until I manage to push the robot perfectly straight. If this is difficult to do however, it may indicate that your weight distribution is really lopsided.

A similar technique is used to tune pinewood derby cars. The cars are placed on a very slight ramp and allowed to slowly roll down it. At the bottom of the ramp, the final position’s distance from the center line is measured and used to tune the axle alignments.