Bad oscillations on 4-wheeled robot

Hello :slight_smile:

I have the following problem:
I built a robot/car with 4x Odrive 150kv motors with a 1:45 reduction, being driven by 2x odrive 3.6
The car is quite heavy, in the current configuration probably around 100-150kg.
I’m running in POS_FILTER mode, for the current tests with around 1 rotation/second requested through pos_input with 10Hz (filter bandwidth is set to 5)

As long as the wheels are suspended everything works fine - but once i place the car on the floor it starts oscillating a lot. I suspect the motors are fighting eachother because the wheels just can’t slip (that would require an absurd amount of torque) - so some tiny errors generate huge responses.
I use AMT102 encoders from odrive with 8192 CPR - so my effective CPR @ the wheels is 366k.

With a wheel diameter of around 45cm i have an effective driving resolution of 4um…

So what i’m wondering now, is there any way i can tell my odrives to not get so excited about small errors? I tried setting pos_gain to 1 (from 20), didn’t really change a lot AFAIK.

If the wheels can’t slip and they’re fighting each other, you’ll probably want to run in torque mode, or at least disable the velocity integrator (vel_integrator_gain = 0)

I’m a bit curious why you’re running pos_filter mode though, are you doing position control or velocity control? If you want to position control the robot, I’d suggest putting the motors in torque mode and then using an external controller to manage the torques of the wheels to hit the vehicle (as opposed to individual wheel) position you need.

thanks for the quick response!

i’ll try with vel_integrator_gain = 0 today. but it makes sense that i’ll probably have to implement the positioning myself, which will make this project so much more complex :frowning:

I’m running in pos_filter because i need position and velocity control (i think).

for my application (actually one of the applications, but the other modes are simpler) the robot has to follow a straight line (a virtual one) with constant speed.
but it’s not really a velocity control because i need the robot to be for example at 1m @ 1 second, 2m @ 2 seconds and so on.

in the end everything should have sub-centimeter precision. i’ll use dual RTK GPS to give me 2 positions on the vehicle with 7mm accuracy.

Even if i need to implement the controller myself, do you maybe know of some literature that could help? I don’t even know right now what sort of update rate i’ll need…

I would say that it makes more sense to move the robot in velocity mode and then track the position externally with GPS for example. And then have a controller that adjusts the velocity based on the position.

1 Like