问题1:

启动rmu_gazebo_simulator虚拟环境时有如下报错:

1
[ERROR] [simple_competition_1v1.py-11]: exception occurred while executing process: Traceback (most recent call last): File "/opt/ros/humble/lib/python3.10/site-packages/launch/actions/execute_local.py", line 551, in __execute_process transport, self._subprocess_protocol = await async_execute_process( File "/opt/ros/humble/lib/python3.10/site-packages/osrf_pycommon/process_utils/async_execute_process_asyncio/impl.py", line 139, in async_execute_process transport, protocol = await _async_execute_process_nopty( File "/opt/ros/humble/lib/python3.10/site-packages/osrf_pycommon/process_utils/async_execute_process_asyncio/impl.py", line 45, in _async_execute_process_nopty transport, protocol = await loop.subprocess_exec( File "/usr/lib/python3.10/asyncio/base_events.py", line 1681, in subprocess_exec transport = await self._make_subprocess_transport( File "/usr/lib/python3.10/asyncio/unix_events.py", line 207, in _make_subprocess_transport transp = _UnixSubprocessTransport(self, protocol, args, shell, File "/usr/lib/python3.10/asyncio/base_subprocess.py", line 36, in __init__ self._start(args=args, shell=shell, stdin=stdin, stdout=stdout, File "/usr/lib/python3.10/asyncio/unix_events.py", line 799, in _start self._proc = subprocess.Popen( File "/usr/lib/python3.10/subprocess.py", line 971, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib/python3.10/subprocess.py", line 1751, in _execute_child self._posix_spawn(args, executable, env, restore_signals, File "/usr/lib/python3.10/subprocess.py", line 1696, in _posix_spawn self.pid = os.posix_spawn(executable, args, env, **kwargs) OSError: [Errno 8] Exec format error: '/home/lychee/ros_ws/install/rmu_gazebo_simulator/lib/rmu_gazebo_simulator/simple_competition_1v1.py'

解决方法:

  1. 定位错误文件:/home/lychee/ros_ws/install/rmu_gazebo_simulator/lib/rmu_gazebo_simulator/simple_competition_1v1.py
  2. 查看该文件第一行:head -n 1 simple_competition_1v1.py

发现是如下内容:# Copyright 2021 Zhenpeng Ge

于是我们加入shebang指明解释器:

1
nano simple_competition_1v1.py

并将第一行改为:

1
#!/usr/bin/env python3

成功跑起来!

问题2:

启动导航时,

经过ai的指引,我发现:

  1. 没有话题imu_data

  1. 相关imu话题叫做/red_standard_robot1/livox/imu

  1. 在代码lio的配置文件中,话题设置为imu_data

或者是

修正:与以上问题无关

最终解决方案:n次删除build/和install/ + 1次重启电脑

最终: