From 2ae78b279301a92ece8aa15b771176e2d3bdc211 Mon Sep 17 00:00:00 2001 From: Robin Shaun Date: Wed, 20 May 2020 10:43:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E5=A4=9A=E6=9C=BA=E9=80=9A?= =?UTF-8?q?=E4=BF=A1=E5=90=AF=E5=8A=A8=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- communication/multi_vehicle_communication.sh | 16 +- communication/stop_communication.sh | 4 + .../{run.sh => run_formation.sh} | 0 .../{stop.sh => stop_formation.sh} | 0 .../launch_generator/launch_head_1.11 | 20 ++ .../launch_temp_1.11 | 0 .../launch_generator/multi_vehicle.launch | 196 ++++++++++++++++++ 7 files changed, 228 insertions(+), 8 deletions(-) create mode 100644 communication/stop_communication.sh rename coordination/formation_demo/{run.sh => run_formation.sh} (100%) rename coordination/formation_demo/{stop.sh => stop_formation.sh} (100%) create mode 100644 coordination/launch_generator/launch_head_1.11 rename coordination/{launch => launch_generator}/launch_temp_1.11 (100%) create mode 100644 coordination/launch_generator/multi_vehicle.launch diff --git a/communication/multi_vehicle_communication.sh b/communication/multi_vehicle_communication.sh index 1350a4d..8fe2e9d 100644 --- a/communication/multi_vehicle_communication.sh +++ b/communication/multi_vehicle_communication.sh @@ -1,12 +1,12 @@ #!/bin/bash iris_num=6 -typhoon_h480_num=0 -solo_num=0 -plane_num=0 -rover_num=0 -standard_vtol_num=0 -tiltrotor_num=0 -tailsitter_num=0 +typhoon_h480_num=3 +solo_num=6 +plane_num=3 +rover_num=3 +standard_vtol_num=3 +tiltrotor_num=3 +tailsitter_num=6 vehicle_num=0 while(( $vehicle_num< iris_num)) @@ -39,7 +39,7 @@ done vehicle_num=0 while(( $vehicle_num< rover_num)) do - python rover_communication.py iris $vehicle_num& + python rover_communication.py $vehicle_num& let "vehicle_num++" done diff --git a/communication/stop_communication.sh b/communication/stop_communication.sh new file mode 100644 index 0000000..ae3d454 --- /dev/null +++ b/communication/stop_communication.sh @@ -0,0 +1,4 @@ +kill -9 $(ps -ef|grep multirotor_communication.py|gawk '$0 !~/grep/ {print $2}' |tr -s '\n' ' ') +kill -9 $(ps -ef|grep plane_communication.py|gawk '$0 !~/grep/ {print $2}' |tr -s '\n' ' ') +kill -9 $(ps -ef|grep rover_communication.py|gawk '$0 !~/grep/ {print $2}' |tr -s '\n' ' ') +kill -9 $(ps -ef|grep vtol_communication.py|gawk '$0 !~/grep/ {print $2}' |tr -s '\n' ' ') \ No newline at end of file diff --git a/coordination/formation_demo/run.sh b/coordination/formation_demo/run_formation.sh similarity index 100% rename from coordination/formation_demo/run.sh rename to coordination/formation_demo/run_formation.sh diff --git a/coordination/formation_demo/stop.sh b/coordination/formation_demo/stop_formation.sh similarity index 100% rename from coordination/formation_demo/stop.sh rename to coordination/formation_demo/stop_formation.sh diff --git a/coordination/launch_generator/launch_head_1.11 b/coordination/launch_generator/launch_head_1.11 new file mode 100644 index 0000000..403fd8a --- /dev/null +++ b/coordination/launch_generator/launch_head_1.11 @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/coordination/launch/launch_temp_1.11 b/coordination/launch_generator/launch_temp_1.11 similarity index 100% rename from coordination/launch/launch_temp_1.11 rename to coordination/launch_generator/launch_temp_1.11 diff --git a/coordination/launch_generator/multi_vehicle.launch b/coordination/launch_generator/multi_vehicle.launch new file mode 100644 index 0000000..1cde451 --- /dev/null +++ b/coordination/launch_generator/multi_vehicle.launch @@ -0,0 +1,196 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file