Skip to content

[Deprecated, Jetpack 4.2] Install from source

koide3 edited this page Jun 28, 2021 · 1 revision

!! This installation instruction no longer work for the latest Jetpack !!
!! See the updated instruction !!

Install from source

We tested this package on TX2/Jetpack 3.3 and Xavier/Jetpack 4.2.

Maximize Processor speed

sudo su
echo 1 > /sys/devices/system/cpu/cpu1/online
echo 1 > /sys/devices/system/cpu/cpu2/online

~/jetson_clocks.sh
exit

Update system

sudo apt-get update
sudo apt-get upgrade

Flann & OpenBlas

sudo apt-get install libflann-dev libopenblas-base libopenblas-dev

dlib

mkdir ~/libs && cd ~/libs

wget http://dlib.net/files/dlib-19.17.tar.bz2
tar xvf dlib-19.17.tar.bz2

echo "export DLIB_ROOT=~/dlib-19.17" >> ~/.bashrc
source ~/.bashrc

tensorflow

sudo apt install python-pip
sudo pip install -U pip setuptools numpy
sudo pip install -U --extra-index-url https://developer.download.nvidia.com/compute/redist/jp33 tensorflow-gpu

ROS

See http://wiki.ros.org/kinetic/Installation/Ubuntu

!! Install tensorflow before ROS otherwise you see some dependency issues...

tf-pose-estimation

# llvmlite requires llvm >= 7.0
# for Xavier
sudo apt install llvm-7.0

# for TX2 with Jetpack 3.3
mkdir ~/libs && cd ~/libs
wget http://releases.llvm.org/7.0.1/llvm-7.0.1.src.tar.xz
tar xvf tar xvf llvm-7.0.1.src.tar.xz
cd llvm-7.0.1.src && mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_LINKER=gold -DCMAKE_INSTALL_PREFIX=/usr/local ..
make -j6
sudo make install
cd catkin_ws/src
git clone https://github.com/koide3/tf-pose-estimation

# Follow the official installation instruction
cd tf-pose-estimation
sudo pip install -r requirements.txt

# In case you meet scipy install issue
# sudo apt-get install gfortran

cd tf_pose/pafprocess
swig -python -c++ pafprocess.i && python setup.py build_ext --inplace

cd ../..
sudo python setup.py install

# You may need to comment out python package dependencies in setup.py like as follows:
# 21: #   'dill==0.2.7.1',

cd models/graph/cmu
bash download.sh

other packages

cd catkin_ws/src
git clone https://github.com/koide3/open_face_recognition.git
git clone https://github.com/koide3/ccf_person_identification.git
git clone https://github.com/koide3/monocular_people_tracking.git --recursive
git clone https://github.com/koide3/monocular_person_following.git

sudo apt-get install ros-kinetic-image-transport ros-kinetic-image-transport-plugins ros-kinetic-image-proc

CSI camera driver [Optional]

cd catkin_ws/src
git clone https://github.com/peter-moran/jetson_csi_cam
git clone https://github.com/ros-drivers/gscam

sudo apt-get install gstreamer1.0-tools libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1.0-dev

In case images are flipped, modify "jetson_csi_cam.launch" as follows:

nvvidconv flip-method=0 ! video/x-raw, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR" />

P3AT/DX robot driver [Optional]

cd catkin_ws/src
git clone https://github.com/amor-ros-pkg/rosaria.git
git clone http://github.com/reedhedges/AriaCoda

cd AriaCoda
sudo make install
cd /usr/local/Aria
make clean
make -j4

cd ~/catkin_ws
catkin_make -force_cmake