1 . fatal error: ros/ros.h: No such file or directory
Cmakelists中添加:
include_directories(include ${catkin_INCLUDE_DIRS})
2 . No rule to make target ....
Cmakelists中添加:
catkin_package() 中需要加上所依赖的文件,可以参看find_package()里边的内容
3 . 运行程序出现 ASSERTION FAILED Call to publish() on an invalid Publisher
在主函数里边没有定义发布者,需要在主函数里边定义发布者。
4 . 编译出现“Eigen/Core: No such file or directory#include <Eigen/Core>”
在CMakeLists.txt中加入,
include_directories("/usr/include/eigen3")
5 . 运行joy节点出现“ERROR: cannot launch node of type [joy/joy_node]: Cannot locate node of type [joy_node] in package [joy]. Make sure file exists in package path and permission is set to executable (chmod +x)”
把joy功能包下载下来,放在src目录下,编译
下载地址:GitHub - ros-drivers/joystick_drivers: ROS drivers for joysticks