Unable to control 2 motors simultaneously

Hi there,

I was trying to make a two-wheeled platform so I basically followed this tutorial:


only changing some parameters. I’ve got both motors running nice.

Problem is that if I run:
odrv0.axis0.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL
odrv0.axis1.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL

I’m unable to operate axis1 until I reboot and run the command for axis1 only. I’m unable to operate both at the same time and can’t find the solution. Any ideas? If I tried to config both axis state in startup procedure I also get only first axis to operate.

Thanks in andvance

What is your control interface? Does the ODrive spit out any errors when you are unable to move the other motor?

I’m using odrivetool in Anaconda Powershell Promt under windows 8. I have no errors in the console. Simply it does not respond to the second command but it’s still operational. For example I can change the target velocity and it’s responding correctly.

I’m using board 3.4 with preflashed software version 0.3.7 if I remember correctly.

You need to check for the errors, instructions here.

On the non-operating axis I have an error:
ERROR_ENCODER_FAILED
ERROR_ILLEGAL_HALL_STATE

Any ideas? I filtered hall signals with 10nF capacitors and both axis are running correct separately until I try to run them both simultaneously.

odrv0.axis0.encoder.config.ignore_illegal_hall_state = True

Unfortunately I don’t have such a parameter. My board is 3.4 probably with old firmware and due to brake transistors issue it’s tricky to update.

When I boosted the spinup current limit from 10 to 30A it started to work on both axis. No idea how to explain this and what it has in common with hall signal error. Ridiculous.

It can’t hurt to double check that all setting are properly saved on both axis after reboot. Just paste odrv0.axis0 and odrv0.axis1 into a textcompare after rebooting. Also check .motor and .encoder.

https://text-compare.com/