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

本文介绍了解决ROS中启动node或launch文件时找不到指定文件的问题。通过检查和设置ROS_PACKAGE_PATH环境变量来确保ROS能够找到所需的资源。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

[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: tongzhuodenilove@163.com





评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值