mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-06 15:51:36 +08: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:
Executable
+8
@@ -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
|
||||||
+2
-4
@@ -64,10 +64,7 @@ SIM_PID=0
|
|||||||
|
|
||||||
if [ "$program" == "jmavsim" ] && [ ! -n "$no_sim" ]
|
if [ "$program" == "jmavsim" ] && [ ! -n "$no_sim" ]
|
||||||
then
|
then
|
||||||
cd $src_path/Tools/jMAVSim
|
./Tools/jmavsim_run.sh &
|
||||||
ant create_run_jar copy_res
|
|
||||||
cd out/production
|
|
||||||
java -Djava.ext.dirs= -jar jmavsim_run.jar -udp 127.0.0.1:14560 &
|
|
||||||
SIM_PID=`echo $!`
|
SIM_PID=`echo $!`
|
||||||
cd ../..
|
cd ../..
|
||||||
elif [ "$program" == "gazebo" ] && [ ! -n "$no_sim" ]
|
elif [ "$program" == "gazebo" ] && [ ! -n "$no_sim" ]
|
||||||
@@ -135,6 +132,7 @@ fi
|
|||||||
|
|
||||||
if [ "$program" == "jmavsim" ]
|
if [ "$program" == "jmavsim" ]
|
||||||
then
|
then
|
||||||
|
pkill -9 -P $SIM_PID
|
||||||
kill -9 $SIM_PID
|
kill -9 $SIM_PID
|
||||||
elif [ "$program" == "gazebo" ]
|
elif [ "$program" == "gazebo" ]
|
||||||
then
|
then
|
||||||
|
|||||||
Reference in New Issue
Block a user