Skip to Main Content

ROS (Robotic Operating System) Basics

ROS Environment

There is a specific structured environment required to utilize ROS. If you are working in the makerspace, most of this has already been taken care of, however, it is good practice to understand the environment in case you want to use ROS for your personal projects.

The Workspace

The workspace is the directory containing all your packages. It is in this directory that we will modify our scripts, install new packages, build our code and more. The name of the workspace is catkin_ws. The catkin workspace contains three main directories: src, build, devel.

The src directory is the source folder. This directory contains all the packages used by the robot. Here we will have core scripts, config files, launch files, node computation and more.

The build directory will have all the files responsible for building the workspace.

The devel directory contains source files and libraries.

Building

In order to detect errors in your files one must build the workspace. Building must be done after making changes to a file or after adding a new package to the src folder. To build the workspace in ROS we use the command catkin_make while in the appropriate workspace, in our case, the catkin_ws directory. Below is an example of what should happen when catkin_make is used.

If catkin_make does not produce any errors, the workspace is functional and can be used to control robots or simulations.