ROS2: Vagrant based desktop development environment - org-arl/r2c2 GitHub Wiki
Overview
It can be difficult to develop ROS2 systems on operating systems other than Ubuntu. This page describes how to set up a Vagrant-based desktop development environment in order to provide a more streamlined development experience.
On MacOS:
- MacOS version compatibility issues:
- For example:
- ROS2 dashing (EOL May 2021) is only supported on MacOS Sierra (10.12, EOL October 2019)
- ROS2 foxy (EOL May 2023) is only supported on MacOS Mojave (10.14, EOL September 2021)
- While in certain cases code might compile on newer MacOS versions, there are cases where the code will not compile and support WILL NOT be provided (reinforced by responses by the main contributors to issues raised regarding compilation error on newer MacOS versions)
- For example:
- Homebrew dependency compatibility issues:
- Homebrew does not have good support for versioning, it only supports the latest version.
- Latest versions of Homebrew dependencies can cause compilation errors.
- Requires System Integrity Protection (SIP) to be disabled.
Pre-requisites
- Vagrant 2.2.x (or later)
- VirtualBox 6.1.x (or later)
- https://www.virtualbox.org/
- Install the VirtualBox Extension Pack as well
dashing
Sets up a Vagrant Ubuntu 18.04 Desktop box with:
- VirtualBox Guest Additions
- ROS2 Dashing Desktop
- ROS2 Dashing CycloneDDS RMW implementation
- Development tools and ROS tools
git clone https://github.com/ngyewch/ros2-desktop-vagrant.git
cd ros2-desktop-vagrant/dashing
# NOTE Adjustments to CPU/RAM/VRAM settings may need to be tweaked accordingly in Vagrantfile. See below for more information.
vagrant up --provider virtualbox
Estimated time: ~30m
- Vagrant box download (first-time download): ~10m
- Provisioning (first-time): ~15m
Credentials:
- Username:
vagrant - Password:
vagrant
See also https://github.com/ngyewch/ros2-desktop-vagrant/blob/master/dashing/README.md
Vagrantfile fine-tuning
Current settings:
config.vm.provider "virtualbox" do |v|
v.gui = true
v.memory = 4096
v.cpus = 2
v.customize ["modifyvm", :id, "--vram", "32"]
end
Possible tweaks:
- Memory might be able to go down to 2048 (MB).