-Improved Multi-Robot Depth First Search Algorithm implementation using iris drones using PX4.
-Performed on Ubuntu 18.04 - Gazebo 9
YouTube Video - City Simulation
The algorith has its implementation in MATLAB but in this repository we focus on python + ROS + Gazebo simulations
Step 1 MAVROS installation
In case you feel stuck with the steps here is a YouTube video to sail you through this step -Video
Step 2 Getting 1 drone in world
cd <PX4-Autopilot_clone>
DONT_RUN=1 make px4_sitl_default gazebo
source ~/catkin_ws/devel/setup.bash # (optional)
source Tools/setup_gazebo.bash $(pwd) $(pwd)/build/px4_sitl_default
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$(pwd)
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$(pwd)/Tools/sitl_gazebo
roslaunch px4 posix_sitl.launch
Bonus Loading a specific world and other additional features
Step 3 Multiple Vehicles with ROS and Gazebo
Clone the PX4-Autopilot Git Repository : link
cd Firmware_clone
git submodule update --init --recursive
DONT_RUN=1 make px4_sitl_default gazebo
source Tools/setup_gazebo.bash $(pwd) $(pwd)/build/px4_sitl_default
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$(pwd):$(pwd)/Tools/sitl_gazebo
roslaunch px4 multi_uav_mavros_sitl.launch
- Models of Police Station, landing mat and grass plane are kept in the models file. Add them to your models folder at the location PX4-firware-clone/Tools/sitl_gazebo/models
- Add the world files at PX4-firware-clone/Tools/sitl_gazebo/worlds
- replace these launch files with the ones already present at PX4-firware-clone/launch
- make a catkin workspace and add ayush package to it. This contains all code and nodes that need to be run for simulation
roslaunch px4 multi_uav_macros_sitl.launch
roslaunch ayush city.launch
This will launch the empty world contatining grass plane, Police Station, Landing Mat and 10 Iris Drones.
In ayush package there are 10 nodes corresponding to 10 UAVs used for city simulation.
- 10 iris drones take off from the roof of the station
- Go at the leaf nodes and wait for further command
- As soon as they are given command they start exploration
- Upon finishing the exploration they return back to the base station
Results for the city simulation are kept in City Simulation Results folder.
If you wish to play around with the dimensions/color of the drone then you can edit them at PX4-firmware-clone/Tools/sutl_gazebo/models/iris/iris.sdf.jinja
- When you run the uav_city nodes the animation for the path travelled by each drone as well as the scatter plot of the path is generated by MATPLOTLIB (check ~/.ros)
- 6th UAV Path Animation
Final_animation.mp4
The tree structure's cordinates were calculated using a MATLAB program