Deck Donkey Project

OK! I have started a Deck Donkey project to go along with my Donkey Project.

I am running it headless thru a Jetson Nano. I created a desktop app ddod (deckdonkey odrive). I first tried to go with native protocol but saw that it would be long winded; so then tried the ASCII protocol. I am using Qtcreator on the Jetson Nano and desktop. For now I am using only the motor velocity command. It allows me to go forward, reverse, left, and right. It shouldn’t be too hard to put a pivot right and left for tight corners.

I do have some issues though.

Issue #1
Before I can use the velocity command I have to use odrivetool and issue:
odrv0.axis0.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL; odrv0.axis1.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL

Is there a way to issue this from the ASCII protocol?

Issue #2:
Motor1 will sometimes quit and Motor0 is left going in circles!
dump_error will indicate a hall sensor error. Do I need add capacitors to the hall sensor leads?
These wheels also have quadrature optical sensors but I have not found the hook up procedure. Can some one point me to that setup. Thank you!

Issue # 3
Is there a way to do the dump_errors using the ASCII protocol?

Again I thank you for your attention.

Andy in Yakima

  1. I have never used the ASCII protocol, but you could try setting axis0.config.startup_closed_loop = True
  2. This is probably a noise issue. Have you tried the ferrite rings from the shop? (Or failing that, add 22nF capacitors to GND as you say)
    Encoder setup should be fairly self explanatory… You will have wires marked A,B,Z,5V,GND - connect these to the ODrive header?
    If the wires are not marked, (and maybe there are only four wires), then hopefully you have red and black (5V, GND) and two other wires which will be A and B. If you connect these backwards, it doesn’t matter, you just need to rerun the calibration.
  3. I think you can do r axis0.error but you will also need to check r axis0.motor.error, encoder.error, controller.error and you will probably get numbers, which you will need to decode manually according to in the odrive repo

Thanks towen;

I will follow up on your suggestions and let you know.

The Arduino examples show you how to set axis states with the ASCII protocol, I would start there.
I don’t believe there is a way to dump errors via ASCII, sorry :frowning: