ROS:ImportError: dynamic module does not define module export function (PyInit__tf2)

时间:2022-11-18 11:59:05


问题:

在ROS执行launch文件的时候,出现了如上的错误提示。

原因及解决办法:

sudo apt update
sudo apt install python3-catkin-pkg-modules python3-rospkg-modules python3-empy
mkdir -p ~/catkin_ws/src; cd ~/catkin_ws
catkin_make
source devel/setup.bash
wstool init
wstool set -y src/geometry2 --git https://github.com/ros/geometry2 -v 0.6.5
wstool up
rosdep install --from-paths src --ignore-src -y -r

​https://answers.ros.org/question/326226/importerror-dynamic-module-does-not-define-module-export-function-pyinit__tf2/​