Back to the 2026 paper

Module 2: Basics of Robot Operating System (ROS)

20267m

Explain the concept of a Catkin workspace.

Worked SolutionAI Assisted

Catkin Workspace

Catkin is the official build system of ROS (it replaced rosbuild). It is based on CMake and Python and builds many packages together. A catkin workspace is a folder where you create, build and install catkin packages.

Workspace structure

MermaidDiagram
Rendering diagram…
Folder Purpose
src Source code of all packages (you edit here)
build Intermediate build files, CMake cache
devel Generated executables, libraries and setup.bash
install Created by catkin_make install
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace
cd ~/catkin_ws
catkin_make
source devel/setup.bash

Each package must contain package.xml (metadata, dependencies) and CMakeLists.txt (build rules).

Why it matters

  • Builds many packages in one command with correct dependency order.
  • source devel/setup.bash adds the workspace to ROS_PACKAGE_PATH, so rosrun and roslaunch can find your nodes.
  • Workspaces can be overlaid on one another.

Exam tip

Write the folder tree, the 5 commands above and the role of package.xml and CMakeLists.txt. (ROS 2 uses colcon instead of catkin.)

Similar questions

AI LearningWeb Platform

Coursify — Personal AI Course Generator

Struggling with a difficult subject or concept? Turn any engineering topic into a structured course with interactive lessons, quizzes, and research-backed explanations.