Quickstart Guide — Gazebo Camera
These instructions are in progress. At time of writing build without
--enable-mavlink
and connect onudp port 5600
(RTSP publishing not supported). To be reviewed 9 March 2018.
This Quickstart shows how to build DCM on Ubuntu LTS 16.04 (with support for MAVLink and Avahi) and connect to a camera running within a Gazebo/PX4 vehicle simulation.
Install Gazebo/SITL
First install Gazebo/SITL (DCM requires the dependency is installed before building):
Install Gazebo and PX4 SITL using the scripts in the PX4 Developer Guide: Development Environment on Linux > jMAVSim/Gazebo Simulation.
Edit the typhoon_h480 configuration file in the PX4 source (/Firmware/posix-configs/SITL/init/ekf2/typhoon_h480).
- Replace:
mavlink start -x -u 14556 -r 4000000
- With:
mavlink start -x -u 14556 -r 4000000 -f mavlink start -x -u 24550 -f -o 34550
- Replace:
Set up DCM
To set up DCM for use with Gazebo:
- Install the Core and Avahi pre-requisites:
sudo apt-get update -y sudo apt-get install git autoconf libtool python-pip -y sudo apt-get install gstreamer-1.0 \ libgstreamer-plugins-base1.0-dev \ libgstrtspserver-1.0-dev -y ## Required python packages sudo pip2 -q install -U future # Avahi sudo apt-get install libavahi-client-dev libavahi-core-dev libavahi-glib-dev -y
- Get the DCM source code by cloning the the camera-manager repo (or your fork):
git clone https://github.com/Dronecode/camera-manager.git cd camera-manager git submodule update --init --recursive
- Configure DCM as shown:
./autogen.sh && ./configure --enable-mavlink --enable-avahi --enable-gazebo
Run DCM/Gazebo
To run DCM on Ubuntu along with Gazebo PX4-SITL:
- Open QGroundControl build from master branch.
- Start PX4-SITL gazebo from the PX4 /Firmware folder:
make posix gazebo_typhoon_h480
- Serve the sample Camera Definition Files:
- Open a new terminal to /samples/def
- Enter the following command to start the server on the default port (8000):
python -m SimpleHTTPServer
- Run DCM, specifying the Gazebo configuration file:
./dcm -c samples/config/gazebo.conf
Then run the Sanity Tests to verify that DCM is working correctly.