ROS Workspace and Package Layout

The layout below is a typical ROS2 workspace:

user:~/workspace/ros-projects/ros_ws_demo$ tree
.
β”œβ”€β”€ build
β”œβ”€β”€ install
β”œβ”€β”€ log
└── src
    β”œβ”€β”€ package_A
    β”‚Β Β  β”œβ”€β”€ CMakeLists.txt
    β”‚Β Β  β”œβ”€β”€ launch
    β”‚Β Β  β”œβ”€β”€ msg
    β”‚Β Β  β”œβ”€β”€ package.xml
    β”‚Β Β  └── src
    β”‚Β Β      β”œβ”€β”€ program_1.cpp
    β”‚Β Β      β”œβ”€β”€ program_2.cpp
    β”‚Β Β      └── program_3.cpp
    └── package_B
        β”œβ”€β”€ CMakeLists.txt
        β”œβ”€β”€ launch
        β”œβ”€β”€ package.xml
        └── src
            β”œβ”€β”€ program_x.cpp
            └── program_y.cpp

Terminology

  • ~/workspace/ros-projects/ros_ws_demo is the root of the workspace

  • ~/workspace/ros-projects/ros_ws_demo/src/package_A is the root of the package A

Last updated