Mecanum wheel motor setup

Hello there
We’ve assembled a mecanum wheel rover, but there is a strange issue with controls.
I’ve seen Sebastian’s post and thought I could build a similar rover as well.

We’ve build a simple frame. The setup includes brushed 12v DC motors with dual-channel ESCs, linked below. The autopilot in use is Cube Orange (sounds like an overkill, I know, this is a test bed for us).
12v DC geared motors
Brushed motors ESCs

We’ve set the FRAME_TYPE = to 2 (omniX, as Sebastian did in his post) and SERVO1_FUNCTION etc. as described in here (value =33 and so on).

One thing that is missing for me to understand (except the issue described below, but it might be related) - what stick movements on the remote control should translate for example to the rover moving sideways, or turning around one of the wheels. Maybe this would help us understand whats going on.

Now to the strange part. I’ll let you all know that we powered the rover using a power supply box, not a battery.
The control over is strange. The motor numbers is as describe in the links above (i.e rear-left is #3)

Throttle up: in servo output window in MP all motor values are equally high, but only wheels 2 and 4 move, in opposite directions (number 2 rolls backwards).

Pitch - does nothing - none of the motors move.

Roll (to the left) - servo outputs 1,2 are lower (1400), outputs 3,4 are higher (1600). BUT - only motors 1,3 move. They both roll forward. Moving the roll stick to the right make them both roll backwards. Motors 2,4 do not move.

Yaw (to the right) - servo outputs 1,3 are higher, outputs 2,4 are lower. Motors 1,3 move in opposite directions, motor 1 rolls backwards.
Yaw to the left makes these motors to move in the opposite directions.

The roll, pitch, yaw and throttle are properly mapped in mission planner, as we can see the throttle values move as needed (in radio calibration tab).

Please let me know if you cam tell what’s going on.
Thanks for reading all of this!

Dotan

Here is the parameter file from my mecanum rover:
20220107MecanumRover.zip (4.9 KB)

In general, the yaw stick controls lateral movement and roll controls steering. All sticks should be self centering. The way I do it with all my rovers is to make sure that all wheels turn forward with a high PWM signal (>1500us) and reverse with a low signal (<1500us), by changing the rotation direction electrically or by reversing the ESC. I try to never use any reversing in Ardurover to keep it as simple as possible. For the mecanum rover, I plugged the motors to different ESCs till I got the correct movement for all control inputs. I think, I started with the omni X motor order. The wheel rollers are pointing to the middle of the rover forming an X.

Thanks!
Understanding the wanted behavior should’ve been my first step.
So, to be sure I understood correctly:
Yaw movement should translate to side to side movement, like a crab walk.
Roll should act like the yaw would, rotating around the center of the vehicle.
Throttle should translate to forward-backward movement?

I had a brief look in your file - I see that the SERVO#_FUNCTION values are different than described in the omni rover documentation. Why is that?
SERVO1_FUNCTION = 33 (motor1) - yours at 34
SERVO2_FUNCTION= 34 (motor2) - yours at 36
SERVO3_FUNCTION = 35 (motor3) - yours at 35
SERVO4_FUNCTION = 36 (motor4) - yours at 33

Anoter issue - we just now were able to understand the description on the product page of the ESCs on Aliexpress.
These ESCs have mixing mode:
For example, channel A controls the forward and reverse rotation of A and B motors at the same time, and channel B controls the forward rotation of A motor and B motor reverse rotation or B motor forward rotation and A motor reverse rotation.

Meaning:
Channel 1 controls both motors in the same direction
Channel 2 controls both motors but in opposite directions
It seems that we’ll need to get some new ESCs. But I still have hopes that we can solve this mixing issue…

Yes, you got the controls right.
I f you can not disable the ESCs mixing mode, you will not be able to use these ESCs.
It was some time ago that I set up this rover. So I guess, I found out which ESC should be plugged in which output with the output configuration from the documentation and then I arranged everything for the neatest cabling and changed the outputs accordingly.