解决方法:参考 https://www.guyuehome.com/34561
将python版本设置到3或在3以上版本时,catkin_make出现错误:
ImportError: “from catkin_pkg.topological_order import topological_order” failed: No module named ‘catkin_pkg’
请参考:https://www.jianshu.com/p/e964928d6c62
最后再执行:
sudo chmod 777 /opt/ros/melodic/bin/catkin_make
gedit /opt/ros/melodic/bin/catkin_make
打开后将第一行改为#!/usr/bin/python3之后再正常使用catkin_make进行编译即可。