Is gimbal mode like stepper motor control?



We have a 5208 Gimbal motor connected to the odrive, which we put in gimbal mode. We wonder what exactly is gimbal mode? How is it different from regular modes? We had hoped to do torque/current control for a haptics/robotics application, but realize from the documentation this may not be possible.

We were hoping to get some current measurements from the controller but it seems like the function does not work. In current control mode, everything seemed to be working correctly. Our motor was moving when we sent these commands. Is there a reason we always get 0.0A as the measurement?

In [130]: odrv0.axis0.controller.current_setpoint = 0.5

In [131]: odrv0.axis0.motor.current_control.Iq_measured
Out[131]: 0.0

In [132]: odrv0.axis0.motor.current_control.Iq_measured
Out[132]: 0.0

In [133]: odrv0.axis0.motor.current_control.Iq_measured
Out[133]: 0.0

In [134]: odrv0.axis0.motor.current_control.Iq_setpoint
Out[134]: 0.0

We’re not experts on motor drives, but wonder where the gimbal mode is on the spectrum from stepper control, through encoder based commutation BLDC control, to the more flexile options of Field Oriented Control.

Rafaella and Martin


Gimbal mode is for driving gimbal motors with voltage control instead of current control. Probably not what you want. Probably better to drive the motor in normal current control mode.


So its my understanding that odrive was designed with high motorts in mind (e.g. 30 to 90A) and so its current shunt resistors (how it measures the current draw of the motor) are sized accordingly. Since your working with a high resistance, low current gimbal motor this posses a bit of a problem. From the docs:

Further detail: If 100’s of mA of current noise is “small” for you, you can choose MOTOR_TYPE_HIGH_CURRENT . If 100’s of mA of current noise is “large” for you, and you do not intend to spin the motor very fast (omega * L « R), and the motor is fairly large resistance (1 ohm or larger), you can chose MOTOR_TYPE_GIMBAL . If 100’s of mA current noise is “large” for you, and you intend to spin the motor fast, then you need to replace the shunt resistors on the ODrive.

You likely fall into the latter case and so the odrive will be mostly measuring noise when in current control mode. The way I see it you have two solutions:

  1. Swap out your motor to a higher current type. This can still give very good position control. Here is an example with large 90A peak motors and very cheap encoders.
  2. Keep your existing motor and try swapping out your current shunt resistors on your odrive. This should be a fairly straight forward procedure if your handing with a soldering iron and hot air gun. If you decided to go this rout then get in touch with @madcowswe to find out which parts to swap and with what.

Hope thats some help.



The ODrive uses Field Oriented Control (FOC) in both normal mode and in gimbal motor mode, so it’s indeed very flexible and smooth. As the other guys stated, the difference is that in gimbal mode, we don’t use current feedback. This is also why current measurements all read zero.

Specifically, in gimbal motor mode, the ODrive will interpret all “current” parameters as “voltage” parameters. Importantly, the current setpoint is interpreted as a voltage setpoint instead. In gimbal motor mode we rely on the resistance in the motor and ohm’s law to generate the correct current and hence torque. So when you set it to 0.5, you actually apply a Vq voltage of 0.5V.

Here is a guide to how you can equate voltage to torque for gimbal motor operation, which is probably the piece of the puzzle you are missing right now. You need to know the the resistance and kv of the motor. Say you have a gimbal motor with 10 ohms measured phase-to-phase, half of that is 5 ohms phase-neutral; and the motor has a kv of 64 rpm/V.

Say you apply 1V to Vq.
Then from ohms law:

I = V / R
1V / 5ohm = 0.2A

And the brushless motor torque equation:

T = 8.269933431 * I / kv
8.269933431 * 0.2 / 64 = 0.0258 Nm

Note that all of the above assumes a very slow motor. If the motor spins quickly then there is a significant reduction in Vq from the back-emf that isn’t accounted for. If you use velocity control, the closed loop should be able to compensate however.


This is some very helpful insight, thank you. Is there a way to measure the set voltage and measured voltage in the Odrivetool?


Hm not really. But the uncertainty of the applied voltage is pretty small, so probably it shouldn’t be necessary.