Setting Up the Environment
Surely, Open a terminal and input command below
sudo apt update
sudo apt upgrade -y
Below command is the official ROS2 Foxy installation guide for Ubuntu 20.04 archives
sudo apt install software-properties-common
sudo add-apt-repository universe
sudo apt update && sudo apt install curl -y
curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
sudo sh -c 'echo "deb http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list'
sudo apt update
sudo apt install ros-foxy-desktop -y
Add the following line to your ~/.bashrc file:
source /opt/ros/foxy/setup.bash
nano ~/.bashrc
source /opt/ros/foxy/setup.bash

source ~/.bashrc
Install essential build tools and depenencies
sudo apt install python3-colcon-common-extensions python3-rosdep -y
Initialize rosdep
sudo rosdep init
rosdep update
