(Jetson Project2#1)_Ros noetic install & catkin_make

mseokq23·2024년 12월 1일
0

Part 1: Installing ROS Noetic on Ubuntu 20.04
To begin developing with ROS Noetic on Ubuntu 20.04, you'll need to install it on your Jetson Nano B01. Here's how you can do it.

Step 1: Set Up Your Sources List
Configure your Ubuntu repositories to allow "restricted," "universe," and "multiverse" packages.

bash
코드 복사
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository universe
Add the ROS Noetic package repository to your system.

bash
코드 복사
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu focal main" > /etc/apt/sources.list.d/ros-noetic.list'
Step 2: Set Up Your Keys
Add the ROS package server key to your list of trusted keys.

bash
코드 복사
sudo apt install curl
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
Step 3: Install ROS Noetic
Update your package index and install the full desktop version of ROS Noetic.

bash
코드 복사
sudo apt update
sudo apt install ros-noetic-desktop-full
Step 4: Initialize rosdep
rosdep is a command-line tool for installing system dependencies.

bash
코드 복사
sudo rosdep init
rosdep update
Step 5: Environment Setup
Add the ROS environment variables to your .bashrc file.

bash
코드 복사
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
Step 6: Install rosinstall
rosinstall is a tool that allows you to easily download many source trees for ROS packages.

bash
코드 복사
sudo apt install python3-rosinstall python3-rosinstall-generator python3-wstool build-essential
Part 2: Setting Up Your Catkin Workspace
The Catkin workspace is where you'll build and store your ROS packages.

Step 1: Create the Workspace Directory
Create a directory called catkin_ws in your home directory.

bash
코드 복사
mkdir -p ~/catkin_ws/src
Step 2: Initialize the Workspace
Navigate to the workspace directory and initialize it.

bash
코드 복사
cd ~/catkin_ws/
catkin_make
Step 3: Source the Workspace
After building, source the workspace to overlay it on top of your current environment.

bash
코드 복사
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc
Step 4: Verify the Workspace
To verify that your workspace is properly overlaid, run:

bash
코드 복사
echo $ROS_PACKAGE_PATH
You should see your workspace at the beginning of the ROS_PACKAGE_PATH.

At this point, ROS Noetic is installed on your Ubuntu 20.04 system, and your Catkin workspace is set up and ready for package development.

0개의 댓글