Camera Aruco Tags Dectection
This commit is contained in:
@@ -17,26 +17,23 @@ print_error() { echo -e "${RED}[ERROR]${NC} $1"; }
|
||||
|
||||
SOFTWARE_RENDER=auto
|
||||
WORLD="uav_ugv_search.sdf"
|
||||
MISSION="hover"
|
||||
SEARCH="spiral"
|
||||
ALTITUDE=""
|
||||
DURATION=""
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
--software-render) SOFTWARE_RENDER=true; shift ;;
|
||||
--no-software-render) SOFTWARE_RENDER=false; shift ;;
|
||||
--world) WORLD="$2"; shift 2 ;;
|
||||
--mission) MISSION="$2"; shift 2 ;;
|
||||
--search) SEARCH="$2"; shift 2 ;;
|
||||
--altitude) ALTITUDE="$2"; shift 2 ;;
|
||||
--duration) DURATION="$2"; shift 2 ;;
|
||||
-h|--help)
|
||||
echo "Usage: $0 [options]"
|
||||
echo " --software-render Force software rendering"
|
||||
echo " --no-software-render Disable software rendering"
|
||||
echo " --world <file> World file (default: uav_ugv_search.sdf)"
|
||||
echo " --mission <type> hover, square, search (default: hover)"
|
||||
echo " --search <type> spiral, lawnmower, levy (default: spiral)"
|
||||
echo " --altitude <m> Override altitude from config"
|
||||
echo " --duration <s> Override duration from config"
|
||||
exit 0
|
||||
;;
|
||||
*) shift ;;
|
||||
@@ -178,9 +175,8 @@ print_info "[3/4] Starting main.py ..."
|
||||
cd "$PROJECT_DIR"
|
||||
sleep 3
|
||||
|
||||
MAIN_ARGS="--device sim --connection tcp:127.0.0.1:5760 --mission $MISSION"
|
||||
MAIN_ARGS="--device sim --connection tcp:127.0.0.1:5760 --search $SEARCH"
|
||||
[ -n "$ALTITUDE" ] && MAIN_ARGS="$MAIN_ARGS --altitude $ALTITUDE"
|
||||
[ -n "$DURATION" ] && MAIN_ARGS="$MAIN_ARGS --duration $DURATION"
|
||||
|
||||
python3 src/main.py $MAIN_ARGS &
|
||||
MAIN_PID=$!
|
||||
@@ -201,7 +197,7 @@ print_info " main.py (pymavlink)"
|
||||
print_info " |"
|
||||
print_info " camera_viewer.py (OpenCV)"
|
||||
print_info ""
|
||||
print_info " Mission: $MISSION (config from YAML)"
|
||||
print_info " Search: $SEARCH"
|
||||
print_info " Press Ctrl+C to stop"
|
||||
print_info "==================================="
|
||||
|
||||
@@ -211,7 +207,7 @@ cleanup_sitl
|
||||
|
||||
print_info ""
|
||||
print_info "=================================="
|
||||
print_info " Mission Complete!"
|
||||
print_info " Search Complete!"
|
||||
print_info "=================================="
|
||||
print_info "Gazebo GUI still open."
|
||||
print_info "Press Ctrl+C to exit."
|
||||
|
||||
Reference in New Issue
Block a user