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.4 ROS File system – part 2

Course subject(s) Module 1. ROS Essentials

In this second part you will learn more about the src folder in your workspace and ROS packages.

Summary:

ROS packages reside in the ‘src‘ space. In ROS, software is organised in ROS packages. A ROS package typically contains the following things:
– CMakeList.txt
– package.xml (These two files indicate that the folder is a ROS package file. More on these two later in the course)
- scripts/ (This folder contains all Python scripts. We will only use Python in this course)
- src/ (This folder contains all C++ source files. We will not use these in this course)

To create a new ROS package, we will use catkin:
$ cd <path_to_ros_ws>/src
$ catkin_create_pkg hrwros_week2 std_msgs

Please keep in mind that you don’t need to place the source files of any dependencies, such as std_msgs in the line above. Instead, you can simply install their binaries with the rosdep command:
$ rosdep install <package_name>

You can also install all ROS package dependencies in one command:
$ cd <path_to_ros_ws>/src
$ rosdep install --from-paths . --ignore-src -y

src is not the only space in your workspace: there is also the ‘devel‘ space. This contains all binary executables from your src spaces.

If you want more information on the folder structure of a catkin workspace, you can do so 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]