This is the repo used to maintain the codebase for the DR-1 project at the Florida Tech Dynamic Systems, Controls, and Mechatronics Lab. The project utilizes the PX4 flight stack, MAVROS, and OpenCV in order to generate a relative state vector from a target position and generate the necessary commands for the flight computer in order to land on the target. System integration and testing occurs on a Gazebo flight simulator developed by the PX4 group using a Hardware-in-the-Loop approach, and on a Pixhawk equipped hexacopter. Algorithms and code validated on a LattePanda Alpha, however will likely work on a wide variety of companion computers.
-
Install Ubuntu 16.04
- Make a bootable USB disk with the Ubuntu image as per the instructions here: https://ubuntu.com/tutorials/create-a-usb-stick-on-ubuntu#1-overview
- Boot the LattePanda from the USB drive. In order to do this, rapidly press the F7 button as the device is starting in order to reach the Boot Manager. Select the UEFI OS USB drive that you just created.
- Install Ubuntu to the device. It is suggested that a clean install with Ubuntu as the primary operating system is selected.
-
Install ROS Kinetic using these instruction: http://wiki.ros.org/kinetic/Installation/Ubuntu
-
Configure repositories to allow "Restricted", "Universe", and "Multiverse" packages.
-
Setup Ubuntu sources to accept packages from the ROS package server:
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
-
Setup security keys to accept signed software from the ROS package server:
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
-
Update apt index:
sudo apt-get update
-
Install ROS Desktop:
sudo apt-get install ros-kinetic-desktop
-
It is suggested to source the ROS environment variables and commands via the bashrc such that the relevant ROS commands are exposed for each terminal:
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc source ~/.bashrc
-
Install the necessary dependencies for building ROS packages from source:
sudo apt-get install python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential
-
Initialize rosdep (the native ROS dependency manager):
sudo apt-get install python-rosdep sudo rosdep init rosdep update
-
-
Install
catkin_tools
using these instructions: https://catkin-tools.readthedocs.io/en/latest/installing.html-
Update apt list and install
catkin_tools
:sudo apt-get update sudo apt-get install python-catkin-tools
-
-
Initialize catkin workspace:
cd ~ mkdir catkin_workspace cd catkin_workspace mkdir src cd src git clone https://github.com/msyed123/dr1.git . --recurse-submodules cd ~/catkin_workspace catkin init echo "source ~/catkin_workspace/devel/setup.bash" >> ~/.bashrc
-
Install
librealsense
from source: Librealsense Linux Ubuntu Installation-
Download
librealsense
sources from Git:cd ~ git clone https://github.com/IntelRealSense/librealsense.git
-
Disconnect any connected RealSense camera
-
Navigate to the
librealsense
directorycd librealsense
-
Install core packages for building the binary via apt:
sudo apt-get install git libssl-dev libusb-1.0-0-dev pkg-config libgtk-3-dev sudo apt-get install libglfw3-dev
-
Adjust UDev rules using the provided bash script.
./scripts/setup_udev_rules.sh ./scripts/patch-realsense-ubuntu-lts.sh
-
Build SDK
cd ~/librealsense mkdir build cd build cmake ../ -DCMAKE_BUILD_TYPE=Release sudo make uninstall && make clean && make -j4 && sudo make install
-
-
Install ROS wrapper for
librealsense
(realsense2-camera
)sudo apt-get install ros-kinetic-realsense2-camera
-
Install
pcl_ros
, a dependency forrealsense2-camera
sudo apt-get install ros-kinetic-pcl-ros
-
Install
mavros
andmavros_extras
sudo apt-get install ros-kinetic-mavros ros-kinetic-mavros-extras wget https://raw.githubusercontent.com/mavlink/mavros/master/mavros/scripts/install_geographiclib_datasets.sh sudo bash ./install_geographiclib_datasets.sh
-
Configure catkin workspace to extend ROS source space
cd ~/catkin_workspace catkin clean catkin config --extend /opt/ros/kinetic
-
Install necessary Python packages:
sudo apt-get install python-pip pip install numpy==1.15.0 pip install scipy==1.2.3 --no-deps pip install pyquaternion --no-deps pip install filterpy --no-deps
-
Build catkin workspace
cd ~/catkin_workspace catkin build
-
Mark all necessary scripts as executable
chmod +x ~/catkin_workspace/src/dr1/scripts/*.py
This is a ROS project, with several different packages that contain discrete functionality for this project.
This folder contains the codes related to launching, controlling, calibrating and positioning the drone. PX4 open source flight control software was used to perform the required tasks of the drone
This is a submodule that interfaces an Intel T265 with a Pixhawk 4 Flight Computer. The assumption is that the FCU endpoint is correctly defined in the MAVROS launch file. This is required in order for the correct serialization of the velocity vectors coming from the VIO to the Mavlink endpoint on the FCU.