Skip to content

Instantly share code, notes, and snippets.

@tejashah88
Last active February 21, 2024 06:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tejashah88/dd9cd8a91daeed8616c83ff319993eb9 to your computer and use it in GitHub Desktop.
Save tejashah88/dd9cd8a91daeed8616c83ff319993eb9 to your computer and use it in GitHub Desktop.

Original setup guide: https://rebrand.ly/ros/install

NOTE: I recommend opening this guide up within the VirtualBox. Here's the short link for easy access: rebrand.ly/ros/quick-install

Fix sudo access

su
adduser <username> sudo
exit

NOTE: <username> = The username that you see when you login (e.g. ros2)

  • For example, if your username was randomrobot3 you would type adduser randomrobot3 sudo

Restart system

shutdown -r 0

Set locale to UTF-8

sudo apt update && sudo apt install locales
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8

Update system

sudo apt update
sudo apt full-upgrade -y

Setup sources

sudo apt install software-properties-common -y
sudo add-apt-repository universe -y

sudo apt update && sudo apt install curl -y
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg

echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null

Install ROS 2 & Gazebo

sudo apt update
sudo apt install ros-humble-desktop -y
sudo apt install ros-humble-ros-gz -y

Configure ROS 2

source /opt/ros/humble/setup.bash
echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc

Verify installation

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