I am making a robotic tracked vehicle. Got a 56v Odrive v3.6, Aerodrive 6374 192kv and AS5047p encoder. Have been able to control the odrive from the PC. But when setting up for PWM control I get some issues
When I try to set: odrv0.config.gpio4_pwm_mapping.endpoint = odrv0.axis1.controller._remote_attributes[‘vel_setpoint’] it does not recognize the command.
If I type odrv0.config.gpio4_pwm_mapping.endpoint = odrv.axis1.controller._re and use tab, “remote” is not an option, it only autofills “refcount”
And another problem I get is that the CPR of the encoder changes value after reboot back to default 8192.
Hope someone can help me.
Here is what is happening
In : odrv0.config.gpio4_pwm_mapping.endpoint = odrv0.axis1.controller._remote_attributes[vel_setpoint]
AttributeError Traceback (most recent call last)
----> 1 odrv0.config.gpio4_pwm_mapping.endpoint = odrv0.axis1.controller._remote_attributes[vel_setpoint]
AttributeError: ‘anonymous_interface_2980670581728’ object has no attribute ‘_remote_attributes’
odrv0.fw_version_revision. It should be 5 and 4, respectively.
thanks, but it is. updated it from 0.5.1 to 0.5.4, hopeing that would help. but sadly not. what I copied here in post 2, is from 0.5.4
Where did you get that command, btw? I think that’s really old.
The correct command is
odrv0.config.gpio4_pwm_mapping.endpoint = odrv0.axis1.controller._input_vel_property
See RC PWM input | ODrive
I got the command from googling.
Your command worked like a charm. But I see that I did not manage to upgrade to 0.5.4…
Tried that with the DfuSe demo, it says succsess in the program there, but when I check revision after flashing I get 1.
Got PWM to work like a charm in velocity mode, controlling 1 motor. But when I connect a pwm to gpio3 I get a motor error. Read that somebody else had the same problem, but I got solved by upgrading. Now I need to figure out how to upgrade to 0.5.4, when DfuSe says it’s successfull but it clarly is not. I’m running Win 10.
Curious. I’m not sure why that would fail.
Have you tried
wow. I had some problems and created so many more for myself.
The short version; By you (Watermelon) asking the right questions got me to check the right stuff and managed to get it to work. So I got to upgrade it and it’s running velocity control on two motors from two different PWM signals now.
My radio transmitter complained about low battery so I pluged it into the USB to charge it. So DfuSe was working as intended, only that it flashed my radio and not the odrive connected. Took some time to understand what I had done. Got to use DfuSe to get the right software back to the radio. Then unplugged it. Got to flash the Odrive then, and then there was no problem anymore running two PWM signals
I tried odrivetool dfu first. But got the same problem as many others on the forum here has repported. Don’t remember exactly what the error was anymore tho.
Thanks so much for your help.