# HELP NEEDED - Holonomic code RobotC - Mecanum wheels

One of my teams is having trouble with their RobotC holonomic code. They are using mecanum wheels, and it will do forward, backward, and strafing fine. BUT… it will not turn. I can decipher and code fairly well in robotc, but I have a hard time understanding the holonomic coding. Can someone look at this code to see what the problem might be… then if anyone can explain how the actual code works I would really appreciate it.

Code:
motor[frontRight] = vexRT[Ch3] - vexRT[Ch1] - vexRT[Ch4];
motor[backRight] = vexRT[Ch3] - vexRT[Ch1] + vexRT[Ch4];
motor[frontLeft] = vexRT[Ch3] - vexRT[Ch1] + vexRT[Ch4];
motor[backLeft] = vexRT[Ch3] - vexRT[Ch1] - vexRT[Ch4];

Thanks
Bill R.
Titan Robotics

I basically wrote that code and everyone else here has been copying it. I did a video tutorial series which can be found in this post (which admittedly this new forum has buried and rekt quite thoroughly).

To make life easier for you I’ll directly link to the videos…

This last video is specifically about mecanum drives:

Please WATCH this videos and come back with questions once you understand what’s going on.

The videos aren’t perfect, but they’re pretty good and have held up over time.

motor[frontRight] = vexRT[Ch1] - vexRT[Ch3] - vexRT[Ch4];
motor[backRight] = vexRT[Ch1] - vexRT[Ch3] + vexRT[Ch4];
motor[LeftFront] = vexRT[Ch1] + vexRT[Ch3] + vexRT[Ch4];
motor[Leftback] = vexRT[Ch1] + vexRT[Ch3] - vexRT[Ch4];

This is our code for the mechanum wheels. We are using Ch1 to turn in this code.
Hope this helps…

The thing that stops it from turning is that all motors are set to vexRT[Ch3 ] - vexRT[Ch1]

Only one side of the motors should be set to this. The other side should be set to vexRT[Ch3 ] + vexRT[Ch1]

Cody I saw your post right after I hit post. Thanks for the info!!!