fix: ROS_DOMAIN_ID 1 (AGV bringup uses domain 1, not 0)
This commit is contained in:
@@ -28,7 +28,7 @@ class AGVController:
|
|||||||
|
|
||||||
def _run_ros2_cmd(self, cmd: str, timeout: float = 5.0) -> tuple:
|
def _run_ros2_cmd(self, cmd: str, timeout: float = 5.0) -> tuple:
|
||||||
"""执行 ros2 命令"""
|
"""执行 ros2 命令"""
|
||||||
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}'"
|
full_cmd = f"bash -c 'source /opt/ros/humble/setup.bash && source /home/elephant/agv_pro_ros2/install/setup.bash && export ROS_DOMAIN_ID=1 && {cmd}'"
|
||||||
try:
|
try:
|
||||||
result = subprocess.run(
|
result = subprocess.run(
|
||||||
full_cmd,
|
full_cmd,
|
||||||
|
|||||||
Reference in New Issue
Block a user