在进行catkin_init_workspace时出现报错
Could neither find file "toplevel.cmake" in any workspace nor relative, checked the following paths: /home/hiuching-g/catkin_ws/src/catkin/cmake/toplevel.cmake /usr/local/lib/python3.8/dist-packages/cmake/toplevel.cmake /usr/local/lib/share/catkin/cmake/toplevel.cmake /usr/local/lib/python3.8/share/catkin/cmake/toplevel.cmake
参考了如下解决办法后发现不行,因为在所有以上路径都没有toplevel.cmake这个文件。
别人的解决办法链接
考虑到本人装用的是ros2-foxy,且在装catkin时遇到了catkin: command not found的问题,于是采用了https://blog.csdn.net/xiangxianghehe/article/details/78830477?spm=1001.2014.3001.5506的安装方法,并且在Home目录留了一个catkin包。于是将这个包复制到/home/hiuching-g/catkin_ws/src/catkin/cmake/toplevel.cmake目录下,就生效成功了。