Bug Fixes
This commit is contained in:
@@ -98,7 +98,7 @@ print_info "==================================="
|
||||
print_info " UAV-UGV Simulation"
|
||||
print_info "==================================="
|
||||
print_info "World: $WORLD_FILE"
|
||||
print_info "Mission: $MISSION"
|
||||
print_info "Search: $SEARCH"
|
||||
echo ""
|
||||
GZ_DEFAULT_GUI="/usr/share/gz/gz-sim8/gui/gui.config"
|
||||
GZ_USER_GUI="$HOME/.gz/sim/8/gui.config"
|
||||
@@ -147,12 +147,19 @@ if [ -f "$PARAM_FILE" ]; then
|
||||
fi
|
||||
sim_vehicle.py $SITL_ARGS &
|
||||
SITL_PID=$!
|
||||
print_info "Waiting for SITL (~20s) ..."
|
||||
sleep 20
|
||||
if ! pgrep -f "arducopter" > /dev/null 2>&1; then
|
||||
print_error "ArduPilot SITL failed to start"
|
||||
exit 1
|
||||
fi
|
||||
print_info "Waiting for SITL to start ..."
|
||||
SITL_TIMEOUT=60
|
||||
SITL_WAITED=0
|
||||
while ! pgrep -f "arducopter" > /dev/null 2>&1; do
|
||||
sleep 2
|
||||
SITL_WAITED=$((SITL_WAITED + 2))
|
||||
if [ $SITL_WAITED -ge $SITL_TIMEOUT ]; then
|
||||
print_error "ArduPilot SITL failed to start after ${SITL_TIMEOUT}s"
|
||||
exit 1
|
||||
fi
|
||||
print_info " Waiting for arducopter process ... (${SITL_WAITED}s)"
|
||||
done
|
||||
sleep 5
|
||||
print_success "ArduPilot SITL running (TCP 5760)"
|
||||
print_info "[3/4] Starting main.py ..."
|
||||
cd "$PROJECT_DIR"
|
||||
|
||||
Reference in New Issue
Block a user