Skip to content

Setting up your simulator

Miles Cobb edited this page Apr 8, 2019 · 29 revisions

Setting up a Vagrant simulator

Prerequisites

  1. Git
    Leave line endings untouched git config --global core.autocrlf false
  2. Install VirtualBox for your OS
  3. Install Vagrant for your OS
  4. Clone the autopilot repository git clone https://github.com/ArduPilot/ardupilot.git

Configure Vagrant

  1. Within the ardupilot directory add the following lines to your vagrantfile before the final "end"

    config.vm.network "forwarded_port", guest: 5760, host: 5760, protocol: "tcp"
    config.vm.network "forwarded_port", guest: 5761, host: 5761, protocol: "tcp"
    config.vm.network "forwarded_port", guest: 5762, host: 5762, protocol: "tcp"
    config.vm.network "forwarded_port", guest: 5763, host: 5763, protocol: "tcp"

  2. Launch vagrant vagrant up
  3. Initialize submodules
    vagrant ssh
    cd /vagrant
    git submodule update --init --recursive
    exit

Launching your simulator

  1. Launch your virtual machine vagrant up from within the ardupilot/Tools/vagrant directory
  2. Start your simulator vagrant ssh -c "sim_vehicle.py -j 2 -v ArduCopter"