Skip to content

Marshall-Robotics/Marshall-Hand

Repository files navigation

Marshall-Hand

Code for a hand

https://z.umn.edu/M_H

Manual Installation(Not Recommended, unless you want to learn or your Jetson Nano 2gb is brand new)

Pull the docker image 'nvcr.io/nvidia/l4t-ml:r32.7.1-py3'

sudo docker pull nvcr.io/nvidia/l4t-ml:r32.7.1-py3

Create a folder to store data

mkdir ~/l4t-data

Plug in Logitech C270 Webcam & list USB devices to verify it is detected

lsusb

Run the docker image 'nvcr.io/nvidia/l4t-ml:r32.7.1-py3'

sudo docker run --runtime nvidia -it --network host --volume ~/l4t-data --device /dev/video0 nvcr.io/nvidia/l4t-ml:r32.7.1-py3

After Jupyter Notebook is running, open a terminal and run the following commands:

Install torch2trt

Clone torch2trt Repo to quick install pre-recs

git clone https://github.com/NVIDIA-AI-IOT/torch2trt

Go into torch2trt folder

cd torch2trt

Install torch2trt Pre-recs (takes a while)

python3 setup.py install --plugins

Install miscellaneous packages

pip3 install tqdm cython pycocotools

Install MathPlotLib

apt-get install python3-matplotlib

go back to root

cd /

Install trt_pose

Clone trt_pose Repo to quick install pre-recs

git clone https://github.com/NVIDIA-AI-IOT/trt_pose

Go into trt_pose folder

cd trt_pose

Install trt_pose Pre-recs (takes a while)

python3 setup.py install

Go back to root

cd /

Install jetcam

Clone Jetcam Repo to quick install pre-recs

git clone https://github.com/NVIDIA-AI-IOT/jetcam

Go into jetcam folder

cd jetcam

Install jetcam Pre-recs (takes a while)

python3 setup.py install

Go back to root

cd /

Install trt_pose_hand

Clone trt_pose_hand Repo to quick install pre-recs

git clone https://github.com/NVIDIA-AI-IOT/trt_pose_hand.git

Go into trt_pose_hand folder

cd trt_pose_hand

Install scikit-learn

pip3 install scikit-learn

Start Docker Container

Normal Launch

sudo docker run --name handV7 --runtime nvidia -it \
 -e DISPLAY=$DISPLAY \
 --network host \
 -v ~/l4t-data:/l4t-data \
 --device /dev/video* \
 --device /dev/ttyUSB* \
 --workdir /trt_hand_pose \
 felipegalind0/trt_hand_pose:v7\
 python3 gesture_classification_print.py

No Serial (remove '--device /dev/ttyUSB0 ')

sudo docker run --name handV7 --runtime nvidia -it \
 -e DISPLAY=$DISPLAY \
 --network host \
 -v ~/l4t-data:/l4t-data \
 --device /dev/video0 \
 --workdir /trt_hand_pose \
 felipegalind0/trt_hand_pose:v7 \
 python3 gesture_classification_print.py

JupyterLab Launch (remove 'python3 gesture_classification_print.py')

sudo docker run --name handV7 --runtime nvidia -it \
 -e DISPLAY=$DISPLAY \
 --network host \
 -v ~/l4t-data:/l4t-data \
 --device /dev/video0 \
 --workdir /trt_hand_pose \
 felipegalind0/trt_hand_pose:v7 \

enable xhost

xhost +local:docker

Releases

No releases published

Packages

No packages published