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 enums.py 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:

So I am running my deck donkey using my created app ddod. I have dropped the hall sensors in favor of the incremental encoder thanks to the setup provided by androiddrew using the SkysEdge rw170 wheels. My only caveat is the initial encoder calibration after turning on the Odrive and Jetson Nano.

I have no hang ups after the encoder calibration. Banging into obstacles has not caused any
problems has yet. One time I push my DD into a box at a high rate of speed and kept it going for a good while; after reversing away from box the only thing I notice was that the 20 v battery I used dropped from 19.9v to 18.7 volt.

dd_portside
dewalt20v_odrive

My ddod application is running the ASCII protocol mostly using the velocity commands. I will experiment with other ASCII commands and report results.

I am happy with incremental encoder versus the hall sensors; so if I look for bigger wheels and motors I will look for optical encoders that
will come with them.

2 Likes