调试ROS出现的问题
Could not find a package
错误信息:
Could not find a package configuration file provided by “move_base_msgs” with any of the following names:
解决方案:1.在ROS Wiki 中搜索move_base_msgs(安装包名称) ,进入找到source:git:http://…,进入该网站复制clone or download网址;
2.打开终端 git clone http://… ,然后在Workspace中catkin_make,编译通过。
cannot launch node …[… .py]
错误信息:
ERROR: cannot launch node of type [mbot_teleop/mbot_teleop.py]: can’t locate node [mbot_teleop.py] in package [mbot_teleop]
信息中陈述不能定位到节点,因为.py文件没有权限。
解决方案:1.找到对应的,py文件,右键-属性-权限-“允许作为程序执行文件”前打勾;
2.回到终端,运行命令即可。
环境配置问题
[demo_backpack_2d.launch] is neither a launch file in package [cartographer_ros] nor is [cartographer_ros] a launch file name
在运行roslaunch命令时不通过,显示如上述信息。原因是没有配置环境变量。
配置环境:
[方法一] source ~/.../setup.bash
…为工作空间存放setup.bash的路径,该方法仅在当前终端中生效;
[方法二] echo "source ~/.../setup.bash">> ~/.bashrc
该方法在所有终端中有效
package not found
错误信息:
[rospack] Error: package ‘map_server’ not found
解决方案:sudo apt-get install ros-kinetic-map-server(安装包名称)
安装ompl
CMake Error at grid_path_searcher/CMakeLists.txt:13 (find_package):
By not providing "FindOMPL.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "OMPL", but
CMake did not find one.
Could not find a package configuration file provided by "OMPL" with any of
the following names:
OMPLConfig.cmake
ompl-config.cmake
Add the installation prefix of "OMPL" to CMAKE_PREFIX_PATH or set
"OMPL_DIR" to a directory containing one of the above files. If "OMPL"
provides a separate development package or SDK, be sure it has been
installed.
解决方案:
sudo apt-get install ros-kinetic-ompl*
ROS多个工作空间冲突
解决方案:在当前工作空间中 source devel/setup.bash