eFiniLan / xnxpilot

Openpilot on Jetson Xavier NX
MIT License
131 stars 64 forks source link
acc adas dragonpilot jetson lka nvidia openpilot self-driving-car xavier-nx

Licensing

xnxpilot is released under the MIT license. Some parts of the software are released under other licenses as specified.

Any user of this software shall indemnify and hold harmless Rick Lan, dragonpilot, comma.ai, Inc. and its directors, officers, employees, agents, stockholders, affiliates, subcontractors and customers from and against all allegations, claims, actions, suits, demands, damages, liabilities, obligations, losses, settlements, judgments, costs and expenses (including without limitation attorneys’ fees and costs) which arise out of, relate to or result from any use of this software by user.

THIS IS ALPHA QUALITY SOFTWARE FOR RESEARCH PURPOSES ONLY. THIS IS NOT A PRODUCT. YOU ARE RESPONSIBLE FOR COMPLYING WITH LOCAL LAWS AND REGULATIONS. NO WARRANTY EXPRESSED OR IMPLIED.


Table of Contents


What is xnxpilot?

xnxpilot (Xavier NX Pilot) is an open source driver assistance system based on dragonpilot and openpilot, running on a NVIDIA Jetson Xavier NX platform instead of a qualcomm 821 mobile phone.

If you would like to run it with minimal changes to openpilot, please see the example in "doc" branch, based on openpilot 0.8.4


Showcase

Simulation:

On road:

Running on dragonpilot 0.8:


Checklist


Hardware Requirement

Software Requirement


Hardware assembly

It is important to know that your camera needs firmly attached onto your windshield, any small movement to the camera while driving may result dangerous steering/acceleration.

I highly recommended to 3D print those commaai windshield mount (use with gopro mount) and use it to mount your camera, 24 degree one will do the job.


Installation

1) Install ubuntu 18.04 / Jetpack 4.6 on to sdcard 2) Insert your sd card to your jetson, have camera connect to CAM0, boot up, use the following configuration (installer will use those values to set up the device):

3) Once installation finished, SSH into the device and continue the rest of the processes. 4) run:

5) clone this repo to your home directory (e.g. cd ~/ && git clone https://github.com/efinilan/xnxpilot.git openpilot -b 0.8.9 --single-branch) 6) run cd ~/openpilot/jetson/ && sudo bash env_installer.py 7) Take a rest, this will take around 1.5 hrs to config your system and another 10 mins to compile dragonpilot, depends on your internet connection. 8) Congradulations, you have dragonpilot running on your jetson.

Credits


Notes

set_core_affinity

Jetson Xavier NX has 6 cores running at 1.9 GHz, here is what I've defined:

0 = camerad

1 = modeld

2 = boardd

3 = controlsd

4 = plannerd / radard

This will spread processes other CPU cores.