mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
Tools: add separate jmavsim_run.sh script
It is useful to run jmavsim separately, for example when debugging mainapp separately, or running some other external tool on mainapp (like heap analysis)
This commit is contained in:
8
Tools/jmavsim_run.sh
Executable file
8
Tools/jmavsim_run.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#! /bin/bash
|
||||
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
cd "$SCRIPT_DIR/jMAVSim"
|
||||
|
||||
ant create_run_jar copy_res
|
||||
cd out/production
|
||||
java -Djava.ext.dirs= -jar jmavsim_run.jar -udp 127.0.0.1:14560
|
||||
@@ -64,10 +64,7 @@ SIM_PID=0
|
||||
|
||||
if [ "$program" == "jmavsim" ] && [ ! -n "$no_sim" ]
|
||||
then
|
||||
cd $src_path/Tools/jMAVSim
|
||||
ant create_run_jar copy_res
|
||||
cd out/production
|
||||
java -Djava.ext.dirs= -jar jmavsim_run.jar -udp 127.0.0.1:14560 &
|
||||
./Tools/jmavsim_run.sh &
|
||||
SIM_PID=`echo $!`
|
||||
cd ../..
|
||||
elif [ "$program" == "gazebo" ] && [ ! -n "$no_sim" ]
|
||||
@@ -135,6 +132,7 @@ fi
|
||||
|
||||
if [ "$program" == "jmavsim" ]
|
||||
then
|
||||
pkill -9 -P $SIM_PID
|
||||
kill -9 $SIM_PID
|
||||
elif [ "$program" == "gazebo" ]
|
||||
then
|
||||
|
||||
Reference in New Issue
Block a user