# SwarmLab
<p align="center"><img src="https://github.com/lis-epfl/swarmlab/blob/master/docs/images/SwarmLab.svg" alt="Logo" height="200"></p>
<br>
<br>
SwarmLab is a drone swarm simulator written in Matlab. It aims at:
1. simulating *single drones*;
2. simulating *swarms of drones*;
This software is designed with _versatility_ and _scalability_ in mind. It allows for fast programming and easy incorporation of various modules designed for drone and drone swarm simulations. It also decreases the coding effort by offering built-in and ready-to-use functionalities. These features make this package suitable to different applications in the area of drones and swarm robotics, including fast algorithm development, training, education, and the automatic collection of simulated data.
<p align="center">
<img height=300 src="https://github.com/lis-epfl/swarmlab/blob/master/docs/images/Scheme.jpg" alt="scheme of architecture"/>
</p>
## Requirements
Only [Matlab installation](https://www.mathworks.com/support/install-matlab.html?q=&page=1) is required with the Statistics and Machine Learning Toolbox.
## 1. Single-drone simulations
Single-drone simulations exploit the architecture proposed by Professors Beard and McLain in [Small unmanned aircraft: theory and practice](https://press.princeton.edu/books/hardcover/9780691149219/small-unmanned-aircraft) and illustrated below. The focus of these simulations is realism. Their code is available [here](https://github.com/randybeard/mavsim_template_files).
Two drone-types are supported: quadcopter and fixed-wing drones.
<p align="center">
<img width=300 src="https://github.com/lis-epfl/swarmlab/blob/master/docs/images/drone_architecture.png" alt="drone simulation architecture"/>
</p>
### Graphics
The graphical tools supported for single drone simulations are:
* 3D drone viewer
* state variable plotter
<p align="center">
<img height=300 src="https://github.com/lis-epfl/swarmlab/blob/master/docs/images/drone_viewer.png" alt="drone viewer"/>
<img height=300 src="https://github.com/lis-epfl/swarmlab/blob/master/docs/images/drone_state_plotter.png" alt="drone state plotter"/>
</p>
### Examples
The following examples are provided:
1. controller
2. path follower
3. path manager
4. path planner
<p align="center">
<img height=300 src="https://github.com/lis-epfl/swarmlab/blob/master/docs/images/path_manager.png" alt="path manager example"/>
<img height=300 src="https://github.com/lis-epfl/swarmlab/blob/master/docs/images/path_planner.png" alt="path planner example"/>
</p>
### GUI
For ease of use, single-drone simulations can also be run from a dedicated GUI, that allows to change a selection of parameters, e.g. drone type, simulation type, debugging plots, simulation time.
<p align="center">
<img width=400 src="https://github.com/lis-epfl/swarmlab/blob/master/docs/images/GUI_drone.png" alt="GUI drone"/>
</p>
## 2. Drone-swarm simulations
Drone swarm simulations exploit either the [Olfati-Saber](https://www.sciencedirect.com/science/article/pii/S1474667015386651) or the [Vicsek (Vásárhelyi’s version)](https://robotics.sciencemag.org/content/3/20/eaat3536.short) algorithms. The focus of these simulations is the behaviour of the group of drones, as a result of interactions among individuals. In this case, quadcopter and point-mass (featuring no vehicle dynamics) are supported. The latter can be used when computational time requirements prevail over simulation realism, or when the interest relies in the pure collective behavior, independently on the agents' dyanamics.
### Graphics
The graphical tools supported for drone swarm simulations are:
* run-time 3D swarm viewer
* run-time state variable plotter
* offline 3D swarm viewer with wakes
* offline state variable plotter
* offline performance analyser
<p align="center">
<img height=300 src="https://github.com/lis-epfl/swarmlab/blob/master/docs/images/swarm_traj.png" alt="swarm trajectories"/>
<img height=300 src="https://github.com/lis-epfl/swarmlab/blob/master/docs/images/swarm_dist.png" alt="swarm distances"/>
<img height=300 src="https://github.com/lis-epfl/swarmlab/blob/master/docs/images/swarm_speed.png" alt="swarm speed"/>
<img height=300 src="https://github.com/lis-epfl/swarmlab/blob/master/docs/images/swarm_performance.png" alt="swarm performances"/>
</p>
### Examples
The following examples are provided:
1. Olfati Saber's swarming algorithm
2. Vasarhelyi's version swarming algorithm
The following illustrations represent:
* a swarm of 5 drones with quadcopter dynamics,
* a swarm of 25 drones with point mass dynamics
before and after convergence to the equilibrium configuration.
<p align="center">
<img height=300 src="https://github.com/lis-epfl/swarmlab/blob/master/docs/images/point_mass_swarm.png" alt="point mass swarm"/>
</p>
<p align="center">
<img height=300 src="https://github.com/lis-epfl/swarmlab/blob/master/docs/images/quad_swarm.png" alt="quadcopter swarm"/>
</p>
### GUI
Also drone-swarm simulations can be run from a dedicated GUI. In this case, parameters that can be set are: drone types, simulation time, debug plotting, map plotting, number of agents of the swarm, swarming algorithm, preferred inter-agent distance, preferred orientation, preferred speed.
The GUI allows for run-time changes of some parameters, such as the swarm direction.
<p align="center">
<img width=400 src="https://github.com/lis-epfl/swarmlab/blob/master/docs/images/GUI_swarm.png" alt="GUI swarm"/>
</p>
## Basic usage
To start off with your first drone swarm simulation, open the project folder <i>swarmlab</i> in Matlab (see picture aside). Then, add all folders and subfolders to the current path (select the swarmlab folder → right-click → Add to Path → Selected Folders and Subfolders).
You have two ways of running your simulations, either via the provided GUIs or by calling an example script.
* For the GUI, type `GUI_drone` or `GUI_swarm` on the Matlab command view, select the parameters you want and slide to `On` the _Start Simulation_ button.
* For running an example, type `example_vasarhelyi`
For editing the example scripts, go to examples → examples_swarm, and open the <i>example_vasarhelyi.m</i> script.
</p>
Finally, simply run the script and pay attention to the prompted instructions!
<p align="center">
<img align="center" width="300" height="450" src="https://github.com/lis-epfl/swarmlab/blob/master/docs/images/project_folder.png">
</p>
## Acknowledgements
Thanks to Victor Delafontaine, Andrea Giordano, and Anthony De Bortoli for their valuable contribution. Thanks to Dario Floreano and Fabrizio Schiano for their wise advice.
## Reference
* [Swarmlab: a Drone Swarm Simulator](https://ieeexplore.ieee.org/document/9340854)
Please, cite us with:
```
@INPROCEEDINGS{9340854,
author={Soria, Enrica and Schiano, Fabrizio and Floreano, Dario},
booktitle={2020 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)},
title={SwarmLab: a Matlab Drone Swarm Simulator},
year={2020},
volume={},
number={},
pages={8005-8011},
doi={10.1109/IROS45743.2020.9340854}}
```
## Licensing
This software is provided under MIT License (MIT).
Copyright (c) 2020 Enrica Soria.
#### _Enjoy!_ :+1:
没有合适的资源?快使用搜索试试~ 我知道了~
SmarmLab:用于无人机群模拟的多功能Matlab软件包。___下载.zip
共138个文件
m:102个
png:20个
mat:2个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 51 浏览量
2023-04-16
20:21:08
上传
评论
收藏 4MB ZIP 举报
温馨提示
SmarmLab:用于无人机群模拟的多功能Matlab软件包。___下载.zip
资源推荐
资源详情
资源评论
收起资源包目录
SmarmLab:用于无人机群模拟的多功能Matlab软件包。___下载.zip (138个子文件)
CITATION.cff 343B
computational_time.fig 34KB
computational_time_2.fig 33KB
.gitignore 596B
computational_time_2.jpg 51KB
Scheme.jpg 34KB
LICENSE 1KB
autopilot_quad.m 22KB
Drone.m 21KB
plot_state.m 18KB
autopilot_wing.m 17KB
compute_vel_olfati_saber.m 12KB
compute_vel_vasarhelyi.m 10KB
plot_state.m 10KB
Swarm.m 9KB
SwarmViewer.m 9KB
param_fixed_wing.m 9KB
mseb.m 8KB
SwarmViewerOffline.m 8KB
path_manager_dubins.m 7KB
DroneViewer.m 7KB
plan_RRT.m 7KB
path_manager_quad.m 6KB
param_quadcopter.m 6KB
example_vasarhelyi.m 5KB
compute_swarm_performance.m 5KB
example_olfati_saber.m 5KB
example_co_mn.m 5KB
read_ts_grid.m 5KB
turbulent_wind_field_generator.m 5KB
compute_dubins_param.m 5KB
estimate_states.m 5KB
example_ct.m 5KB
plan_path.m 4KB
param_drone.m 4KB
forces_moments_wing.m 4KB
plot_swarm.m 4KB
path_manager_fillet.m 4KB
param_swarm.m 4KB
example_path_follower.m 4KB
example_path_planner.m 3KB
example_path_manager.m 3KB
example_controller.m 3KB
get_wind.m 3KB
true_states.m 3KB
compute_tf_model.m 3KB
forces_moments_quad.m 3KB
path_follower_quad.m 3KB
path_follower_wing.m 3KB
draw_waypoints.m 3KB
network_components.m 3KB
compute_pid_controller.m 3KB
path_manager_wing.m 3KB
draw_buildings.m 2KB
plot_state_offline.m 2KB
test_comp_time.m 2KB
plot_distance_offline.m 2KB
path_manager_wing_chap10.m 2KB
define_quad_body.m 2KB
sensors.m 2KB
path_manager_quad_chap10.m 2KB
test_max_neig_vs_collisions.m 2KB
plot_acceleration_offline.m 2KB
pid_loop.m 2KB
kinematics_ode_fun.m 2KB
plot_speed_offline.m 2KB
generate_one_bts.m 1KB
compute_trim.m 1KB
VideoWriterWithRate.m 1KB
param_sensors.m 1KB
ext_kalman_filter.m 1KB
gps.m 1KB
compute_neighborhood.m 1KB
param_map.m 1KB
plot_swarm_performance.m 1KB
test_battery_discharge.m 1KB
Td2idx.m 1KB
plot_velocity_field.m 1KB
define_wing_body.m 1KB
plot_trajectories_offline.m 1014B
generate_command.m 1006B
create_shifted_buildings.m 978B
ekf_phi_theta.m 938B
draw_cylinders.m 906B
param_vasarhelyi.m 875B
draw_path.m 841B
draw_spheres.m 825B
param_table_T.m 654B
param_olfati_saber.m 648B
create_buildings.m 610B
param_battery.m 586B
rotate_b2i.m 529B
rotate.m 527B
define_grid_coordinates.m 473B
Rb2i.m 463B
record_video.m 460B
param_sim.m 377B
pos2dist.m 348B
lp_filter.m 322B
x2v_ned.m 220B
共 138 条
- 1
- 2
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9153
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功