天天看點

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即可

總結:

很多找不到解決辦法的上官網搜,不要覺得自己英語不行。

很多問題是缺失了包,安裝上去就好了。

新人第一次發博,希望對大家有幫助!

繼續閱讀