0
votes

I'm trying to run this Gazebo simulation: https://github.com/disaster-robotics-proalertas/usv_sim_lsa

I've followed along and installed ROS kinetic on my Ubuntu 16.04. 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.

I've tried installing python-netifaces and using

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

it shows all required rosdeps are installed.

Just trying to run this line: 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. This may take awhile. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <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(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'

1
Can you show command that you use to install netifaces ?W0RT4
I just use sudo apt-get install python-netifacesuser2512219
sudo apt install python3-netifaces can you try this ?W0RT4
Make sure python can see netifaces: pip list | grep netifaces, python -c "exec(\"help('modules')\")" | grep netifaces, python -c "exec(\"help('netifaces')\")" If it was installed with ros, via apt, as it should be, it should be under /usr/lib/python2.7/dist-packages/netifaces.so. If you've been running ros and not having this error, I find that interesting, I think. You can also try pip: pip install netifacesJWCS
I've tried 'sudo apt-get install netifaces' and it seems to successfully install and yet the same issue. I didn't try python3-netifaces as it seems that it's trying to access python2.7 libraries right? Either way that doesn't seem to work either. netifaces does show up with 'pip list | grep netifaces'. But trying to install with 'pip install netifaces' results in a 'failed to build wheel error'.user2512219

1 Answers

0
votes

I believe it might a python path related issues. 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. 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.

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.