Nav2导航 heredoc pipe方式修复 + 重启脚本更新

nav2_navigator.py: 改用 subprocess.Popen + stdin heredoc 避免bash单引号转义
restart_agv.sh: 清理所有旧进程再重启(bringup → Nav2 → Flask)
app.py: init_pose改用 heredoc 子进程脚本方式
This commit is contained in:
ywb
2026-05-16 19:18:18 +08:00
parent a9840c38ef
commit 4e3cb4d3ef
4 changed files with 218 additions and 241 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ from .image_uploader import ImageUploader
logger = logging.getLogger(__name__)
# ROS2 环境设置(与 agv_controller_ros2.py 保持一致)
ROS2_SETUP_CMD = "export ROS_DOMAIN_ID=1 && source /opt/ros/humble/setup.bash && source ~/agv_pro_ros2/install/setup.bash"
ROS2_SETUP_CMD = "source /opt/ros/humble/setup.bash && source ~/agv_pro_ros2/install/setup.bash"
class TaskStatus(Enum):