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

来源:互联网 发布:海尔燃气热水器 知乎 编辑:程序博客网 时间:2024/05/22 05:24
[html] view plain copy
 print?在CODE上查看代码片派生到我的代码片
  1. [bzrobot_global.launch] is neither a launch file in package [bzrobot_global] nor is [bzrobot_globa] a launch file name  
  2. The traceback for the exception was written to the log file  


或者

[html] view plain copy
 print?在CODE上查看代码片派生到我的代码片
  1. ERROR: cannot launch node of type [bzrobot_yk/bzrobot_yk]: bzrobot_yk  
  2. ROS path [0]=/opt/ros/kinetic/share/ros  
  3. ROS path [1]=/home/wsh/code/bzrobotd  
  4. ROS path [2]=/opt/ros/kinetic/share  

ros使用的过程中,有时候明明有某个node或者launch文件,但是rosrun 或者roslaunch启动的时候,就是找不着:

此时可打打印下 ROS_PACKAGE_PATH的路径


[html] view plain copy
 print?在CODE上查看代码片派生到我的代码片
  1. echo $ROS_PACKAGE_PATH  

看一下工作路径是否含有,如果不含有,在.bashrc中添加(.bashrc 在home路径下,最好添加在最后一行,不然其他环境变量可能会覆盖)


[html] view plain copy
 print?在CODE上查看代码片派生到我的代码片
  1. export ROS_PACKAGE_PATH=/home/wsh/sw-build/devel:$ROS_PACKAGE_PATH  
0 0
原创粉丝点击