Workspace & Packages
After installing the MRS UAV System, you need to set up the ROS2 workspace, clone project-specific packages, and build everything.
ROS2 Workspace Setup
The setup utility provides an automated workspace setup under menu option 7 (Setup ROS2 workspace). This creates and configures the ROS2 workspace at ~/workspace.
After running the MRS install script and the workspace setup, you should have:
~/
├── git/
│ ├── install_script/ # The setup utility
│ ├── mrs_uav_deployment/ # MRS deployment configs and tmux sessions
│ └── ... # Other MRS packages
└── workspace/
└── src/ # Symlinks to packages in ~/git/
Cloning Project Packages
Clone all required project-specific packages into the ~/git/ folder:
cd ~/git
git clone <package_url>
# Repeat for all required packages
The specific packages to clone depend on the UAV proposal document and client requirements.
Creating Symlinks
Create symbolic links from the cloned packages to the workspace:
ln -s ~/git/<package_name> ~/workspace/src/
# Repeat for all packages that need to be built
This keeps the git repositories in ~/git/ while making them available to the ROS2 build system.
Colcon Defaults
The setup utility also configures colcon mixins and a colcon_defaults.yaml file at the workspace root, so every colcon build picks up the same flags without extra arguments.
The defaults file created by the wizard looks like:
build:
parallel-workers: 8
mixin:
- rel-with-deb-info
What this gives you:
parallel-workers: 8— caps the build parallelism at 8 jobs. Prevents OOM on UAV hardware with limited RAM.rel-with-deb-infomixin — from the MRS mixin repo, builds inRelWithDebInfomode (optimized code with debug symbols). Good balance between runtime performance and debuggability.
The wizard registers two mixin repos and sets the MRS one as default:
colcon-mixin-repository— upstream community mixinsmrs_uav_developmentmixins — MRS-specific build presets
If you edit colcon_defaults.yaml, you don't need to pass flags on the command line — colcon build picks them up automatically from the workspace root.
Building the Workspace
Build the workspace after all packages are linked:
cd ~/workspace
colcon build
If the build still runs out of memory, make sure you ran the Set Swap to 16GB step. You can also lower parallel-workers in colcon_defaults.yaml (e.g. to 2) or override it once with colcon build --parallel-workers 2.
Cleanup
Remove unnecessary default Ubuntu folders to keep the home directory clean:
rm -rf ~/Desktop ~/Documents ~/Videos ~/Music ~/Downloads ~/Pictures ~/Templates ~/Public
The home directory should only contain:
~/git/- Git repositories~/workspace/- ROS2 workspace~/example_session/- Flight session (created in the Tmux Session section)