Skip to content

RamessesN/Robotics-Integration-Group-13

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Robotics-Integration-Group-13


Jetson Orin NX

1. System Environment config

Environment Version
JetPack 6.2.1
Ubuntu 22.04 Jammy
CUDA 12.6.68
cuDNN 9.3.0.75
VPI 3.2.4
Vulkan 1.3.204
Python 3.10.12
OpenCV 4.11.0 with CUDA: YES
PyTorch 2.5.0 (torchvision 0.23.0)
TensorRT 10.3.0

Suggestion: Use jtop to check the system config.

2. Compilation Environment config

Before configuring the environement, run sudo apt-get update and sudo apt-get upgrade at first.

1. Python
  • Use miniconda to manage python version.
  • Run conda create --name xxx python=3.10 to create virtual env
2. Ultralytics (YOLO)
  • Install ultralytics dependencies: pip install ultralytics
  • Uninstall torch and torchvision for they're cpu version: pip uninstall torch torchvision (See belows)
  • Reinstall numpy for its too-high version: pip install "numpy<2" --force-reinstall
3. OpenCV
  • Install nano / orin: sudo apt-get install nano

    Don't worry it's also compatible with orin nx

  • Install dphys-swapfile: sudo apt-get install dphys-swapfile

  • Enlarge the boundary of CONF_MAXSWAP: sudo nano /sbin/dphys-swapfile

  • Restart the nano / orin: sudo reboot

  • Check memory: free -m

  • Run automator script OpenCV-4-11-0.sh:

    • Grant permissions: sudo chmod 755 ./OpenCV-4-11-0.sh
    • Run: ./OpenCV-4-11-0.sh
  • Then check the installation of opencv-cuda-version is okay

    Thanks to Q-engineering I finally did it!

4. Pytorch
  • Uninstall cpu-pytorch: sudo apt-get uninstall pytorch
  • Install gpu-pytorch from a prebuild wheel:
pip install https://github.com/ultralytics/assets/releases/download/v0.0.0/torch-2.5.0a0+872d972e41.nv24.08-cp310-cp310-linux_aarch64.whl

See Resources Pytorch for Jetson

5. TensorRT
  • Install tensorrt from a prebuild wheel:
pip install https://github.com/ultralytics/assets/releases/download/v0.0.0/torchvision-0.20.0a0+afc54f7-cp310-cp310-linux_aarch64.whl

See Resources TensorRT for Jetson

6. ONNX
  • The onnxruntime-gpu package hosted in PyPI does not have aarch64 binaries for the Jetson. So we need to manually install this package.
  • Install onnxruntime-gpu: With Python3.10 on our jetson orin nx, here we install onnxruntime-gpu 1.20.0 by:
pip install https://github.com/ultralytics/assets/releases/download/v0.0.0/onnxruntime_gpu-1.20.0-cp310-cp310-linux_aarch64.whl

Reference

[1] YOLO Official Web: Ultralytics YOLO Docs
[2] Robomaster Support: Robomaster SDK Ultra
[3] Training on Intel Arc GPU: intel-extension-for-pytorch & ultralytics issue #19821


⚠️ License: This project isn't open-source. See Details LICENSE.

About

Intelligent vision-based object grasping robot.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages