collisinon-avoidance-libraryテスト用にgazeboでAdruCopterのsimulatorを作る

##元記事
https://github.com/intel/collision-avoidance-library/wiki/Quickstart#running-the-simulation


##Quickstart Guide
This is a quick guide to get the source, compile all the features and run a simulation. Our simulation environment were validated with the following revisions/releases:

|Software|	Version|
|--------|-------------|
|Gazebo	 |8.0.0|
|PX4	|1.6.0-rc1|
|ArduCopter|3.4|

**Install Pre-Requisites**
**[Install Gazebo] (http://gazebosim.org/tutorials?tut=install_ubuntu)**
The project uses Gazebo as simulation environment, so it needs to be installed if that feature is desired. Check your distro for available packages for gazebo. If none is available, the last stable version can be obtained at gazebosim.org.

Besides Gazebo itself, our test infrastructure depends on two additional plugins in order to execute the simulation and automated testing: Gazebo Sitl and Gazebo Realsense, so thoses will have to be properly installed as well. Please, follow the instructions of each project on how to do it.
**Gazebo SitlとGazebo Realsense 2つのpluginが必要** 
[Gazebo Stil] (https://github.com/intel/gazebo-sitl)

**Install Autopilot**
The project supports Ardupilot and PX4 as autopilots. **For this quick guide we will be using Ardupilot.** The project is available at the project's [github page.] (https://github.com/ArduPilot/ardupilot/tree/Copter-3.4) Check Ardupilot's project wiki for instructions on how to build and install.

```
Copter-3.4
git clone -b Copter-3.4 --recursive https://github.com/ArduPilot/ardupilot.git

Copter-3.6.12
git clone -b Copter-3.6.12 --recursive https://github.com/ArduPilot/ardupilot.git


```

**Build and Install**
Detailed instructions on how to build and install the project can be found in our README. To be able to run simulations and automated tests, its necessary to enable Tools and Gazebo support during compiling, so make sure that -DWITH_TOOLS=ON -DWITH_GAZEBO=ON is passed to cmake.

Running Simulations
The project provides a script to automate the process of running the autopilot, gazebo and running coav-control plus linking it all together. The script is called coav-sim.sh and can be found in the testbed directory.

Arguments passed to coav-sim.sh will be provided to coav-control and the following table describes some environment variables that can be use to customize the execution.

Environment Variable	Description
AUTOPILOT	Defines which autopilot to use. Valid values are AP_APM and AP_PX4. Default is AP_PX4.
APM_DIR	Prefix path to use to call 'arducopter' when AP_APM is used. Default is empty.
PX4_DIR	Prefix path to use to run PX4 simulation. Default is $HOME/px4/Firmware.
WORLD	File name of the Gazebo environment (sdf file) that will be used in the simulation. Default is 'simple_obstacle.sdf'.
LOGDIR	Path to where to save log files. Default is <script path>/logs.
The following command will start a simulation using Gazebo RealSense as sensor, Simple Detector as detector, Stop Avoidance as avoidance strategy and Ardupilot as autopilot:

AUTOPILOT=AP_APM ./coav-sim.sh -a QC_STOP_AVOIDANCE -d DI_POLAR_HIST -s ST_GAZEBO_REALSENSE
The simulation will start only gazebo server. To see the simulation in Gazebo's graphical interface, open a separate terminal an run the command:

gzclient
Running Automated tests with TestBed
See instructions on Testbed.