ros-drivers/ros2_ouster_drivers

colcon build fails - No module named 'catkin_pkg'

invoke7 opened this issue · 1 comments

Hi, there seems to be a problem with ROS2 and colcon. I'm working on Ubuntu 20.04 and ROS2 Foxy. Any idea how to get this to run? I really needs this sensor to run with ROS2.

Here is what I did:

mkdir -p ros2_ws/src
cd ros2_ws/src/
git clone https://github.com/ros-drivers/ros2_ouster_drivers.git
cd ..
colcon build

And here is the error:

Starting >>> ouster_msgs
--- stderr: ouster_msgs
Traceback (most recent call last):
File "/opt/ros/foxy/share/ament_cmake_core/cmake/core/package_xml_2_cmake.py", line 21, in
from catkin_pkg.package import parse_package_string
ModuleNotFoundError: No module named 'catkin_pkg'
CMake Error at /opt/ros/foxy/share/ament_cmake_core/cmake/core/ament_package_xml.cmake:94 (message):
execute_process(/home/invoke7/anaconda3/bin/python3
/opt/ros/foxy/share/ament_cmake_core/cmake/core/package_xml_2_cmake.py
/home/invoke7/Development/ros2_ws/src/ros2_ouster_drivers/ouster_msgs/package.xml
/home/invoke7/Development/ros2_ws/build/ouster_msgs/ament_cmake_core/package.cmake)
returned error code 1
Call Stack (most recent call first):
/opt/ros/foxy/share/ament_cmake_core/cmake/core/ament_package_xml.cmake:49 (_ament_package_xml)
/opt/ros/foxy/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:226 (ament_package_xml)
CMakeLists.txt:9 (rosidl_generate_interfaces)


Failed <<< ouster_msgs [0.86s, exited with code 1]

Summary: 0 packages finished [0.96s]
1 package failed: ouster_msgs
1 package had stderr output: ouster_msgs
1 package not processed

The problem resolved itself. I have no idea why.