RLException: [xx.launch] is neither a launch file in package [x] nor is [x] a launch file name的解决方法

在ROS学习中遇到RLException错误,原因可能是环境变量未正确设置。解决方法包括直接在命令行sourcedevel/setup.bash或修改.bashrc文件添加工作空间路径。确保ROS_PACKAGE_PATH包含工作空间路径后,需重启bashrc使其生效。

ROS学习过程中,遇到问题:RLException: [xx.launch] is neither a launch file in package [x] nor is [x] a launch file name

出现的问题:

在ROS学习中,进行工作区下编译的时候,突然报错,出现的错误如下

RLException: [racecar.launch] is neither a launch file in package [racecar_gazebo] nor is [racecar_gazebo] a launch file name
The traceback for the exception was written to the log file

这种错误的出现,是因为坏境变量没有被添加!!!

解决方案

添加环境变量即可
添加环境变量的方法不唯一

这里介绍两种方法,两种方式各有优点

方法一

确保在建立工作空间的时候就已经执行catkin_make

直接在命令行,进入到工作空间,然后执行以下命令:

source ./devel/setup.bash

这种方式,可以直接在命令行中操作,短时间内是看着比较简单的。每次不确定的时候就可以直

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值