【ROS】ROS运行turtle_tf遇到的问题和解决方案
在测试乌龟跟随案例中,运行roslaunch turtle_tf2 turtle_tf2_demo_cpp.launch没有问题;但是运行roslaunch turtle_tf2 turtle_tf2_demo.launch一直乌龟可以移动,但是另外一直乌龟出不来。会出现/usr/bin/env: ‘python’: No such file or directory,是因为在其目录中找的是pyt
·
在测试乌龟跟随案例中,运行
roslaunch turtle_tf2 turtle_tf2_demo_cpp.launch
没有问题;但是运行
roslaunch turtle_tf2 turtle_tf2_demo.launch
一直乌龟可以移动,但是另外一只乌龟出不来。
会出现/usr/bin/env: ‘python’: No such file or directory,
是因为在其目录中找的是python的编译器,但是ROS安装是安装的是python3.8(这里以noetic)所以他的编译器的名称是python3,而不是python所以在运行的时候就会报错。
解决方案:
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1
之后重新开启一个终端,验证一下输入
python
再次输入
roslaunch turtle_tf2 turtle_tf2_demo.launch
问题解决。
参考:https://blog.csdn.net/qq_43470610/article/details/108074841

GitCode 天启AI是一款由 GitCode 团队打造的智能助手,基于先进的LLM(大语言模型)与多智能体 Agent 技术构建,致力于为用户提供高效、智能、多模态的创作与开发支持。它不仅支持自然语言对话,还具备处理文件、生成 PPT、撰写分析报告、开发 Web 应用等多项能力,真正做到“一句话,让 Al帮你完成复杂任务”。
更多推荐
所有评论(0)