原因是ros2在安装一些库的时候,在ros2的路径下生成了cartographer,默认找到了ros下,导致的,把这些库删掉即可
kobe@kobe-NUC11PAHi7:/opt/ros/humble/include$ sudo rm -R cartographer
[sudo] kobe 的密码:
kobe@kobe-NUC11PAHi7:/opt/ros/humble/include$ sudo rm -R cartographer_ros
kobe@kobe-NUC11PAHi7:/opt/ros/humble/include$ sudo rm -R cartographer_ros_msgs/文章来源:https://www.toymoban.com/news/detail-739330.html
kobe@kobe-NUC11PAHi7:/opt/ros/humble/lib$ sudo rm -R cartographer_ros/文章来源地址https://www.toymoban.com/news/detail-739330.html
到了这里,关于Ros2 自己修改的cartographer代码编译后不生效的解决办法的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!