ubuntu20.04+python3编译gnss_ins_sim报错问题解决(多传感器融合定位第6章)
运行功能包时出现如下问题:
RLException: Roslaunch got a 'No such file or directory' error while attempting to run:
/home/hb/ws/sensor_fusion_ws/src/gnss_ins_sim/src/recorder_node_sim.py __name:=gnss_ins_sim_recorder_node __log:=/home/hb/.ros/log/5faa6140-30e9-11ed-a211-c1c0f221f6f2/gnss_ins_sim_recorder_node-2.log
Please make sure that all the executables in this command exist and have
executable permission. This is often caused by a bad launch-prefix.
The traceback for the exception was written to the log file
在gnss_ins_sim/src中找到recorder_node_sim.py,修改第一行代码
#!/usr/bin/python改为#!/usr/bin/python3
然后继续roslaunch gnss_ins_sim recorder_gnss_ins_sim.launch,又出现如下问题,
Traceback (most recent call last):
File "/home/hb/ws/sensor_fusion_ws/src/gnss_ins_sim/src/recorder_node_sim.py", line 13, in <module>
from gnss_ins_sim.sim import imu_model
ModuleNotFoundError: No module named 'gnss_ins_sim'
在网上下载gnss_ins_sim源码gnss_ins_sim_ros-master.zip,解压后将gnss_ins_sim放入/home/xx/ws/sensor_fusion_ws/src/gnss_ins_sim/src目录下
继续roslaunch gnss_ins_sim recorder_gnss_ins_sim.launch
,又出现如下问题,
NotImplementedError: It is not currently possible to manually set the aspect on 3D axes
可能是matplotlib版本问题
在recorder_node_sim.py中找到135行
将‘3d’改为'2d'或'auto'
,继续运行roslaunch,如下图所示
轻松秒杀!
参考链接:https://answers.ros.org/question/308829/roslaunch-got-a-no-such-file-or-directory-error/