project_inertial-control/run.sh
2026-04-29 08:31:56 +03:00

26 lines
742 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# Переходим в папку проекта
cd "$(dirname "$0")"
echo "Запуск проекта..."
# Запускаем модули сбора данных в фоне
python3 imu_module/imu_reader.py &
IMU_PID=$!
python3 lidar_module/lidar_reader.py &
LIDAR_PID=$!
# Запускаем расчёты в фоне
processing/calculations &
CALC_PID=$!
# Запускаем визуализацию (она управляет завершением)
python3 processing/visualization.py
# Когда визуализация закрыта — останавливаем всё
echo "Остановка проекта..."
kill $IMU_PID $LIDAR_PID $CALC_PID 2>/dev/null
wait
echo "Проект остановлен"