From 78d1ea47273da54e58cded7790bb523c074e92a2 Mon Sep 17 00:00:00 2001 From: Stephen Dade Date: Thu, 30 Mar 2017 20:15:09 +1100 Subject: [PATCH] SITL: Added missing files to win_sitl and removed -j4 --- Tools/autotest/win_sitl/RunCopter.bat | 2 +- Tools/autotest/win_sitl/RunPlane.bat | 2 +- Tools/autotest/win_sitl/RunRover.bat | 2 +- Tools/autotest/win_sitl/apm_install.sh | 15 +++++++++ Tools/autotest/win_sitl/readme.txt | 43 ++++++++++++++++++++++++++ 5 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 Tools/autotest/win_sitl/apm_install.sh create mode 100644 Tools/autotest/win_sitl/readme.txt diff --git a/Tools/autotest/win_sitl/RunCopter.bat b/Tools/autotest/win_sitl/RunCopter.bat index f45f6e1728..c1f2aca38b 100644 --- a/Tools/autotest/win_sitl/RunCopter.bat +++ b/Tools/autotest/win_sitl/RunCopter.bat @@ -1,4 +1,4 @@ rem File run APM:Copter SITL rem Assumes a Cgywin install at C:\cygwin chdir C:\cygwin\bin -bash --login -i -c "cd ./ardupilot/ArduCopter && ../Tools/autotest/sim_vehicle.py -j4" +bash --login -i -c "cd ./ardupilot/ArduCopter && ../Tools/autotest/sim_vehicle.py" diff --git a/Tools/autotest/win_sitl/RunPlane.bat b/Tools/autotest/win_sitl/RunPlane.bat index 785f7eca36..e779c0454b 100644 --- a/Tools/autotest/win_sitl/RunPlane.bat +++ b/Tools/autotest/win_sitl/RunPlane.bat @@ -1,4 +1,4 @@ rem File run APM:Plane SITL rem Assumes a Cgywin install at C:\cygwin chdir C:\cygwin\bin -bash --login -i -c "cd ./ardupilot/ArduPlane && ../Tools/autotest/sim_vehicle.py -j4" +bash --login -i -c "cd ./ardupilot/ArduPlane && ../Tools/autotest/sim_vehicle.py" diff --git a/Tools/autotest/win_sitl/RunRover.bat b/Tools/autotest/win_sitl/RunRover.bat index 9ea0143b81..3f27513c4a 100644 --- a/Tools/autotest/win_sitl/RunRover.bat +++ b/Tools/autotest/win_sitl/RunRover.bat @@ -1,4 +1,4 @@ rem File run APM:Rover SITL rem Assumes a Cgywin install at C:\cygwin chdir C:\cygwin\bin -bash --login -i -c "cd ./ardupilot/APMrover2 && ../Tools/autotest/sim_vehicle.py -j4" +bash --login -i -c "cd ./ardupilot/APMrover2 && ../Tools/autotest/sim_vehicle.py" diff --git a/Tools/autotest/win_sitl/apm_install.sh b/Tools/autotest/win_sitl/apm_install.sh new file mode 100644 index 0000000000..a66de1bef4 --- /dev/null +++ b/Tools/autotest/win_sitl/apm_install.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +#A simple script to install the APM SITL environment into cygwin + +python -m ensurepip --user +python -m pip install --user future +git clone git://github.com/ArduPilot/ardupilot.git +git clone git://github.com/tridge/jsbsim.git +cd jsbsim +./autogen.sh +make +cp src/JSBSim.exe /usr/local/bin +cd ../ardupilot +git submodule update --init --recursive +./modules/waf/waf-light configure --board=sitl diff --git a/Tools/autotest/win_sitl/readme.txt b/Tools/autotest/win_sitl/readme.txt new file mode 100644 index 0000000000..88b0807e9b --- /dev/null +++ b/Tools/autotest/win_sitl/readme.txt @@ -0,0 +1,43 @@ +SITL for Windows Automatic Installation Scripts + +This is a collection of batch files to automatically install and run APM SITL (http://ardupilot.org/dev/docs/sitl-simulator-software-in-the-loop.html) on a Windows-based PC/laptop. + +The scripts are based on the SITL setup instructions here: http://ardupilot.org/dev/docs/sitl-native-on-windows.html +Prerequisites: + + None! The scripts will take care of everything. + You will need an Internet connection and an hour of time (will be less with a fast Internet connection) for the scripts to download and install everything. + +Assumptions: + + The scripts will install Cygwin, MAVProxy and the APM source to C:\cygwin. So access to the C:\ drive is required. + +Installing: + + Download these scripts and unzip + Run the script "InstallCygwinAPM.ps1" (right click -> Run in Powershell). This will install Cygwin to C:\cygwin and MAVProxy to C:\Program Files (x86)\MAVProxy + +Running SITL: + +There are several options for running SITL. In all cases, SITL will output a mavlink stream on 127.0.0.1:14550 (UDP) for connection to any GCS software (Such as Mission Planner). + +An EEPROM (containing the state of the APM's flash memory - paramters, waypoints, etc) is saved for each vehicle type and (by default) will be re-loaded each time SITL is run. This can be overidden to start with a new EEPROM containing all default values. + +To continue with the current EEPROM, run: + + RunCopter.bat for a quadcopter running APM:Copter + RunPlane.bat for running APM:Plane + RunRover.bat for running APM:Rover + +To delete the old EEPROM and start with all default settings, run: + + ResetRunCopter.bat for a quadcopter running APM:Copter + ResetRunPlane.bat for running APM:Plane + ResetRunRover.bat for running APM:Rover + +Updating the APM source code + +To update the APM code with the latest of Github, run UpdateAPMSource.bat. Note this is bleeding-edge source code and some bugs may be present. +Deleting the SITL environment + +To uninstall/delete the SITL environment, simply delete the "cygwin" folder in the C:\ drive.