-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from IseanB/multiDroneControl
Working multi/single drone control
- Loading branch information
Showing
15 changed files
with
946 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# UCR Drone Control | ||
|
||
This repository uses various control and robotics libraries to autonomously control drone(s). Our code is built with the [ROS (Melodic)](http://wiki.ros.org/melodic) and [PX4 Autopilot](https://github.com/PX4/PX4-Autopilot) frameworks to develop drone control software. The [MAV Trajectory Generation](https://github.com/ethz-asl/mav_trajectory_generation) library generates an optimized, minimum snap, path for our drone(s) to follow. Finally, [MAVLink (MAVROS)](http://wiki.ros.org/mavros) is our primary messaging protocol, interfacing with the drone(s). | ||
This repository combines a trajectory planning, communication protocol, and robotics libraries to autonomously control drone(s). Our code is built with the [ROS (Melodic)](http://wiki.ros.org/melodic) and [PX4 Autopilot](https://github.com/PX4/PX4-Autopilot) frameworks to develop drone control software. The [MAV Trajectory Generation](https://github.com/ethz-asl/mav_trajectory_generation) library generates an optimized, minimum snap, path for our drone(s) to follow. Finally, [MAVLink (MAVROS)](http://wiki.ros.org/mavros) is our primary messaging protocol, interfacing with the drone(s). | ||
|
||
--- | ||
|
||
|
@@ -13,28 +13,35 @@ This repository uses various control and robotics libraries to autonomously cont | |
Tip: Only use ```catkin build```, never use ```catkin_make```. | ||
1. Install VMWare and set up a disc image of Ubuntu 18.04 LTS.[^11][^12] | ||
- The rest of these instructions take place in the Ubuntu environment. | ||
2. Follow the [Ubuntu Development Enviorment](https://wiki.hanzheteng.com/quadrotor/px4#ubuntu-development-environment) and [Gazebo SITL Simulation](https://wiki.hanzheteng.com/quadrotor/px4#gazebo-sitl-simulation) setup. | ||
- Disable "Accelerate 3D graphics" setting under *Virtual Machine Settings* -> *Display*. | ||
2. Install Git on VMWare and set up SSH keys.[^14] | ||
- Use ```sudo apt install git``` to install Git. | ||
3. Follow the [Ubuntu Development Enviorment](https://wiki.hanzheteng.com/quadrotor/px4#ubuntu-development-environment) and [Gazebo SITL Simulation](https://wiki.hanzheteng.com/quadrotor/px4#gazebo-sitl-simulation) setup. | ||
- Install PX4 Related Dependencies. [^1] | ||
- Delete PX4 folder after completing steps. | ||
- Once *Firmware* folder cloned, use the latest stable version. i.e. Run ```git checkout tags/v1.13.0``` in *Firmware*. | ||
- Delete *Firmware* folder after completing steps. | ||
- Install ROS Melodic. [^2] | ||
- Full Desktop Installation | ||
- Install Simulation Common Dependencies. [^3] | ||
- Run all code, except line 12, line by line in the terminal. | ||
- Running pyulog install command is not necessary. | ||
- Build Quadrotor Model & Setup Gazebo[^10] | ||
- Before building quadcopter models, update Pillow[^6] and GStreamer[^7] | ||
- Install MAVROS, MAVLink, & Setup Workspace [^4] | ||
- Source Installation (Released/Stable) | ||
3. Install [MAV Trajectory Generation](https://github.com/ethz-asl/mav_trajectory_generation) Package [^13] | ||
4. Install [MAV Trajectory Generation](https://github.com/ethz-asl/mav_trajectory_generation) Package [^13] | ||
- When installing additional system dependencies, replace ```indigo``` with ```melodic```. | ||
- Replace ```catkin config --merge-devel``` with ```catkin config --link-devel``` | ||
|
||
4. Install QGroundContol [^5] | ||
5. Install QGroundContol [^5] | ||
- Install Linux/Ubuntu version. | ||
|
||
5. Create a ROS package "simple_movements" | ||
6. Create a ROS package "drone_control" | ||
``` | ||
cd ~/[Workspace Name]/src | ||
mkdir simple_movements | ||
cd simple_movements/ | ||
git clone --recursive https://github.com/IseanB/UCR-Drone-Control.git | ||
git clone --recursive [email protected]:IseanB/UCR-Drone-Control.git | ||
mv UCR-Drone-Control drone_control | ||
cd drone_control | ||
cd ~/[Workspace Name] | ||
catkin build | ||
. ~/[Workspace Name]/devel/setup.bash | ||
|
@@ -43,13 +50,13 @@ This repository uses various control and robotics libraries to autonomously cont | |
### Installation Bug Fixes: | ||
1. Pillow Build Error [^6] | ||
2. GStreamer Error [^7] | ||
3. VMWare REST Error [^8] | ||
4. Gazebo/Rendering Error [^9] | ||
3. Gazebo/Rendering Error [^9] | ||
4. Symforce Error (Look above, under *Install PX4 Related Dependencies* for fix.) | ||
|
||
--- | ||
## Documentation | ||
|
||
The ***simple_movements*** package is structured into three main folders: the src, helper, and the test folder. Below are quick summaries of each folder's purpose. | ||
The ***drone_control*** package is structured into three main folders: the src, helper, and the test folder. Below are quick summaries of each folder's purpose. | ||
### src | ||
The src folder stores all the control code used to create the offboard node. Currently, the file offboard.cpp optimizes the path followed, controls the state of the drone, and sends control signals to the drone. | ||
|
||
|
@@ -60,18 +67,31 @@ Each loop contains unique control software used during that state of the drone. | |
The helper folder stores any mathematical computations or data conversions needed. This allows for testing and easy extensibility for future computations/conversions. Some of the functions written are the isStationary(...), isFlat(...), reachedLocation(...), and segmentToPoint(...). | ||
### test | ||
The test folder contains tests for the helper functions in the helper folder. Some of the functions tested are mathematical computations, such as isStationary(...), while others are data conversions like in the segmentToPoint(...) function. GoogleTest is the test framework used. | ||
### launch | ||
The launch folder contains the setup of the Gazebo simulation and MAVROS nodes. The fourDrones and oneDrone.launch are example launch files used for testing the single/multi control structure. | ||
### msg | ||
The msg folder contains the custom messages that are communicated between the individual drone nodes and the multi control node. | ||
|
||
--- | ||
## Usage | ||
|
||
### Launching World in Gazebo | ||
```roslaunch px4 mavros_posix_sitl.launch``` | ||
Tip: Before launch run ```echo "export SVGA_VGPU10=0" >> ~/.bashrc``` and ```source ~/.bashrc```, to prevent VMWare REST Error below. [^8] | ||
|
||
### Running offboard_node | ||
```rosrun simple_movements offboard_node``` | ||
### Setuping World, MAVROS nodes, and four drones | ||
```roslaunch drone_control fourDronesNodes.launch``` | ||
|
||
### Setuping World, MAVROS nodes, and a single drones | ||
```roslaunch drone_control oneDrone.launch``` | ||
|
||
### Running drone# node(single drone control) | ||
```rosrun drone_control single_control #(0-3)``` | ||
|
||
### Running multi_control node(multi drone control) | ||
```rosrun drone_control single_control``` | ||
|
||
### Running Google Tests(Optional) | ||
```rosrun simple_movements simple_mov_test``` | ||
```rosrun drone_control simple_mov_test``` | ||
|
||
--- | ||
## Tools | ||
|
@@ -113,5 +133,5 @@ The test folder contains tests for the helper functions in the helper folder. So | |
[^10]:https://wiki.hanzheteng.com/quadrotor/px4#gazebo-sitl-simulation (Gazebo) | ||
[^11]:https://customerconnect.vmware.com/en/downloads/info/slug/desktop_end_user_computing/vmware_workstation_pro/16_0 (VMWare) | ||
[^12]:https://releases.ubuntu.com/18.04/ (Ubuntu) | ||
|
||
[^13]:https://github.com/ethz-asl/mav_trajectory_generation#installation-instructions-ubuntu (MAV Trajcetory Generation) | ||
[^14]:https://www.digitalocean.com/community/tutorials/how-to-configure-ssh-key-based-authentication-on-a-linux-server (SSH Keys) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.