autorope / donkeycar

Open source hardware and software platform to build a small scale self driving car.
http://www.donkeycar.com
MIT License
3.13k stars 1.29k forks source link

The Jetson Nano will be able to provide the necessary GPIO pin support? #984

Closed Anton890304 closed 2 years ago

Anton890304 commented 2 years ago

Hi! The official instructions for the latest release of Donkeycar is written: "The Jetson Nano does not provide the necessary GPIO pin support". https://docs.donkeycar.com/parts/rc/

However, I saw the Jetson.GPIO Python library, which promises API support as RPi.GPIO on the Jetson community page. https://forums.developer.nvidia.com/t/pigpio-support-on-nano/74744?ncid=afm-chs-44270&ranMID=44270&ranEAID=a1LgFw09t88&ranSiteID=a1LgFw09t88-dDM01oFlH6O02ohKT51p0A

I have little skills in Python, and I still can't find a solution to this issue. I just want to ask you.

Does this mean that there will be a donkey car - dev. version where we can connect the RC receiver directly to the GPIO on Jetson Nano?

adricl commented 2 years ago

Donkeycar on the jetson nano talks to the PCA9685 via the i2c gpio pins. You don't need the gpio interface as the jetson exposes these pins via the Linux i2c kernel interface.

Ezward commented 2 years ago

Output on the Jetson GPIO works. PWM works if you enable hardware PWM, so you can drive motors; see the docs https://docs.donkeycar.com/parts/pins/#generating-pwm-from-the-jetson-nano Input, like reading encoders, does not work well; in that case use an arduino to read the encoders. This branch implements that; https://github.com/autorope/donkeycar/tree/921-next-generation-odometer-parts We hope to have the merges in a couple of weeks (at Feb 19 2022 race if we can).

So to the question you asked, "Does this mean that there will be a donkey car - dev. version where we can connect the RC receiver directly to the GPIO on Jetson Nano?", the answer is NO. However, you could do that with an arduino (you would have to write that yourself).

Ezward commented 2 years ago

@Anton890304 please let us know if this answers your question. We would like to close this issue.

Ezward commented 2 years ago

A little more background on the jetson GPIO issue. TLDR; fix requires a pull request in Jetson.GPIO library.

Jetson.GPIO

Anton890304 commented 2 years ago

@Ezward Thank you very much for your detailed answer!