Skip to main content
The TurtleBot3 development environment uses the standard ROS2 workspace structure with colcon as the build system.

Directory layout

The workspace is organized into four main directories:
/workspace/turtlebot3_ws/
├── src/           # Source code (you work here)
├── build/         # Build artifacts (generated, don't edit)
├── install/       # Installed binaries (generated)
└── log/           # Build logs (generated)

src directory

The src/ directory contains all ROS2 package source code. This is where you develop and modify packages. Default packages cloned during setup:
  • DynamixelSDK/ - Motor control SDK for TurtleBot3 actuators
  • turtlebot3/ - Core TurtleBot3 packages
  • turtlebot3_msgs/ - ROS2 message definitions
  • turtlebot3_simulations/ - Gazebo simulation packages
You can add your own custom packages to this directory.

build directory

The build/ directory contains intermediate build artifacts generated by colcon. This includes:
  • Compiled object files
  • CMake cache files
  • Build system metadata
Do not edit files in this directory manually. It is automatically generated during the build process.

install directory

The install/ directory contains the final installed packages and binaries. Key contents:
  • setup.bash - Workspace environment setup script
  • Package executables and libraries
  • Installed resources and configuration files
Source this directory to use built packages:
source install/setup.bash

log directory

The log/ directory contains build logs and event files from colcon:
  • Individual package build logs
  • Error messages and warnings
  • Build event timeline
Useful for debugging build failures:
cat /workspace/turtlebot3_ws/log/latest*/events.log

Version control considerations

When using Git with your ROS2 workspace: Do commit:
  • Source code in src/
  • Configuration files
  • Custom launch files
  • Documentation
Don’t commit:
  • build/ directory
  • install/ directory
  • log/ directory
  • Temporary files
These directories are already excluded in the .gitignore file.

Workspace permissions

The post-create.sh script ensures proper permissions:
sudo chown -R $(whoami):$(whoami) /workspace/turtlebot3_ws
This allows you to build and modify packages without permission issues.

Build docs developers (and LLMs) love