ROS can't find numpy
Hello,
I was trying to launch the turtlebot3_world.launch file from turtlebot3_gazebo package, but it outputs the following:
started roslaunch server http://marco-TP51:42481/
SUMMARY
========
PARAMETERS
* /gazebo/enable_ros_network: True
* /robot_description: <?xml version="1....
* /rosdistro: melodic
* /rosversion: 1.14.3
* /use_sim_time: True
NODES
/
gazebo (gazebo_ros/gzserver)
gazebo_gui (gazebo_ros/gzclient)
spawn_urdf (gazebo_ros/spawn_model)
auto-starting new master
process[master]: started with pid [16336]
ROS_MASTER_URI=http://localhost:11311
setting /run_id to 86828436-6078-11e9-9932-aced5c629b57
process[rosout-1]: started with pid [16348]
started core service [/rosout]
process[gazebo-2]: started with pid [16351]
process[gazebo_gui-3]: started with pid [16359]
process[spawn_urdf-4]: started with pid [16365]
[ INFO] [1555440639.459944750]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1555440639.460939990]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[ INFO] [1555440639.508931990]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1555440639.510168849]: waitForService: Service [/gazebo_gui/set_physics_properties] has not been advertised, waiting...
Traceback (most recent call last):
File "/opt/ros/melodic/lib/gazebo_ros/spawn_model", line 31, in <module>
from tf.transformations import quaternion_from_euler
File "/opt/ros/melodic/lib/python2.7/dist-packages/tf/__init__.py", line 31, in <module>
from .listener import Transformer, TransformListener, TransformerROS
File "/opt/ros/melodic/lib/python2.7/dist-packages/tf/listener.py", line 29, in <module>
import numpy
ImportError: No module named numpy
[spawn_urdf-4] process has died [pid 16365, exit code 1, cmd /opt/ros/melodic/lib/gazebo_ros/spawn_model -urdf -model turtlebot3_burger -x -2.0 -y -0.5 -z 0.0 -param robot_description __name:=spawn_urdf __log:=/home/marco/.ros/log/86828436-6078-11e9-9932-aced5c629b57/spawn_urdf-4.log].
log file: /home/marco/.ros/log/86828436-6078-11e9-9932-aced5c629b57/spawn_urdf-4*.log
[ INFO] [1555440640.992841491, 0.022000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1555440641.029005943, 0.056000000]: Physics dynamic reconfigure ready.
[Err] [REST.cc:205] Error in REST request
libcurl: (51) SSL: no alternative certificate subject name matches target host name 'api.ignitionfuel.org'
It's clear to me that ROS has trouble finding numpy.
However, I had installed numpy minutes earlier, by doing sudo apt-get install python-numpy
. Sure enough, if I do apt search python-numpy
it says it's installed:
Sorting... Done
Full Text Search... Done
python-numpy/bionic,now 1:1.13.3-2ubuntu1 amd64 [installed]
Numerical Python adds a fast array facility to the Python language
Then, I tried opening a python terminal and typing help("modules")
. The result for that is:
Python 2.7.15rc1 (default, Nov 12 2018, 14:31:15)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> help("modules")
Please wait a moment while I gather a list of all available modules...
ImportError: numpy.core.multiarray failed to import
ImportError: numpy.core.multiarray failed to import
registered capabilities (classes):
- rosbridge_library.capabilities.call_service.CallService
- rosbridge_library.capabilities.advertise.Advertise
- rosbridge_library.capabilities.publish.Publish
- rosbridge_library.capabilities.subscribe.Subscribe
- <class 'rosbridge_library.capabilities.defragmentation.Defragment'>
- rosbridge_library.capabilities.advertise_service.AdvertiseService
- rosbridge_library.capabilities.service_response.ServiceResponse
- rosbridge_library.capabilities.unadvertise_service.UnadvertiseService
/usr/lib/python2.7/dist-packages/IPython/kernel/__init__.py:13: ShimWarning: The `IPython.kernel` package has been deprecated since IPython 4.0.You should import from ipykernel or jupyter_client instead.
"You should import from ipykernel ...
pedantic, but: python is having trouble loading the
numpy
module. ROS does not load or find anything here.