简体   繁体   English

凉亭sim卡未运行,因为未找到已安装的netifaces模块

[英]Gazebo sim not running because installed netifaces module not found

I'm trying to run this Gazebo simulation: https://github.com/disaster-robotics-proalertas/usv_sim_lsa 我正在尝试运行此凉亭模拟: https : //github.com/disaster-robotics-proalertas/usv_sim_lsa

I've followed along and installed ROS kinetic on my Ubuntu 16.04. 我一直在我的Ubuntu 16.04上安装ROS dynamic。 But I keep getting an error for netifaces module not found, even though I've repeatedly installed it and can import netifaces when I launch python in the terminal. 但是,即使我反复安装了该模块,但仍然遇到找不到netifaces模块的错误,并且在终端中启动python时可以import netifaces

I've tried installing python-netifaces and using 我试过安装python-netifaces并使用

rosdep install --from-paths src --ignore-src --rosdistro groovy -y

it shows all required rosdeps are installed. 它显示所有必需的rosdeps已安装。

Just trying to run this line: roslaunch usv_sim airboat_scenario1.launch parse:=true 只是尝试运行此行: roslaunch usv_sim airboat_scenario1.launch parse:=true

Here's the error I keep getting: 这是我不断得到的错误:

rameezs:~/catkin_ws$ roslaunch usv_sim airboat_scenario1.launch parse:=true ... logging to /home/rameezs/.ros/log/5cbbdbb0-c28f-11e9-bea5-88b111c4685a/roslaunch-thinkram-16846.log Checking log directory for disk usage. rameezs:〜/ catkin_ws $ roslaunch usv_sim airboat_scenario1.launch parse:= true ...登录到/home/rameezs/.ros/log/5cbbdbb0-c28f-11e9-bea5-88b111c4685a/roslaunch-thinkram-16846.log检查日志目录磁盘使用情况。 This may take awhile. 可能还要等一下。 Press Ctrl-C to interrupt Done checking log file disk usage. 按Ctrl-C中断“完成检查日志文件磁盘使用情况”。 Usage is <1GB. 用量小于1GB。

Traceback (most recent call last): File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/ init .py", line 306, in main p.start() File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/parent.py", line 268, in start self._start_infrastructure() File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/parent.py", line 217, in _start_infrastructure self._load_config() File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/parent.py", line 132, in _load_config roslaunch_strs=self.roslaunch_strs, verbose=self.verbose) File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/config.py", line 471, in load_config_default config.assign_machines() File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/config.py", line 222, in assign_machines if [m for m in machine_unify_dict.values() if not is_machine_local(m)]: File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/config.py", line 222, in if [m for m in machine_unify_dict.values() if not is_machine_local( 回溯(最近通话最后一个):文件“/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/ 初始化的.py”,线路306,在主p.start()文件“/选择/ ROS /kinetic/lib/python2.7/dist-packages/roslaunch/parent.py“,行268,在开始self._start_infrastructure()文件“ /opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch”中_start_infrastructure self._load_config()文件中的“ /parent.py”行217,_load_config中的文件“ /opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/parent.py”,行132 roslaunch_strs = self .roslaunch_strs,verbose = self.verbose)文件“ /opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/config.py”,第471行,位于load_config_default config.assign_machines()文件中,“ / opt / ros / kinetic / lib / python2.7 / dist-packages / roslaunch / config.py“,行222,如果[如果不是is_machine_local(m)中的m在machine_unify_dict.values()中为m, ros / kinetic / lib / python2.7 / dist-packages / roslaunch / config.py“,第222行,如果if [m代表machine_unify_dict.values()中的m,则不是is_machine_local( m)]: File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/core.py", line 97, in is_machine_local local_addresses = ['localhost'] + rosgraph.network.get_local_addresses() File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosgraph/network.py", line 217, in get_local_addresses import netifaces ModuleNotFoundError: No module named 'netifaces' m)]:在is_machine_local local_addresses = ['localhost'] + rosgraph.network.get_local_addresses()中,文件“ /opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/core.py”第97行get_local_addresses中的文件“ /opt/ros/kinetic/lib/python2.7/dist-packages/rosgraph/network.py”,行217导入netifaces ModuleNotFoundError:没有名为“ netifaces”的模块

I believe it might a python path related issues. 我相信这可能是与python路径相关的问题。 when you do such binary installations, in general those packages get installed in dist-package file of the respective python either python 2.7 or python 3. And ros-kinetic uses python 2.7 for its basic commands such as roslib and rospy. 当您进行此类二进制安装时,通常这些软件包将安装在相应python 2.7或python 3的dist-package文件中。ros-kinetic将python 2.7用于roslib和rospy等基本命令。 So please try to check whether the installed netifaces are in the same pythonpath, if not try to export python path before launching the file. 因此,请尝试检查已安装的netifaces是否在同一pythonpath中,如果不尝试在启动文件之前导出python路径。

Als please try to check the python path from the terminal you are launching your file, that way you will know which python paths are imported, if python3 path is not imported, please try to export that path aswell. Als请尝试从正在启动文件的终端检查python路径,这样您将知道导入了哪些python路径,如果未导入python3路径,请尝试也导出该路径。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM