Important announcement

Dear visitor,

Please note that this OpenCourseWare platform will be replaced at the end of 2026 by a new platform (under the same url ocw.tudelft.nl).

Courses and their contents that are currently available the platform will partly be migrated. URL’s for this content will change and content might be unavailable for some time. In addition, some courses will not be available anymore.

If you are linking to specific courses on this platform (for instance for your students), please take timely measures to avoid problems with access. Possible actions are:

  • Download the materials to your local platform (laptop, server)
  • For educators only (including TU Delft lecturers): Contact us at ocw@tudelft.nl and inform us what course you are using in what context (institute, program, period of use, number of students). We will research (in collaboration with the authors of the course) and decide if we will migrate the course, and if yes, can supply you with a new url.

Thank you.

1.2.3 ROS File system – part 1

Course subject(s) Module 1. ROS Essentials

This lesson consists of two videos about the ROS File system. In this first part you will mainly focus on setting up your workspace with catkin.

Important note

The video mentions working with the older ROS version Kinetic. The course currently uses Melodic, therefore you should source the appropriate file: opt/ros/melodic/setup.bash.

ROS file system – nomenclature

ROS workspace (catkin workspace) consists of different subspaces. A workspace is a folder to organize ROS project files. ROS uses catkin, which is a build tool to compile source files into binary files. Your code goes into the src workspace folder and catkin manages the other ones. A catkin ROS workspace contains three main spaces:

src space: contains source code, this will be your main work folder
devel space: contains setup files for the project ROS environment
build space: contains the compiled binary files
If you’d like to read some more about these spaces, you can do so here.

We will now guide you through the creation of our own catkin workspace in ROS. This workspace will just be used as an example to show you the process, and won’t be used anymore after this.

First, create a new folder for your workspace:
$ mkdir -p new_ros_ws/src

You can use the ls command to verify the new folder that was created.
Next move to your newly created workspace using the command cd new_ros_ws.
Thereafter, setup the correct ROS environment using the command source /opt/ros/kinetic/setup.bash. Finally, we initialize catkin:
$ catkin init
$ catkin build

Warning!

If you independently follow the tutorials on ROS Wiki, you might come across the command catkin_make. That is different to what we use in our course which is catkin. Don’t try and mix the two! They are not compatible. You can read up on catkin here.

Creative Commons License
Hello (Real) World with ROS - Robot Operating System by TU Delft OpenCourseWare is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Based on a work at https://online-learning.tudelft.nl/courses/hello-real-world-with-ros-robot-operating-systems//.
Back to top
[sg_popup id=6]