Skip to content

Instantly share code, notes, and snippets.

@Pyrestone
Created December 23, 2021 11:16
Show Gist options
  • Save Pyrestone/ef683aec160825eee5c252f22218ddb2 to your computer and use it in GitHub Desktop.
Save Pyrestone/ef683aec160825eee5c252f22218ddb2 to your computer and use it in GitHub Desktop.
ROS Noetic Install on NVIDIA Jetson Nano (Ubuntu 18.04)

ROS Noetic Install on jetson nano (Ubuntu 18.04)

This guide is derived from the official Noetic setup page, which can be found here: http://wiki.ros.org/noetic/Installation/Source

This version includes some customizations for missing packages on Ubuntu 18.04 which the jetson nano OS uses. I think this installation should work on most ubuntu 18.04 installations, but I can give no guarantees.

System and python dependencies

sudo apt install build-essential
sudo -H python3 -m pip install -U pip
sudo -H python3 -m pip install -U setuptools
sudo -H python3 -m pip install -U rosdep rosinstall_generator vcstool


sudo rosdep init
rosdep update

mkdir ~/ros_catkin_ws
cd ~/ros_catkin_ws

Generate rosinstall file

Note: the default says desktop here, but i don't want all the GUI stuff, so i use the robot and perception packages instead

rosinstall_generator robot perception --rosdistro noetic --deps --tar > noetic-robot-perception.rosinstall
mkdir ./src
vcs import --input noetic-robot-perception.rosinstall ./src

Install ros packages

rosdep install --from-paths ./src --ignore-packages-from-source --rosdistro noetic -y -r

# not sure if this is necessary:
sudo -H python3 -m pip install -U catkin_pkg

# again not sure if necessary:  
sudo apt install liborocos-kdl-dev

for compilation error about cv_bridge not finding boost:

nano ./src/vision_opencv/cv_bridge/CmakeLists.txt

# change: 
find_package(Boost REQUIRED python37)
# to:
find_package(Boost REQUIRED python3)

Build ros packages

sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python3 --install-space /opt/ros/noetic

(optional) add setup.bash to bashrc so it's automatically loaded on the start of a terminal session

echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
@dataplayer12
Copy link

Thanks for the guide. If anyone else is struggling with failing build on pcl_ros like @emanuelazfernandes, increase swap size to 8 GB and try again.

@kanishkanarch
Copy link

You may encounter some issues still with the packages not installing due to issues with (I think) overlapping install paths. You can fix this with dpkg, something like this: sudo dpkg -i --force-overwrite 'path to deb specified by apt errors'

@Matt-Tav, What deb file are you talking about? Where do I find it in this tutorial?

@Matt-Tav
Copy link

Matt-Tav commented May 7, 2023

@kanishkanarch >

This is only relevant if you are seeing apt errors when you run apt update or something, don't worry about it if you're not seeing any

@kanishkanarch
Copy link

I got these errors in the rosdep install ... command

@kanishkanarch
Copy link

Oh wait, I forgot to setup the keys from ROS installation.

@kanishkanarch
Copy link

image
Even after setting up keys I got these installation errors originally mentioned.

@Matt-Tav
Copy link

Matt-Tav commented May 7, 2023

image Even after setting up keys I got these installation errors originally mentioned.

Did you run this command from my comment? This is exactly what you see when you haven't run the command. The errors I mention later are associated with fixing apt if you run the rosdep install without first adding the key and ppa repository, which it looks like you might have done.

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

@kanishkanarch
Copy link

Yes, I ran the command sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' and setup the key, but I'm still getting same errors.

@Matt-Tav
Copy link

Matt-Tav commented May 7, 2023

Yes, I ran the command sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' and setup the key, but I'm still getting same errors.

You may need to run apt update then try rosdep install again - if that doesn't work I'm not sure what's wrong and it may be a different issue:(

@kanishkanarch
Copy link

Ah yes, thanks that worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment