Win10 x64, ROS 2 - Humble, VS 2019
I'm going through the ROS beginners tutorials but I've run into problem building packages with colcon and got as far as the Using colcon to build packages tutorial.
I'm running as admin from a VS 2019 command line, I sourced ros2 by running the local_setup.bat file. I installed the colcon extensions, downloaded the examples & set up the directory structure as outlined in the tutorial.
I then tried to build colcon using colcon build --symlink-install --merge-install
Which after installing a few packages complains & aborts the build with,
--- stderr: examples_rclcpp_minimal_publisher
Traceback (most recent call last):
File "C:\ROS_Humble\ros2\share\ament_cmake_core\cmake\core\package_xml_2_cmake.py", line 22, in <module>
from catkin_pkg.package import parse_package_string
ModuleNotFoundError: No module named 'catkin_pkg'
CMake Error at C:/ROS_Humble/ros2/share/ament_cmake_core/cmake/core/ament_package_xml.cmake:95 (message):
execute_process(C:/ProgramData/Anaconda3/python.exe
C:/ROS_Humble/ros2/share/ament_cmake_core/cmake/core/package_xml_2_cmake.py
D:/ROS_scratch/dev/ros2_ws/src/examples/rclcpp/topics/minimal_publisher/package.xml
D:/ROS_scratch/build/examples_rclcpp_minimal_publisher/ament_cmake_core/package.cmake)
returned error code 1
Call Stack (most recent call first):
C:/ROS_Humble/ros2/share/ament_cmake_core/cmake/core/ament_package_xml.cmake:49 (_ament_package_xml)
C:/ROS_Humble/ros2/share/ament_lint_auto/cmake/ament_lint_auto_find_test_dependencies.cmake:31 (ament_package_xml)
CMakeLists.txt:47 (ament_lint_auto_find_test_dependencies)
Anyone know what this is about? I've seen a few posts around about people not sourcing ros2 in the right environment but that isn't the issue here.
I would start by trying to obtain the
catkin_pkgmodule and making sure it's installed, based on:Apparently this should do the trick:
pip install -U catkin_pkgIf that doesn't help then I will update my answer with hints on how to debug this to get more information for us.