<commit_before>## Safety Warning and Disclaimer

You are using this software at your own risk. The authors decline any responsibility for personal injuries and/or property damage.

Some drones supported by this framework ARE NOT TOYS. Even operation by expert users might cause SERIOUS INJURIES to people around. So, please consider flying in a properly screened or isolated flight area.

## cvg_quadrotor_swarm stack

We present a cost-effective framework for the prototyping of vision-based quadrotor multi-robot systems, which core characteristics are: modularity, compatibility with different platforms and being flight-proven. The framework is fully operative and based on [ROS](http://ros.org/ "Robot Operating System"). It works in simulation and in real flight tests of up to 5 drones, and was demonstrated during our participation in the 2013 International Micro Air Vehicle Indoor Flight Competition [IMAV2013](http://www.imav2013.org/ "2013 International Micro Air Vehicle Indoor Flight Competition") (Toulouse, France).

The current distribution supports only the usage of the AR Drone 1.0 & 2.0. The architecture has been modified to be able to handle other platforms such as the: UASTech LinkQuad, Mikrokopter Oktokopter and the Asctec Pelican. Suitable driver modules for these quadrotors are currently in development.

The connectivity between modules of the stack is specified in:
`${DRONE_STACK}/documentation/system_module_architecture.png` . Where ${DRONE_STACK} refers to the folder where this software stack was downloaded. The functionality of the modules is explained in the following paper:

- <NAME>, <NAME>, <NAME>, <NAME>. “Visual Quadrotor Swarm for IMAV 2013 Indoor Competition”. In 2013 International Micro Aerial Vehicle Conference and Flight Competition (IMAV 2013). Toulouse (France). September, 17-20, 2013. [Link](http://uvs-info.com/phocadownload/02_2clh_Technical-Session-4_Vision/Visual_Quadrotor_Swarm_for_IMAV_2013_Indoor_Competition.pdf "IMAV_2013 CVG group paper").
- [http://www.vision4uav.eu/?q=quadrotor_stack](http://www.vision4uav.eu/?q=quadrotor_stack "http://www.vision4uav.eu")
- [http://www.vision4uav.eu/?q=swarm](http://www.vision4uav.eu/?q=swarm "http://www.vision4uav.eu")
- [http://www.vision4uav.eu/?q=imav13](http://www.vision4uav.eu/?q=imav13 "http://www.vision4uav.eu")

## Table of Contents

- [Installation](#installation)
	- [Pre-requirements](#pre-requirements)
	- [Installation Steps](#installation-steps)
- [Network setup](#Network-setup)
- [Launch scripts](#Launch-scripts)
- [Coordinate Frames](#Coordinate-Frames)
- [How to Run](#how-to-run)
	- [Navigation with console UI](#Navigation-with-console UI)
	- [Complete mission execution](#Complete-mission-execution)
- [Other README files](#Other-README-files)
- [License](#license)
- [Contributors](#Contributors)
- [Contact Information](#Contact-Information)

## Installation
### Pre-requirements 

This driver has been tested on Linux machines running Ubuntu 12.10 (64 bit). However it should also work on any other mainstream Linux distributions. The driver has been tested on ROS "groovy". The code requires a compiler that is compatible with the C++11 standard. Additional required libraries are: boost and ncurses. The ROS package depends on these ROS packages: `ardrone_autonomy`, `opencv2`, `roscpp`, `image_transport`, `sensor_msgs` and `std_srvs`.

### Installation Steps

The installation follows the same steps needed usually to compile a self-contained ROS stack.

* Install ncurses and the boost libraries in your system.

        ```bash
        $ sudo apt-get install libncurses5
        $ sudo apt-get install ncurses-bin
        $ sudo apt-get install ncurses-dev
        $ sudo apt-get install libboost1.49-dev
        ```

* Create a ROS_WORKSPACE to install the stack and the required external ROS packages and stacks. For example, A ROS_WORKSPACE can be configured in the folder. `~/workspace/ros/quadrotor`. The following steps are advised:

        ```bash
        $ # create the ~/workspace/ros/quadrotor folder
        $ cd ~
        $ mkdir workspace
        $ cd workspace
        $ mkdir ros
        $ cd ros
        $ mkdir quadrotor
        $ cd quadrotor
        $ # initialize ROS workspace using ROS groovy
        $ rosws init ./ /opt/ros/groovy
        ```

* Download the required ROS packages using git or rosws:

        ```bash
        $ # create folder where external ROS stacks are downloaded
        $ rosws set ./extStack
        $ # set folder to download the ardrone_autonomy ROS package
        $ rosws set ./extStack/ardrone_autonomy --git https://github.com/AutonomyLab/ardrone_autonomy.git
        $ # set folder to download the cvg_quadrotor_swarm ROS package
        $ rosws set ./stack --git https://bitbucket.org/joselusl/quadrotor_swarm.git
        $ # download both packages using git, through the rosws command
        $ rosws update
        ```

* Set up the `DRONE_STACK` and `DRONE_WORKSPACE` environment variables. 

        ```bash
        $ ./stack/documentation/installation/installers/installWS.sh
        $ cd stack
        $ ./documentation/installation/installers/installStack.sh
        ```

* Each time the cvg_quadrotor_swarm is going to be used, do the following (note that the ROS_WORKSPACE and other ROS environment variables should not be loaded in the .bashrc file or other ubuntu terminal startup files):

        ```bash
        $ cd ${DRONE_STACK}
        $ source setup.sh
        ```

* Final steps installation instructions:

        ```bash
        $ cd ${DRONE_STACK}
        $ source setup.sh
        $ rospack profile
        $ rosdep update
        $ # Compile external ROS packages: ardrone_autonomy
        $ cd ../extStack/ardrone_autonomy/
        $ roscd ardrone_autonomy
        $ /build_sdk.sh
        ```

* Compile the stack:

        ```bash
        $ cd ${DRONE_STACK}/launchers/
        $ ./rosmake_01.sh
        $ ./rosmake_sim_01.sh
        ```

## Network setup

First: checkout the related ROS tutorial `http://wiki.ros.org/ROS/NetworkSetup` .

Then, follow these steps:

1. Configure a LAN network connection to communicate this ground stations with the rest using ROS. The configuration that we have used during testing is shown in the image (in this folder): ${DRONE_STACK}/documentation/network_configuration/ROS_NETWORK_config.png (from now called ROS_NETWORK).

2. Edit the hosts file, all the computers in the network have to be included in it. The IPs have to be the same that is specified in the configuration of each computer's ROS_NETWORK configuration.

	- to edit the hosts file, run: sudo gedit /etc/hosts
	- an example of it is shown in the file (in this folder): ${DRONE_STACK}/documentation/network_configuration/hosts

3. Restart your network for the configuration changes to take place.

## Coordinate Frames

There are several coordinate frames, which location is briefly documented in `${DRONE_STACK}/documentation/Coordinate_Frames/Coordinate_Frames_documentation.tex/pdf`. Please, refer to this documentation to understand the coordinate frames involved in running the software stack.

### Multirotor coordinate frame

In the documentation located in `${DRONE_STACK}/documentation/Coordinate_Frames/Coordinate_Frames_documentation.tex/pdf`, this reference frame is called F_{drone_LMrT}.

The reference frame that is used to reference the multirotor's telemetry, broadcasted by the multirotor's ROS driver, is:

	[Fm] the mobile reference frame is centered on the drone, with:
	 [xm] horizontal and pointing forward (same direction as the optical axis of the frontal camera
	 [ym] horizontal and pointing rightwards from the center of the drone<commit_msg>version beta 1.0<commit_after>## Safety Warning and Disclaimer

You are using this software at your own risk. The authors decline any responsibility for personal injuries and/or property damage.

Some drones supported by this framework ARE NOT TOYS. Even operation by expert users might cause SERIOUS INJURIES to people around. So, please consider flying in a properly screened or isolated flight area.

## cvg_quadrotor_swarm stack

We present a cost-effective framework for the prototyping of vision-based quadrotor multi-robot systems, which core characteristics are: modularity, compatibility with different platforms and being flight-proven. The framework is fully operative and based on [ROS](http://ros.org/ "Robot Operating System"). It works in simulation and in real flight tests of up to 5 drones, and was demonstrated during our participation in the 2013 International Micro Air Vehicle Indoor Flight Competition [IMAV2013](http://www.imav2013.org/ "2013 International Micro Air Vehicle Indoor Flight Competition") (Toulouse, France).

The current distribution supports only the usage of the AR Drone 1.0 & 2.0. The architecture has been modified to be able to handle other platforms such as the: UASTech LinkQuad, Mikrokopter Oktokopter and the Asctec Pelican. Suitable driver modules for these quadrotors are currently in development.

The connectivity between modules of the stack is specified in:
`${DRONE_STACK}/documentation/system_module_architecture.png` . Where ${DRONE_STACK} refers to the folder where this software stack was downloaded. The functionality of the modules is explained in the following paper:

- <NAME>, <NAME>, <NAME>, <NAME>. “Visual Quadrotor Swarm for IMAV 2013 Indoor Competition”. In 2013 International Micro Aerial Vehicle Conference and Flight Competition (IMAV 2013). Toulouse (France). September, 17-20, 2013. [Link](http://uvs-info.com/phocadownload/02_2clh_Technical-Session-4_Vision/Visual_Quadrotor_Swarm_for_IMAV_2013_Indoor_Competition.pdf "IMAV_2013 CVG group paper").
- [http://www.vision4uav.eu/?q=quadrotor_stack](http://www.vision4uav.eu/?q=quadrotor_stack "http://www.vision4uav.eu")
- [http://www.vision4uav.eu/?q=swarm](http://www.vision4uav.eu/?q=swarm "http://www.vision4uav.eu")
- [http://www.vision4uav.eu/?q=imav13](http://www.vision4uav.eu/?q=imav13 "http://www.vision4uav.eu")

## Table of Contents

- [Installation](#installation)
	- [Pre-requirements](#pre-requirements)
	- [Installation Steps](#installation-steps)
- [Network setup](#Network-setup)
- [Launch scripts](#Launch-scripts)
- [Coordinate Frames](#Coordinate-Frames)
- [How to Run](#how-to-run)
	- [Navigation with console UI](#Navigation-with-console UI)
	- [Complete mission execution](#Complete-mission-execution)
- [Other README files](#Other-README-files)
- [License](#license)
- [Contributors](#Contributors)
- [Contact Information](#Contact-Information)

## Installation
### Pre-requirements 

This driver has been tested on Linux machines running Ubuntu 12.10 (64 bit). However it should also work on any other mainstream Linux distributions. The driver has been tested on ROS "groovy". The code requires a compiler that is compatible with the C++11 standard. Additional required libraries are: boost and ncurses. The ROS package depends on these ROS packages: `ardrone_autonomy`, `opencv2`, `roscpp`, `image_transport`, `sensor_msgs` and `std_srvs`.

### Installation Steps

The installation follows the same steps needed usually to compile a self-contained ROS stack.

* Install ncurses and the boost libraries in your system.

        ```bash
        $ sudo apt-get install libncurses5
        $ sudo apt-get install ncurses-bin
        $ sudo apt-get install ncurses-dev
        $ sudo apt-get install libboost1.49-dev
        ```

* Create a ROS_WORKSPACE to install the stack and the required external ROS packages and stacks. For example, A ROS_WORKSPACE can be configured in the folder. `~/workspace/ros/quadrotor`. The following steps are advised:

        ```bash
        $ # create the ~/workspace/ros/quadrotor folder
        $ cd ~
        $ mkdir workspace
        $ cd workspace
        $ mkdir ros
        $ cd ros
        $ mkdir quadrotor
        $ cd quadrotor
        $ # initialize ROS workspace using ROS groovy
        $ rosws init ./ /opt/ros/groovy
        ```

* Download the required ROS packages using git or rosws:

        ```bash
        $ # create folder where external ROS stacks are downloaded
        $ rosws set ./extStack
        $ # set folder to download the ardrone_autonomy ROS package
        $ rosws set ./extStack/ardrone_autonomy --git https://github.com/AutonomyLab/ardrone_autonomy.git
        $ # set folder to download the cvg_quadrotor_swarm ROS package
        $ rosws set ./stack --git https://bitbucket.org/joselusl/quadrotor_swarm.git
        $ # download both packages using git, through the rosws command
        $ rosws update
        ```

* Set up the `DRONE_STACK` and `DRONE_WORKSPACE` environment variables. 

        ```bash
        $ ./stack/documentation/installation/installers/installWS.sh
        $ cd stack
        $ ./documentation/installation/installers/installStack.sh
        ```

* Each time the cvg_quadrotor_swarm is going to be used, do the following (note that the ROS_WORKSPACE and other ROS environment variables should not be loaded in the .bashrc file or other ubuntu terminal startup files):

        ```bash
        $ cd ${DRONE_STACK}
        $ source setup.sh
        ```

* Final steps installation instructions:

        ```bash
        $ cd ${DRONE_STACK}
        $ source setup.sh
        $ rospack profile
        $ rosdep update
        $ # Compile external ROS packages: ardrone_autonomy
        $ cd ../extStack/ardrone_autonomy/
        $ roscd ardrone_autonomy
        $ /build_sdk.sh
        ```

* Compile the stack:

        ```bash
        $ cd ${DRONE_STACK}/launchers/
        $ ./rosmake_01.sh
        $ ./rosmake_sim_01.sh
        ```

## Network setup

First: checkout the related ROS tutorial `http://wiki.ros.org/ROS/NetworkSetup` .

Then, follow these steps:

1. Configure a LAN network connection to communicate this ground stations with the rest using ROS. The configuration that we have used during testing is shown in the image (in this folder): `${DRONE_STACK}/documentation/network_configuration/ROS_NETWORK_config.png` (from now called ROS_NETWORK).

2. Edit the hosts file, all the computers in the network have to be included in it. The IPs have to be the same that is specified in the configuration of each computer's ROS_NETWORK configuration.

	- to edit the hosts file, run: sudo gedit /etc/hosts
	- an example of it is shown in the file (in this folder): `${DRONE_STACK}/documentation/network_configuration/hosts`

3. Restart your network for the configuration changes to take place.

## Coordinate Frames

There are several coordinate frames, which location is briefly documented in `${DRONE_STACK}/documentation/Coordinate_Frames/Coordinate_Frames_documentation.tex/pdf`. Please, refer to this documentation to understand the coordinate frames involved in running the software stack.

### Multirotor coordinate frame

In the documentation located in `${DRONE_STACK}/documentation/Coordinate_Frames/Coordinate_Frames_documentation.tex/pdf`, this reference frame is called F_{drone_LMrT}.

The reference frame that is used to reference the multirotor's telemetry, broadcasted by the multirotor's ROS driver, is:

	[Fm] the mobile reference frame is centered on the drone, with:
	 [xm] horizontal and pointing forward (same direction as the optical axis of the frontal camera
	 [ym] horizontal and pointing rightwards from the center of the drone
{'fraction_non_alphanumeric': 0.08353345881742065, 'fraction_numerical': 0.011293567858765495, 'mean_word_length': 3.732186732186732, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 4, 'lorem ipsum': 0, 'www.': 20, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7402967', 'n_tokens_mistral': 4538, 'n_tokens_neox': 4152, 'n_words': 1635}