https://blog.csdn.net/TLKids/article/details/123876935
报错如下
PX4仿真出现raise OsNotDetected
gazebo会出现不识别系统的提示,如下所示:
raise OsNotDetected( Could not detect OS, tried %s % attempted) rospkg.os_detect.OsNotDetected: Could not detect OS, tried
raise OsNotDetected("Could not detect OS, tried %s" % attempted)
rospkg.os_detect.OsNotDetected: Could not detect OS, tried ['zorin', 'windows', 'nixos', 'clearlinux', 'ubuntu', 'slackware', 'rocky', 'rhel', 'qnx', 'pop', 'osx', 'sailfishos', 'tizen', 'oracle', 'opensuse', 'opensuse', 'opensuse', 'opensuse', 'opensuse', 'openembedded', 'neon', 'mx', 'mint', 'linaro', 'gentoo', 'funtoo', 'freebsd', 'fedora', 'elementary', 'elementary', 'debian', 'cygwin', 'euleros', 'centos', 'manjaro', 'buildroot', 'arch', 'amazon', 'alpine', 'almalinux']
但是由于这部分报错的提示终端中并没有以红色打印出来,而是常规的字体颜色,这导致很容易让人忽略这个关键信息。一般发生这种情况还会伴随着下图所示的报错提示:
这次检查一下:/etc/lsb-release,你会惊讶地发现怎么变成了Kylin?我明明是ubuntu呀?那么很有可能是你最近安装的一些.deb是来自于kylin的,比如微信。
DISTRIB_ID=Kylin
DISTRIB_RELEASE=V10
DISTRIB_CODENAME=kylin
DISTRIB_DESCRIPTION="Kylin V10 SP1"
DISTRIB_KYLIN_RELEASE=V10
DISTRIB_VERSION_TYPE=enterprise
DISTRIB_VERSION_MODE=normal
那么我们将他们更改成如下内容并保存(我这里是18.04.6)
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.6 LTS"