1. 程式人生 > >rosrun,roslaunch: cannot launch node or is either a launch file in package

rosrun,roslaunch: cannot launch node or is either a launch file in package

[bzrobot_global.launch] is neither a launch file in package [bzrobot_global] nor is [bzrobot_globa] a launch file name
The traceback for the exception was written to the log file


或者

ERROR: cannot launch node of type [bzrobot_yk/bzrobot_yk]: bzrobot_yk
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/home/wsh/code/bzrobotd
ROS path [2]=/opt/ros/kinetic/share

ros使用的過程中,有時候明明有某個node或者launch檔案,但是rosrun 或者roslaunch啟動的時候,就是找不著:

此時可打列印下 ROS_PACKAGE_PATH的路徑


echo $ROS_PACKAGE_PATH

看一下工作路徑是否含有,如果不含有,在.bashrc中新增(.bashrc 在home路徑下,最好新增在最後一行,不然其他環境變數可能會覆蓋)


export ROS_PACKAGE_PATH=/home/wsh/sw-build/devel:$ROS_PACKAGE_PATH

author: wsh

email:

[email protected]