可导航

This commit is contained in:
ywb
2026-05-16 22:58:04 +08:00
parent 22d38957f1
commit e6a8d495f7
5 changed files with 272 additions and 57 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ class AGVController:
def _run_ros2_cmd(self, cmd: str, timeout: float = 5.0) -> tuple:
"""执行 ros2 命令"""
full_cmd = f"bash -l -c 'source /opt/ros/humble/setup.bash && source /home/elephant/agv_pro_ros2/install/setup.bash && {cmd}'"
full_cmd = f"bash -c 'source /opt/ros/humble/setup.bash && source /home/elephant/agv_pro_ros2/install/setup.bash && export ROS_DOMAIN_ID=0 && {cmd}'"
try:
result = subprocess.run(
full_cmd,