ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

ROS2 Turtlebot3 fails with numpy not found

asked 2019-07-13 14:45:04 -0600

Ed C. gravatar image

Environment

  • Turtlebot3 Waffle
  • Intel NUC i5
  • Ubuntu 18.04
  • ROS2 Crystal

Goal

I am replacing the Joule on my Turtlebot3 Waffle with a NUC. I want more capability on the Waffle making it on par with typical Turtlebot2 systems. Furthermore, the Joule is no longer supported. I know that the NUC is not an officially supported either. I am posting this question as a benefit to others that may be interested in Intel Core enabled solutions.

Details

ROS2 installed fine. The examples in the "Using colcon to build package" tutorial built and the publish/subscribe example ran well.

I ran into trouble with the ROS2 Turtlebot3 install Robotis eManual Section 15. In particular see Section 15.1.1.3 "Install Turtlebot3 ROS2 Packages".

colcon build --symlink-install fails. I get the following error during the cv_bridge build. See a detailed log at this message end.

ModuleNotFoundError: No module named 'numpy'

apt tells me python-numpy is not installed. So I install it.

$ apt list --installed python-numpy 
     Listing... Done
$ sudo apt install python-numpy
$ apt list --installed python-numpy
    Listing... Done
    python-numpy/bionic,now 1:1.13.3-2ubuntu1 amd64 [installed]

Furthermore, a python example program using numpy now executes properly. It didn't run before.

I still get the ModuleNotFoundError: No module named 'numpy' error.

Question

How do I fix this?

Complete colcon build log

$ colcon build --symlink-install
Starting >>> nav2_common
Starting >>> nav_2d_msgs
Starting >>> angles
Starting >>> behaviortree_cpp
Finished <<< nav2_common [1.54s]                                   
Starting >>> nav2_msgs
Finished <<< angles [3.70s]                                      
Starting >>> nav2_voxel_grid
[Processing: behaviortree_cpp, nav2_msgs, nav2_voxel_grid, nav_2d_msgs]
Finished <<< nav2_voxel_grid [43.7s]                                   
Starting >>> cv_bridge
--- stderr: cv_bridge                                                  
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'numpy'
CMake Error at src/CMakeLists.txt:27 (message):
  Could not determine the NumPy include directory, verify that NumPy was
  installed correctly.


---
Failed   <<< cv_bridge  [ Exited with code 1 ]
Aborted  <<< nav_2d_msgs                               
Aborted  <<< behaviortree_cpp                          
Aborted  <<< nav2_msgs                                                     

Summary: 3 packages finished [4min 35s]
  1 package failed: cv_bridge
  3 packages aborted: behaviortree_cpp nav2_msgs nav_2d_msgs
  1 package had stderr output: cv_bridge
  48 packages not processed
edit retag flag offensive close merge delete

Comments

Perhaps you need the python3 version of numpy?

ahendrix gravatar image ahendrix  ( 2019-07-13 18:09:52 -0600 )edit

Thanks. That was it.

Ed C. gravatar image Ed C.  ( 2019-07-13 23:54:53 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-07-13 23:57:02 -0600

Ed C. gravatar image

Install the Python3 version of numpy

sudo apt install python3-numpy
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-07-13 14:45:04 -0600

Seen: 1,388 times

Last updated: Jul 13 '19