当前位置:   article > 正文

fatal error: ros/ros.h: No such file or directory——ROS编译过程出现错误

ros/ros.h: no such file or directory

fatal error: ros/ros.h: No such file or directory——ROS编译过程出现错误

CMakeLists.txt文件添加代码

find_package(catkin REQUIRED COMPONENTS
  roscpp
  rospy
  sensor_msgs
  geometry_msgs
  tf
)

include_directories(include ${catkin_INCLUDE_DIRS} ${PCL_INCLUDE_DIRS})

add_executable(rpy_angles src/rpy_angles.cpp)
target_link_libraries(rpy_angles ${catkin_LIBRARIES})
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12

package.xml文件添加代码

  <run_depend>tf</run_depend>
  <run_depend>nav_msgs</run_depend>
  <build_depend>actionlib</build_depend>
  <build_depend>actionlib_msgs</build_depend>
  <run_depend>actionlib</run_depend>
  <run_depend>actionlib_msgs</run_depend>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

编译成功

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/weixin_40725706/article/detail/375471
推荐阅读
相关标签
  

闽ICP备14008679号