• +4917626969472
  • info@ur-techpartner.de

How to install ROS and setting up workspace

Drone Robot Operating System(ROS1/ROS2) Tech

Step1: Checking requirements

First, you need a supported operating system to install ROS. Unfortunately, ROS does not support Windows operating systems, such as Windows 10 or 11. It is recommended to use a Unix-based system, such as Ubuntu, for installing ROS.

Warning: ROS does not support Ubuntu versions later than 20.04. This means that if you have a more recent version of Ubuntu, you may have to do some workarounds to get ROS to work properly.

To check your operating system name and version, follow these steps:

Press

Ctrl+Alt+T

to open the terminal

In the terminal, enter the following command:

lsb_release -a

The output: should look like:

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.5 LTS
Release: 20.04
Codename: focal

 

In case you see Ubuntu greater than 20.04.x you have to downgrade your operating system and the effective way is reinstalling it again.

Step2 Installation
  • Add ROS into your source list

What is source list and why we require it to watch our YouTube channel.

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
  • Add key:
    • install curl package if now installed already
    • sudo apt install curl
    •  curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
  • Now you must update the repo: to tell Ubuntu new sources are added into the list.
sudo apt update
  • Next install full version of noetic desktop version: which includes all the packages for 3D and 2D robotic development related dependencies.
 sudo apt install ros-noetic-desktop-full 

This would take several minutes to complete the process.

Step3: installing and configuring catkin workspace

Catkin is just like package manager for your ROS. With catkin, you can create multiple workspaces, install the dependencies for that project and develop that project separately. Additionally, it’s used to build your packages you want to use.

    • Installing catkin

 sudo apt-get update


sudo apt-get install python3-catkin-tools

sudo apt-get install catkin

 

  • Source using default workspace

This step is very important, every time you open a new terminal you need to do this because otherwise your ROS doesn’t know the path of the installation of ROS.

To avoid this please see the same tutorial on YouTube channel.

 $ source /opt/ros/noetic/setup.bash 
  • Creating folder for catkins workspace

$ mkdir -p ~/catkin_ws/src

 

  • building your source packages

Building mean what every you add in makelist of your workspace, those packages will be installed in your workspace. These packages will accessible to you.

We will have separate blog and YouTube video for building packages and doing actual Robotics development.


$ cd ~/catkin_ws/

$ catkin_make

 

 

 

 

 

 

 

No comments