roslaunch rbx1_bringup fake_pi_robot.launch 运行报错[fake_turtlebot.launch] is neither a launch file in

在ros 中运行示例代码

roslaunch rbx1_bringup fake_pi_robot.launch 

时,有时会运行出错,报错如下所示:

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

出现该问题的原因是没有把rbx1_bringup的路径加入到环境变量,系统找不到该文件;
解决方法:
一、打开 /etc/profile;

 sudo gedit /etc/profile

二、在 /etc/profile 的最后加入下面两行(把rbx1的路径替换为自己系统上的路径)

export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:/exbot/home/catkin_ws/src/rbx1
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:/exbot/home/catkin_ws/src/rbx1/rbx1_bringup

三、修改完保存后运行下列命令:

source /etc/profile

欢迎关注我的公众号:

编程技术与生活(ID:hw_cchang)

roslaunch rbx1_bringup fake_pi_robot.launch 运行报错[fake_turtlebot.launch] is neither a launch file in_第1张图片

你可能感兴趣的:(ROS)