how to resolve ModuleNotFoundError: No module named 'catkin_pkg'
Hi All,
I am new to ROS and could some one please share some inputs with me to resolve this issue.
I am seeing "ModuleNotFoundError: No module named 'catkinpkg'" error when I have recreated the my own package. Does it mean that we should run "ros2 pkg create –build-type amentpython –node-name my_node
" twice in the same workspace? I am trying to run "colcon build" in a new workspace and I am seeing below error. please provide some tips on how to resolve this issue.
Starting >>> rviz2 --- stderr: rviz2 Traceback (most recent call last):
File "/home/niranjan/ros2foxy/install/amentcmakecore/share/amentcmakecore/cmake/core/packagexml2cmake.py", line 21, infrom catkinpkg.package import parsepackagestring ModuleNotFoundError: No module named 'catkinpkg' CMake Error at /home/niranjan/ros2foxy/install/amentcmakecore/share/amentcmakecore/cmake/core/amentpackagexml.cmake:94 (message):
executeprocess(/home/niranjan/colconvenv/venv/bin/python3 /home/niranjan/ros2foxy/install/amentcmakecore/share/amentcmakecore/cmake/core/packagexml2cmake.py /home/niranjan/ros2foxy/src/ros2/rviz/rviz2/package.xml /home/niranjan/ros2foxy/build/rviz2/amentcmakecore/package.cmake) returned error code 1 Call Stack (most recent call first):
/home/niranjan/ros2foxy/install/amentcmakecore/share/amentcmakecore/cmake/core/amentpackagexml.cmake:49 (amentpackagexml)
/home/niranjan/ros2foxy/install/amentcmakecore/share/amentcmakecore/cmake/core/amentpackage.cmake:63 (amentpackagexml)
CMakeLists.txt:101 (amentpackage)
Failed <<< rviz2 [12.7s, exited with code 1]
Aborted <<< ros1_bridge [27min 2s]
Thanks
Asked by rao on 2022-11-15 13:26:53 UTC
Comments
ros2 : If you are using ROS2 then you havee to use colcon build.
Asked by Ranjit Kathiriya on 2022-11-17 10:29:50 UTC