ROS中国大学MOOC学习记录(一)

ROS中国大学MOOC学习记录(一)

Topic in roscpp 这一节原教程的pdf内容有一些遗漏

CMakeList…txt里pdf中没写全,视频中给全了,但是没加红标注。
catkin_package( CATKIN_DEPENDS roscpp rospy std_msgs message_runtime) 这一段,在未修改的CMakeList.txt中是没有取消注释的。
ROS中国大学MOOC学习记录(一)_第1张图片

package.xml文件应该改成下面这样,注意我加粗倾斜的地方,是视频和pdf里以及b站弹幕没写的

catkin
roscpp
rospy
std_msgs
message_generation
roscpp
rospy
std_msgs
roscpp
rospy
std_msgs
message_runtime

否则会出现这样的问题
CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:196 (message):
catkin_package() the catkin package ‘std_msgs’ has been find_package()-ed
but is not listed as a build dependency in the package.xml

Call Stack (most recent call first):
/opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:102 (_catkin_package)
topic_demo_test/CMakeLists.txt:105 (catkin_package)

– Configuring incomplete, errors occurred!
See also “/home/dg/catkin_ws/build/CMakeFiles/CMakeOutput.log”.
See also “/home/dg/catkin_ws/build/CMakeFiles/CMakeError.log”.
Makefile:3370: recipe for target ‘cmake_check_build_system’ failed
make: *** [cmake_check_build_system] Error 1
Invoking “make cmake_check_build_system” failed

你可能感兴趣的:(ROS学习)