resource not found: roslaunch和Command ‘rosrun‘ not found的解决方法

安装ros的时候,历经种种困难后终于完成了前面的步骤,却在运行roscore时再次出现了问题:
Resource not found: roslaunch
ROS path [0]=/opt/ros/noetic/share/ros
ROS path [1]=/opt/ros/noetic/share
The traceback for the exception was written to the log file

这个问题在网上找了好久都找不到解决的办法,最后在ros官方社区上的一条评论中找到了:
“I did sudo apt install ros-noetic-roslaunch and now roscore is working. ”

接下来尝试运行小乌龟:rosrun turtlesim turtlesim_node
可是又报错了:
Command ‘rosrun’ not found, but can be installed with:
sudo apt install rosbash
这时候按照它的指令安装rosbash一直出现依赖问题。同样上官网搜索,应该输入:
sudo apt install ros-noetic-rosbash (noetic版本)

这时候还有可能出现package ‘turtlesim’ not found
只需要sudo apt install ros-noetic-turtlesim即可

总结:
很多找不到解决办法的上官网搜,不要觉得自己英语不行。
很多问题是缺失了包,安装上去就好了。
新人第一次发博,希望对大家有帮助!

你可能感兴趣的:(linux)