1. Have the Jetson Nano accept the packages.ros.org installation package
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release - sc) main" > / etc/apt/sources list. D/ros - latest. List'
Copy the code
  1. The new apt key
Sudo apt - key adv -- keyserver hkp://ha.pool.sks-keyservers.net: 80-421 c365bd9ff1f717815a3895523baeeb01fa116 recv - keyCopy the code
  1. To update the apt
sudo apt update
Copy the code
  1. Install the ROS
sudo apt install ros-melodic-desktop
Copy the code

ROS Desktop Full is a more complete version, but is not recommended for embedded platforms because both 2D/3D emulators are installed at the same time, which takes up too much space for ROM, and may be too computationally intensive to use on Jetson Nano

  1. Rosdep initialization
sudo rosdep init
Copy the code

[error a: pkg_resources. DistributionNotFound: The ‘rosdep==0.20.0’ distribution was not found and is required by The application】 Change The Python version to PYTHon2

ERROR: Cannot download default sources list from: Raw.githubusercontent.com/ros/rosdist… Website may be down. 】 manually create the file (layers to create the directory, create 20 – default. The list file

cd ~/usr/local/etc/
mkdir -p ros/rosdep/sources.list.d
vim 20-default.list
Copy the code

20 – default. The list file

# os-specific listings first
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx

# generic
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
gbpdistro https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml fuerte

Newer pressing (Groovy, Hydro,...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead
Copy the code

Run sudo rosdep init again. 6. Upgrade Rosdep

rosdep update
Copy the code

[If error is reported]

  1. Open the hosts filesudo gedit /etc/hosts
  2. Add at the end of the file151.101.84.133 raw.githubusercontent.com
  3. Save and execute the update instruction againrosdep update

  1. Setting environment Variables
echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc 
source ~/.bashrc
Copy the code
  1. Check whether the installation is successfulroscore

  1. Run the ROS turtle instance

Install the ros turtlesim

sudo apt install ros-melodic-turtlesim
Copy the code

Open three terminals and run them respectively

roscore
rosrun turtlesim turtlesim_node
rosrun turtlesim turtle_teleop_key
Copy the code

Resources

  • Basic steps: Learn how to install ROS system on Jetson Nano
  • Install ROS system on Jetson Nano
  • ROS can no longer elaborate on the installation tutorial – Meng is a ball – blog garden