2. Jetson Nano Linux Setup - arieldo/MorBot GitHub Wiki
This page details the software setup required to run JetBot.
- Mount operating system image
- Booting the jetson
- Connect JetBot to WiFi and Login
- Connect to JetBot from VS Code
- Configure the environment
You can utilize the pre-built JetBot SD card image that is included with the kit.
It's already flashed and should be ready to use.
If you encounter any problems, please resort to method 2.
Flash JetBot image onto SD card :
-
Download the expandable JetBot SD card image jetbot-043_nano-4gb-jp45.zip
The above image is based on JetPack 4.5.
-
Insert an SD card into your desktop machine
-
Using Etcher, select the
jetbot-043_nano-4gb-jp45.zip
image and flash it onto the SD card -
Remove the SD card from your desktop machine
-
Insert the SD card into your Jetson Nano (the micro SD card slot is located under the module)
-
Connect the monitor, keyboard, and mouse to the Nano
-
Power on the Jetson Nano by connecting the power cable to the robot and switch to
ON
By default, managing resource usage in Ubuntu is limited to the command-line interface (CLI).
To enhance our understanding of the Ubuntu environment, we will enable the classic Windows-like interface.
If necessary, we can revert to the original settings later.
- Log in using the user
jetbot
and passwordjetbot
- Enable Graphical Desktop
- Log in using the user
jetbot
and passwordjetbot
sudo systemctl set-default graphical.target
- Reboot the Jetson Nano
sudo reboot
-
Log in using the user
jetbot
and passwordjetbot
-
Connect to a WiFi network using the Ubuntu desktop GUI
Your Jetson Nano should now automatically connect to the WiFi at boot and display it's IP address on the piOLED display.
- Shutdown JetBot using the Ubuntu GUI
- Unplug your HDMI monitor, USB keyboard, mouse and power supply from Jetson Nano
- Power the JetBot from the battery pack
- Wait a bit for JetBot to boot
- Check the IP address of your robot on the piOLED display screen.
- If the IP address appeared on the screen , Congratulations you are ready to connect to the robot remotely !!!
After your robot is connected to WiFi, you can easily connect to the robot from VS code remotely witout monitor, USB keyboard or mouse .
Connecting a robot via SSH (Secure Shell) using Visual Studio Code (VS Code) is a seamless and enjoyable experience. This process enables you to interact with and control robots remotely, adding a new layer of excitement to robotics programming.
- Follow the wiki to install Visual Studio Code (VS Code) and SSH (Secure Shell)
Important! Setp 5 will use some Linux Command Line Interface (CLI) commands . So make sure you have basic knowledge of linux , IF not Check out linux Tutorial wiki to get started!
-
sudo - a command in Unix-based systems that allows a permitted user to execute a command as the superuser (root) or another user, as specified by the security policy. It stands for "superuser do" and is used to temporarily elevate privileges for specific tasks, providing better security and access control.
-
apt-get - a command-line tool that lets you install, update, and remove software on your system. It's a fast way to install software. You can install software from the standard Ubuntu software repositories using the apt-get command.
-
apt-get update - a command that downloads and installs the latest packages from the software repository, and updates the package list to latest versions.
-
apt-get install - a command that installs a new package from the software repository.
-
chmod - a command in Unix-based systems that allows a user to change the permissions of a file or a directory.
-
cd - change to a different directory.
-
ls - a command to list computer files
-
setup.py - a file that tells Python distutils how to install your module into the Python package library. It is a Python script that uses the distutils module to interact with the Python package library.
Git is a widely used version control system that helps people track changes in files, especially when working on code. It is particularly useful when multiple people collaborate on projects, as it allows them to work on the same files without overwriting each other's changes.
A Git repository, or "repo" for short, is a digital storage space where the project files and their entire history of changes are stored. A repo can be hosted on a remote server (e.g., GitHub, GitLab, or Bitbucket), allowing multiple people to access and collaborate on the project. Each collaborator can also have a local copy of the repo on their computer to work offline.
In simple terms, Git is a tool that helps people manage and collaborate on projects by keeping track of changes in files. A Git repo is a place where the project files and their history are stored, allowing multiple people to work together efficiently.
-
git clone - a Git command line utility that is used to target an existing repository and create a clone, or copy of the target repository.
-
git pull - a Git command used to update the local version of a repository from a remote. It is a combination of git fetch and git merge, which means that it fetches the remote updates and then merges them into your local branch.
-
git push - a Git command used to upload local repository content to a remote repository. Pushing is how you transfer commits from your local repository to a remote repo.
- Launch a new terminal
sudo apt-get update
sudo apt-get install git
git clone https://github.com/arieldo/MorBot.git
cd ~/MorBot
git pull
- Install MorBot system Dependencies:.
This script performs several operations to set up a specific development environment on Ubuntu 18.04 with Python 3.6.
System Package Installation: The script installs several system packages, including "ssh", "curl", "libffi-dev", "python3-dev", "nano", and "v4l-utils". It installs each package one at a time.
The script also installs several Python packages, including "pip", "cffi", "ipywidgets", and "torchvision". It installs each package using pip for Python 3.6, and after each installation, it checks and prints the installed package version.
- Make the script executable by running
cd ~/MorBot
chmod +x system_startup.sh
- Install by running
./system_startup.sh
- Additional Configure to Expanding the Jetbot Image
This method is for expanding the file system on an SD card or U disk when the actual storage space exceeds the allocated space. This can occur if the image file, based on a 32GB SD card configuration, is programmed into a larger storage device. To expand the file system to use all available space, open a terminal and enter the provided expansion command.
cd /usr/lib/nvidia/resizefs/
sudo chmod 777 nvresizefs.sh
sudo ./nvresizefs.sh
- Install JetBot Robot Dependencies:
cd ~/MorBot/jetbot
sudo python3 setup.py install
- Install some more Dependencies:
python3.6 -m pip install pip
python3.6 -m pip install cffi
python3.6 -m pip install ipywidgets
python3.6 -m pip install torchvision
sudo reboot
-
To get familiar with the robot Basic Motion and code try the prebuild NVIDIA jetbot notebooks-demos
-
Or start developing your dream project with ROS , Follow To Install ROS