Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

Quickstart

Murilo Belluzzo edited this page Mar 15, 2017 · 13 revisions

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

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.

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. Check Ardupilot's project wiki for instructions on how to build and install.

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.

Clone this wiki locally