commend below lines
sudo apt-get -y update
sudo apt-get -y install --no-install-recommends \
libncurses5-dev \
libudev-dev \
libeigen3-dev \
git \
tmux \
curl \
wget \
htop \
python\
python-pip \
python-tk \
python-setuptools \
pip install -U numpy \
argparse \
pyyaml \
opencv-python \
rospkg \
catkin-pkg \
scipy \
matplotlib \
gym \
torch
torchvision \
****(Optional)-if you want to work on python3
sudo apt-get -y install --no-install-recommends \
python3\
python3-pip \
python3-tk \
python3-setuptools \
pip3 install -U numpy \
argparse \
pyyaml \
opencv-python \
rospkg \
catkin-pkg \
scipy \
matplotlib \
gym \
torch
torchvision \
- Operate fan
sudo /home/nvidia/jetson_clocks.sh
- Insstall pytorch(will take 2hour)
git clone --recursive https://github.com/pytorch/pytorch
cd pytorch
python3 setup.py install
never mind denied error, it will work on next step
- build pytorch
python3 setup.py build_deps
sudo python3 setup.py develop
- Verify CUDA and pytorch(from python3 interactive terminal)
python3
import torch
print(torch.__version__)
print(torch.cuda.is_available())
result : True
Reference: https://gist.github.com/dusty-nv/ef2b372301c00c0a9d3203e42fd83426
- Install opencv(it will take 1.5hour)
git clone https://github.com/jetsonhacks/buildOpenCVTX2
cd buildOpenCVTX2/
./buildOpenCV.sh -s
- Verify opencv
python3
import cv2
cv2.__version__
result :'3.4.1-dev'
-
Install ROS
follow webpage : http://wiki.ros.org/kinetic/Installation/Ubuntu
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
sudo apt-get update
sudo apt-get install ros-kinetic-desktop
sudo rosdep init
rosdep update
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
- Verify ROS
roscore
when you run python source code, code need that line on top.
run in python3:
#! /usr/bin/env python3
run in python2 or python:
#! /usr/bin/env python
you should install the xbox controller driver before catkin_make.
please commend that
sudo apt-get install libudev-dev ncurses-dev
If you downloaded this files and catkin_make, there could be a 'fatal error: core_msgs/ball_position.h: No such file or directory)
If so, just catkin_make --pkg core_msgs
and then,
catkin_make
again.