All Projects â†’ malintha â†’ multi_uav_simulator

malintha / multi_uav_simulator

Licence: GPL-3.0 license
A quadrotor swarm simulator based on ROS (Robot Operating System).

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to multi uav simulator

FlyingCarUdacity
🛩ī¸âš™ī¸ 3D Planning, PID Control, Extended Kalman Filter for the Udacity Flying Car Nanodegree // FCND-Term1
Stars: ✭ 16 (-78.08%)
Mutual labels:  control, uav, drone
Mrs uav system
The entry point to the MRS UAV system.
Stars: ✭ 64 (-12.33%)
Mutual labels:  control, uav, drone
Qgroundcontrol
Cross-platform ground control station for drones (Android, iOS, Mac OS, Linux, Windows)
Stars: ✭ 2,026 (+2675.34%)
Mutual labels:  uav, drone
Dronin
The dRonin flight controller software.
Stars: ✭ 238 (+226.03%)
Mutual labels:  uav, drone
Faster
3D Trajectory Planner in Unknown Environments
Stars: ✭ 246 (+236.99%)
Mutual labels:  uav, drone
ESP32
DroneBridge for ESP32. A short range wifi based telemetry link. Support for MAVLink, MSP & LTM (iNAV).
Stars: ✭ 183 (+150.68%)
Mutual labels:  uav, drone
Ardupilotblue
Howto use BeagleBone Blue with ArduPilot
Stars: ✭ 118 (+61.64%)
Mutual labels:  uav, drone
Gymfc
A universal flight control tuning framework
Stars: ✭ 210 (+187.67%)
Mutual labels:  uav, drone
Robotics-Planning-Dynamics-and-Control
RPDC : This contains all my MATLAB codes for the Robotics, Planning, Dynamics and Control . The implementations model various kinds of manipulators and mobile robots for position control, trajectory planning and path planning problems.
Stars: ✭ 171 (+134.25%)
Mutual labels:  control, dynamics
Missionplanner
Mission Planner Ground Control Station (c# .net)
Stars: ✭ 1,059 (+1350.68%)
Mutual labels:  control, uav
Gaas
Generalized Aviation: Open source autonomous aviation software platform, designed for fully autonomous drones and flying cars.
Stars: ✭ 1,377 (+1786.3%)
Mutual labels:  uav, drone
Gym Pybullet Drones
PyBullet Gym environments for single and multi-agent reinforcement learning of quadcopter control
Stars: ✭ 168 (+130.14%)
Mutual labels:  control, uav
Jagcs
Just another ground control station
Stars: ✭ 99 (+35.62%)
Mutual labels:  uav, drone
Interop
Interoperability System for the AUVSI SUAS Competition.
Stars: ✭ 123 (+68.49%)
Mutual labels:  uav, drone
Mavgcl
In-Flight Analysis for PX4
Stars: ✭ 96 (+31.51%)
Mutual labels:  uav, drone
Mavigator
Virtual cockpit for UAVs
Stars: ✭ 8 (-89.04%)
Mutual labels:  uav, drone
Onboard Sdk
DJI Onboard SDK Official Repository
Stars: ✭ 669 (+816.44%)
Mutual labels:  uav, drone
Ardupilot
ArduPlane, ArduCopter, ArduRover, ArduSub source
Stars: ✭ 6,637 (+8991.78%)
Mutual labels:  uav, drone
Quadcopter SimCon
Quadcopter Simulation and Control. Dynamics generated with PyDy.
Stars: ✭ 84 (+15.07%)
Mutual labels:  control, uav
Mav control rw
Control strategies for rotary wing Micro Aerial Vehicles using ROS
Stars: ✭ 154 (+110.96%)
Mutual labels:  control, uav

Mavswarm: A Lightweight Multi-Aerial Vehicle Simulator

Mavswarm is a lightweight and fast Multi-Aerial Vehicle simulator based on ROS (Robot Operating System). It supports simulating heterogenous quadrotor swarms of upto 10 robots on a single desktop with physics. Mavswarm also supports quadrotor control, trajectory optimization and receding horizon planning (RHP). Currently, the internal controller uses the Lee's geometric tracking controller [3] and it is tuned for two different quadrotor models out of the box. In addition you can extend the swarm simulation with more quadrotor models by simply adding the new quadrotor model parameters through a yaml configuration file.

Consider citing our work [1][2] if you find this code helpful for your publications.

Cover Image
A hetergenous swarm of 5 quadrotors stabilizing from an upside-down initialization

Install dependencies

Install Eigen, Armadillo and GNU Science Library (GSL) before you continue.

Install eigen-coversions (make sure to change the ROS version name i.e.; melodic, kinetic).

sudo apt install ros-noetic-eigen-conversions

Building the simulator

Create a new catkin workspace and use wstool to download the multi_uav_simulator package.

mkdir catkin_ws
wstool init src
cd src/
wstool set --git multi_uav_simulator [email protected]:malintha/multi_uav_simulator.git -y
wstool update

Mavswarm uses ethz-asl/mav_trajectory_generation package to generate trajectories for the robots. Use therosinstall/dependencies.rosinstall file to download the required dependencies.

wstool merge multi_uav_simulator/rosinstall/dependencies.rosinstall
wstool update

This will clone the following packages to the workspace automatically : catkin_simple, eigen_catkin, eigen_checks, glog_catkin, mav_comm, mav_trajectory_generation, nlopt.

Now build the simulator.

cd ../
catkin build multi_uav_simulator

Run the simulator.

source devel/setup.bash
roslaunch multi_uav_simulator simu.launch

This will open an Rviz window and show 5 drones flip from an upside-down initialization.

Publishing Goals

Mavswarm supports Receding Horizon Planning (RHP) and trajectory optimization out of the box. You can publish a new desired goal position using rostopics for any drone to see it navigating. To do so, open a new command window and publish the following message.

rostopic pub /robot_1/desired_state geometry_msgs/Point '{x: 4, y: -1, z: 3}'

Each drone listnes to its desired_state topic which uses the ROS standard geometry_msgs/Point message type to recieve new goal locations. The command above simply adds the goal {x: 4, y: -1, z: 3} into the first drone's goal list. To See RHP in working, publish a different goal before the drone reaches the previous goal. This will recalculate a new trajectory to match the robot's current speed and acceleration to ensure smooth transitions between rapidly changing goal locations.

Adding a new drone to the environment

Mavswarm uses xacro to spawn new models into the simulation environment. Out of the box, it has 5 drones in the environment and two separate quadrotor models to choose from; namely, Bigquad (the quadrotor model from [2]) and Crazyflie. If you want to add a sixth drone to the environment, simply follow the steps below.

  1. In the launch/simu.launch file, add a new line with the corresponding drone id. Make sure to change <param name> and the robot_id accordingly. For example,

     <param name="robot_6" command="$(find xacro)/xacro $(find multi_uav_simulator)/cf_description/crazyflie.urdf.xacro robot_id:=6" />
    

    This adds a new Crazyflie model to the environment. If you want a larger quadrotor model, you can use bigquad_description/bigquad.urdf.xacro instead.

  2. Now add the following block to bind a quadrotor instance to the URDF model. Here we pass the robot_id and the internal controller's frequency as arguments to the quadrotor instance. In addition, we use rosparam to specify the quadrotor's model parameters and the controller gains. The parameters for the Bigquad and the Crazyflie can be found in config/bigquad_params.yaml and config/crazyflie_params.yaml files respectively.

     <group ns="robot_6">
         <node name="drone" pkg="multi_uav_simulator" type="multi_uav_simulator" output="screen" args="6 $(arg controller_frequency)">
           <rosparam file="$(find multi_uav_simulator)/config/crazyflie_params.yaml"/>
         </node>
       </group>
    
  3. In order to specify the initial conditions for the new drone add a new block to the config/initial_conditions.yaml file as below.

     robot_6:
         position: [2, 4, 0]
         velocity: [0, 0, 0]
         rotation: [1, 0, 0, 0, -0.9995, -0.0314, 0, 0.0314, -0.9995]
         omega: [0, 0, 0]
    

    The rotation and omega stands for the initial rotation matrix (3x3) and the angular velocity (3x1) of the rigid body. Here, we initialize the drone up-side down. To make it right way up, change the rotation matrix to identity: [1, 0, 0, 0, 1, 0, 0, 0, 1].

  4. Finally, to visualize the newly added drone, add a robot_model visualization type to RViz. Change its description to corresponding param name of the newly added element in the launch file. i.e.: "robot_6".

[1] Our work based on this controller:

@inproceedings{fernando2019formation,
title={Formation control and navigation of a quadrotor swarm},
author={Fernando, Malintha and Liu, Lantao},
booktitle={2019 International Conference on Unmanned Aircraft Systems (ICUAS)},
pages={284--291},
year={2019},
organization={IEEE}
}

[2] Mean-Field flocking control of UAVs (Find the complete code at: https://github.com/malintha/mean_field_flocking):

@INPROCEEDINGS{9560899,
author={Fernando, Malintha},
booktitle={2021 IEEE International Conference on Robotics and Automation (ICRA)}, 
title={Online Flocking Control of UAVs with Mean-Field Approximation}, 
year={2021},
volume={},
number={},
pages={8977-8983},
doi={10.1109/ICRA48506.2021.9560899}
}

[3] Geometric tracking controller:

@inproceedings{lee2010geometric,
title={Geometric tracking control of a quadrotor UAV on SE (3)},
author={Lee, Taeyoung and Leok, Melvin and McClamroch, N Harris},
booktitle={49th IEEE conference on decision and control (CDC)},
pages={5420--5425},
year={2010},
organization={IEEE}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].