mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-30 18:06:39 +08:00
sitl: add iris_replay startup script, handle $replay_mode in sitl_run.sh
usage: export replay_mode=ekf2 export replay=<abs_path_to_log.ulg> make posix none
This commit is contained in:
@@ -48,6 +48,20 @@ then
|
|||||||
model="iris"
|
model="iris"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# check replay mode
|
||||||
|
if [ "$replay_mode" == "ekf2" ]
|
||||||
|
then
|
||||||
|
model="iris_replay"
|
||||||
|
# create the publisher rules
|
||||||
|
mkdir -p $rootfs
|
||||||
|
publisher_rules_file="$rootfs/orb_publisher.rules"
|
||||||
|
cat <<EOF > "$publisher_rules_file"
|
||||||
|
restrict_topics: sensor_combined, vehicle_gps_position, vehicle_land_detected
|
||||||
|
module: replay
|
||||||
|
ignore_others: false
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$#" -lt 7 ]
|
if [ "$#" -lt 7 ]
|
||||||
then
|
then
|
||||||
echo usage: sitl_run.sh rc_script rcS_dir debugger program model src_path build_path
|
echo usage: sitl_run.sh rc_script rcS_dir debugger program model src_path build_path
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
uorb start
|
||||||
|
|
||||||
|
ekf2 start --replay
|
||||||
|
logger start -e -t -b 1000 -p vehicle_attitude
|
||||||
|
sleep 0.2
|
||||||
|
replay start -m ekf2
|
||||||
|
|
||||||
Reference in New Issue
Block a user