问题原因:不同包里不允许有重名的节点
解决方案:编辑重复的package文件夹里的CMakeLists.txt文件,对涉及到节点名称的代码进行修改
调试过程:逐行分析问题代码,问题的BUG基本都能找到原因,记住一定要从第一个ERROR开始修复,有时候出现了一堆BUG,其实都是第一个BUG引起的
贴上问题代码:
-- Using CATKIN_DEVEL_PREFIX: /home/jier/dev/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /home/jier/dev/catkin_ws/devel;/home/jier/catkin_ws/devel;/opt/ros/kinetic
-- This workspace overlays: /home/jier/dev/catkin_ws/devel;/home/jier/catkin_ws/devel;/opt/ros/kinetic
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/jier/dev/catkin_ws/build/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.8
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~ traversing 2 packages in topological order:
-- ~~ - chapter2_tutorials
-- ~~ - chapter3_tutorials
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'chapter2_tutorials'
-- ==> add_subdirectory(chapter2_tutorials)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- chapter2_tutorials: 1 messages, 1 services
-- +++ processing catkin package: 'chapter3_tutorials'
-- ==> add_subdirectory(chapter3_tutorials)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- system
-- filesystem
-- thread
-- date_time
-- iostreams
-- serialization
-- chrono
-- atomic
-- regex
-- Checking for module 'libopenni2'
-- No package 'libopenni2' found
-- Could NOT find OpenNI2 (missing: OPENNI2_LIBRARY OPENNI2_INCLUDE_DIRS)
** WARNING ** io features related to openni2 will be disabled
** WARNING ** io features related to pcap will be disabled
** WARNING ** io features related to png will be disabled
-- The imported target "vtkRenderingPythonTkWidgets" references the file
"/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/usr/lib/cmake/vtk-6.2/VTKTargets.cmake"
but not all the files it references.
-- The imported target "vtk" references the file
"/usr/bin/vtk"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete su