Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/drift-tech/drift-releases/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Drift CLI provides intelligent workspace management that eliminates the manual overhead of creating and organizing ROS2 workspaces. With automatic package generation and smart organization, you can focus on building robots instead of managing directory structures.
Drift handles all the complexity of ROS2 workspace setup, from package creation to build configuration.

Automatic package generation

When you create a robot or component using Drift, it automatically generates properly structured ROS2 packages with all necessary files:
  • Package manifest files (package.xml)
  • CMake configuration (CMakeLists.txt)
  • Source directories and starter code
  • Robot description files (URDF/Xacro)
  • Launch file directories
  • Resource and configuration folders

Example: Creating a workspace

drift> create a ROS workspace
Drift generates a complete workspace structure:
my_workspace/
├── src/
│   └── (your packages will go here)
├── build/
├── install/
└── log/

Example: Creating a robot package

drift> create a three arm manipulator with camera sensor
Drift automatically creates:
my_workspace/src/three_arm_manipulator/
├── package.xml
├── CMakeLists.txt
├── urdf/
│   ├── robot.urdf.xacro
│   └── camera.xacro
├── launch/
│   └── robot_launch.py
├── config/
│   └── controllers.yaml
└── meshes/
You don’t need to know the exact ROS2 package structure — Drift creates everything according to ROS2 best practices.

Workspace organization

Drift intelligently organizes your workspace to follow ROS2 conventions and best practices:

Package separation

Each robot or component gets its own package, keeping your workspace clean and modular.

Dependency management

Drift automatically adds required dependencies to your package.xml files.

Build optimization

Smart build configurations ensure fast compilation and proper linking.

Source control ready

Generated workspaces follow .gitignore best practices for version control.

Logical file placement

Drift knows where different types of files belong:
  • Robot descriptionsurdf/ directory
  • Launch fileslaunch/ directory
  • Configuration filesconfig/ directory
  • 3D modelsmeshes/ directory
  • Source codesrc/ directory

How Drift manages ROS2 workspaces

Drift provides comprehensive workspace lifecycle management:

Workspace initialization

When you start a new project:
drift> create a ROS workspace for my robot project
Drift will:
  1. Create the workspace directory structure
  2. Initialize the build system
  3. Set up environment configuration
  4. Create a .gitignore file

Package addition

When you add new components:
drift> add a lidar sensor to my robot and rebuild
Drift will:
  1. Update the robot’s URDF with the new sensor
  2. Add necessary dependencies to package.xml
  3. Update CMakeLists.txt if needed
  4. Rebuild the affected packages
Drift only rebuilds what’s necessary, saving you time during development iterations.

Dependency resolution

Drift automatically handles dependencies:
  • Detects required ROS2 packages
  • Adds them to your package manifest
  • Ensures build order is correct
  • Warns about missing system dependencies

Build management

Drift integrates with the ROS2 build system:
drift> rebuild my workspace
Drift uses colcon under the hood with optimized settings:
  • Parallel compilation for speed
  • Symlink installation for faster iteration
  • Proper error reporting and recovery
Drift requires a properly installed ROS2 environment. Make sure you’ve sourced your ROS2 setup file before running Drift.

Advanced workspace features

Multi-package projects

Drift can manage complex projects with multiple packages:
drift> create a navigation stack with mapping and localization packages
This creates multiple interconnected packages with proper dependencies.

Workspace overlays

Drift understands ROS2 workspace overlaying:
  • Works with existing ROS2 installations
  • Can overlay on top of other workspaces
  • Properly sources the workspace chain

Environment management

Drift helps you manage environment variables:
drift> what's in my ROS environment?
Get information about:
  • Active ROS distribution
  • Sourced workspaces
  • Package paths
  • Important environment variables
Use Drift to quickly check your environment setup when troubleshooting build or runtime issues.

Best practices

When working with Drift’s workspace management:

Start clean

Let Drift create workspaces from scratch rather than trying to retrofit existing ones:
drift> create a new ROS workspace for my mobile robot

Use descriptive names

Be clear about what you’re building:
drift> create a warehouse inspection robot package
Drift will use your description to generate appropriate package names.

Trust the automation

Drift handles the boilerplate, so you can focus on unique logic:
  • Let Drift generate launch files
  • Let Drift manage dependencies
  • Let Drift organize files

Iterate quickly

Drift makes it easy to modify and rebuild:
drift> add a depth camera and rebuild
drift> change the robot base to holonomic drive
drift> add obstacle avoidance capability
Each command intelligently updates your workspace.

Getting started

To leverage Drift’s workspace management:
  1. Launch Drift:
    drift
    
  2. Create your workspace:
    drift> create a ROS workspace
    
  3. Add your first robot:
    drift> create a mobile robot with lidar
    
  4. Build and iterate:
    drift> build the workspace
    drift> add a camera sensor
    
Drift handles all the ROS2 complexity behind the scenes!

Build docs developers (and LLMs) love