Trilateration Method with quadrotors
From Lofaro Lab Wiki
New launch Files
Open the terminal & run the following commands Remove the old launch files
sudo rm -r catkin_ws/src/hector_quadrotor/hector_quadrotor_gazebo/launch
Clone the new files
git clone https://github.com/pnpdiode/multiple_quadrotors.git catkin_ws/src/hector_quadrotor/hector_quadrotor_gazebo/launch
Three drones should appear in gazebo. Run the following command
roslaunch hector_quadrotor_gazebo spawn_two_quadrotors.launch
Source Code
open new terminal and run the following command
git clone https://github.com/pnpdiode/trilateration_code.git catkin_ws/src/nodes uav_nodes
Make the file executable
sudo chmod +x catkin_ws/src/nodes/uav_nodes/simul.py
Now run the ros core in new terminal
roscore
Open a new terminal and open the gazebo with three UAVs
roslaunch hector_quadrotor_gazebo spawn_two_quadrotors.launch
Now execute the code. You should see 2 UAVs should try to get to the desire location and form a triangle pattern.
rosrun nodes simul.py