欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

ROS报错处理(持续更新)

程序员文章站 2022-06-13 22:58:23
...

1、[rospack] Error: package 'test' not found

没有找到ros功能包,原因是没有为功能包配置系统环境,可以利用source运行工作空间中devel目录下的setup.bash配置文件并使配置立即生效。setup.bash脚本的作用是让一些ros* 开头的命令可以使用,同时还能够创建一些ROS开头的环境变量eg:ROS_PACKAGE_PATH。在命令行中可以使用echo在~/.bashrc文件中追加以下内容:echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc

 

2、Could not find a package configuration file provided by "moveit_ros_planning" with any of the following names:
 
        moveit_ros_planningConfig.cmake
        moveit_ros_planning-config.cmake

没有安装moveit,可以使用sudo apt-get install ros-kinetic-moveit-full命令来安装。
 
 

3、[robot_spawn.launch] is neither a launch file in package [robot_sim_demo] nor is [robot_sim_demo] a launch file name
The traceback for the exception was written to the log file

不能识别ros功能包中的launch文件,原因是没有修改系统中存放ros功能包路径的环境变量。可以使用如下命令添加路径:

export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:[path of your ros package]

(export命令修改环境变量的方式也能用来解决source覆盖机制)

 

4、roscore打不开,并报错:

'ascii' codec can't decode byte 0xe6 in position 10: ordinal not in range(128)
The traceback for the exception was written to the log file

注意不要在ubuntu桌面上创建ros包,这是因为ros的包路径不允许出现中文,所有ros包的路径都会被系统自动添加到ROS_PACKAGE_PATH和ROSLISP_PACKAGE_DIRECTORIES环境变量中,导致ros启动时出错。
解决方案是:将桌面上的包移动到其他不包含中文的目录中,或者删除这些包。

 

5、to be continued...

相关标签: ros 报错处理