This repository contains ROS packages for the DroneEmployee project.
- UAV with MAVLink-compatible flight controller (APM, PX4)
- GPS/GLONASS module
- Wireless Internet provider (LTE/3G modem)
- Linux-compatible single board computer (RaspberryPi2)
In other case you can use the Software In The Loop solution for testing described down.
The AIRA ROS Bridge instance is needed, installation and simple usage described there.
Software In The Loop instance installation described there.
The next, create workspace and clone the repo:
$ mkdir workspace/src -p
$ cd workspace/src && catkin_init_workspace
$ git clone https://github.com/DroneEmployee/drone_employee_ros.git
$ cd ..
Install dependecies by rosdep:
$ rosdep install --from-paths src --ignore-src --rosdistro indigo -y
Build the packages:
$ cakin_make
The smart contract should be registered before using the Drone Employee. The contracts small_atc.sol and drone_employee.sol from contracts repository should be compiled by any solidity compiler, online compier for example. Compiled contracts passed to network by any Ethereum client, returned contract address in future used by AIRA ROS Bridge as argument.
Builded workspace should be added to ROS env:
$ source workspace/devel/setup.sh
The next you should run GEth node and AIRA ROS Bridge:
$ geth &
$ cd /path/to/aira_ros_bridge
$ node start.js CONTRACT_ADDRESS
Simple run the launch:
$ roslaunch small_atc atc.launch
Run the SITL:
$ cd /path/to/ArduCopter
$ export PATH=$PATH:../ardupilot/Tools/autotest
$ fg_quad_view.sh & sim_vehicle.sh --map --console
Launch the ROS node:
$ roslaunch drone_employee apm_sitl.launch
Difference from upper is a using real ArduPilot or PX4 hardware connected by UART or USB port. For using serial port in launch file you should set the fcu_url parameter:
$ roslaunch drone_employee apm_sitl.launch fcu_url:=/dev/ttyUSB0:115200
The argument is a serial device and baudrate.