Skip to content

Instantly share code, notes, and snippets.

@mintar mintar/Vagrantfile
Created Feb 28, 2018

Embed
What would you like to do?
Tiago tutorials Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provider "virtualbox" do |vb|
vb.memory = "2048"
end
$script = <<-SHELL
export CI_ROS_DISTRO="indigo"
export CATKIN_WS=~/tiago_public_ws
export CATKIN_WS_SRC=${CATKIN_WS}/src
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu trusty main" > /etc/apt/sources.list.d/ros-latest.list'
wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
sudo apt-get update
sudo apt-get install -y python-rosdep python-rosinstall python-catkin-tools git build-essential cmake
sudo rosdep init
rosdep update
sudo add-apt-repository --yes ppa:xqms/opencv-nonfree
sudo apt-get update
sudo apt-get install -y libopencv-nonfree-dev
# install ros-core, otherwise rosinstall complains that /opt/ros/indigo doesn't exist
sudo apt-get install -y ros-$CI_ROS_DISTRO-ros-core
mkdir -p $CATKIN_WS_SRC
cd $CATKIN_WS
wget https://raw.githubusercontent.com/pal-robotics/tiago_tutorials/master/tiago_public.rosinstall
rosinstall src /opt/ros/indigo tiago_public.rosinstall
# Use rosdep to install all dependencies
rosdep install --from-paths src --ignore-src -y --rosdistro indigo --skip-keys="opencv2 opencv2-nonfree pal_laser_filters speed_limit sensor_to_cloud"
source /opt/ros/$CI_ROS_DISTRO/setup.bash
# Init catkin workspace
catkin init
# Build [and Install] packages
catkin build --limit-status-rate 0.1 --no-notify -DCMAKE_BUILD_TYPE=Release
source $CATKIN_WS/devel/setup.bash
SHELL
config.vm.provision "shell", inline: $script, privileged: false
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.