LoginSignup
2
2

More than 3 years have passed since last update.

Jetson Nano Setup

Last updated at Posted at 2019-08-28

起動直後にやること

$ sudo apt update 
$ sudo apt upgrade 

E: Could not get lock /var/lib/apt/lists/lock - openになった時の対処法

$ sudo rm /var/lib/apt/lists/lock 
$ sudo rm /var/cache/apt/archives/lock
$ sudo rm /var/lib/dpkg/lock*

Librealsense

インストール

カーネルバージョンがL4T32.1.0の場合

$ git clone -b L4T32.1.0 https://github.com/JetsonHacksNano/installLibrealsense.git
$ cd libinstallLibrealsense
$ ./installLibrealsense.sh

カーネルバージョンがL4T32.2.の場合

$ git clone https://github.com/JetsonHacksNano/installLibrealsense.git
$ cd libinstallLibrealsense
$ ./installLibrealsense.sh

ちなみにL4T32.1.0ではlibrealsense2.22がインストールされL4T32.2ではlibrealsense2.24がインストールされます。

kernelパッチ

L4T32.2では/proc/device-tree/modelが"jetson-nano"から"NVIDIA Jetson Nano Developer Kit"に変わってます。
L4T32.1にパッチを当てる場合はpatchUbuntu.shの84行目を以下のように修正します。

git clone -b vL4T32.1 https://github.com/jetsonhacksnano/buildKernelAndModules "$BUILD_REPOSITORY"   

 

$ cd libinstallLibrealsense
$ ./patchUbuntu.sh

参考サイト
Jetson Nano – RealSense Tracking Camera
Jetson NanoでIntel Realsense D435を使う方法(ROS対応)

ROS

インストール

$ 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://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
$ sudo apt update
$ sudo apt install ros-melodic-desktop
$ sudo rosdep init 
$ rosdep update
$ echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc 
$ . .bashrc

動作確認

$ roscore
 ... logging to /home/nano/.ros/log/3324fefe-c950-11e9-8bac-3413e862ef80/roslaunch-nano-23764.log
  Checking log directory for disk usage. This may take awhile.
  Press Ctrl-C to interrupt
  Done checking log file disk usage. Usage is <1GB.

  started roslaunch server http://nano:35993/
  ros_comm version 1.14.3 


  SUMMARY
  ========

 PARAMETERS
   * /rosdistro: melodic
   * /rosversion: 1.14.3

NODES

auto-starting new master
process[master]: started with pid [23776]
ROS_MASTER_URI=http://nano:11311/

setting /run_id to 3324fefe-c950-11e9-8bac-3413e862ef80
process[rosout-1]: started with pid [23787]
started core service [/rosout]

関連パッケージのインストール

$ sudo apt-get install cmake python-catkin-pkg python-empy python-nose python-setuptools libgtest-dev python-rosinstall python-rosinstall-generator python-wstool build-essential git

Jetson Nanoをwifiのアクセスポイントする。

参考にした記事はここ
creat_apはいまいち使いにくいので止める。
https://devtalk.nvidia.com/default/topic/1050053/creating-wifi-ap-hotspot-on-jetson-nano/
###creat_apコマンドのインストール

$ sudo apt install hostapd
$ git clone https://github.com/oblique/create_ap
$ cd create_ap
$ sudo make install

https://github.com/oblique/create_ap

Network Managerを使て設定する。

Network ManagerのGUIを使ってAPの設定をする。

安価なwifiアダプタだとAPモードに対応していないので要注意

/etc/NetworkManager/system-connections/にHotspotというファイルが作成されるので、必要であれば修正する。

APの起動と停止

$ sudo nmcli con down up Hotspot
$ sudo nmcli con up Hotspot ifname wlan0

 

UIを使いたい場合はこっち

$ sudo nmtui

参考サイト
https://freefielder.jp/blog/2016/07/linux-wifi-command-line.html
https://ponu2.blogspot.com/2015/02/networkmanagerlan.html

Jetson NanoにVNC環境を構築する。

VNC Serverをインストールする。

$ sudo apt update
$ sudo apt install tigervnc-standalone-server tigervnc-scraping-server

$ vncpasswd

# Would you like to enter a view-only password (y/n)? と聞かれるが、nでよい。

$ x0vncserver -display :0 -passwordfile ~/.vnc/passwd
# 別途、X環境を作る場合は、vncserver :1 などにする

drone-kit(作成中)

インストール

Dronekitをソースファイルからビルドする。

$ git clone https://github.com/dronekit/dronekit-python.git
$ cd dronekit-python/
$ sudo python ./setup.py build 
$ sudo python ./setup.py install 

$ sudo apt-get install python-pip

$ sudo pip install dronekit-stil

【備忘録】

ハード関連の調査

Serial console

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2