Robotic project 2019 - École Centrale Nantes
It is necessary to have the following ROS packages : mavros
, mavlink
,
aruco_detect
, qualisys
, fake_qualisys
and plotjuggler
cd ~
git clone https://github.com/matheus220/Firmware.git
cd Firmware
git submodule update --init --recursive
make posix_sitl_default gazebo # Ctrl+C after gazebo starts
Source your environment : add to file .bashrc
source ~/Firmware/Tools/setup_gazebo.bash ~/Firmware ~/Firmware/build/px4_sitl_default
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:~/Firmware:~/Firmware/Tools/sitl_gazebo
cd ~/catkin_ws/src
git clone https://github.com/matheus220/drones.git
catkin build drones
source ~/catkin_ws/devel/setup.bash
roslaunch drones multi_uav_mavros_sitl.launch
Some ERROR and WARN messages may appear on the console, however, this does not affect the simulation. This happens when the noises of the simulator's sensors are set to zero (here and here).
There are 3 control modes of simulation of the project: ground truth, ball detection
and aruco marker detection and one experimental test mode.
Before launching the controller it is necessary to specify the type of marker that will be used,
for this the lines animation.launch and
multi_uav_mavros_sitl.launch
must be modified to correspond to one of the lower options
<arg name="target" value=""/> # no objects to detect
<arg name="target" value="_ball"/> # ball detection object
<arg name="target" value="_aruco"/> # object detection aruco markers
The controller can then be launched
roslaunch drones simulation_ground_truth.launch
roslaunch drones simulation_ball.launch
roslaunch drones simulation_aruco.launch
In this mode only 2 drones are simulated and a real drone is used, so remove one of the drones from the multi_uav_mavros_sitl.launch file.
Important: In the simulations the IDs of the drones are 1, 2 and 3. For the experimental test, IDs 4, 5 and 6 are used. Then, due to this change, it is necessary to comment two lines and uncomment two others in the following code snippets : animation_rviz.cpp and command_creator.cpp
roslaunch drones experimental_setup.launch
roslaunch drones experimental.launch
Fabrizio Schiano, Paolo Robuffo Giordano. Bearing rigidity maintenance for formations of quadrotor UAVs. ICRA 2017 - IEEE International Conference on Robotics and Automa- tion, May 2017, Singapore, Singapore. pp.1467 - 1474, 2017, http://www.icra2017.org/. <10.1109/ICRA.2017.7989175>.