我正在关注本教程:
http://wiki.ros.org/ethzasl_sensor_fusion/Tutorials/Introductory%20Tutorial%20for%20Multi-Sensor%20Fusion%20Framework
并已在catkin工作区中编译了该程序包。我试图获取新的名称空间并启动过滤器,但无法执行此操作,因为遇到错误,无法定位pose_sensor节点。我有source
个devel/setup.bash
。
但是,这并不能解决问题。我仍然收到错误:
NODES
/msf_viconpos_sensor (msf_updates/pose_sensor)
ROS_MASTER_URI=http://localhost:11311
ERROR: cannot launch node of type [msf_updates/pose_sensor]: can't locate node [pose_sensor] in package [msf_updates]
编辑:
添加缺少的代码后,这是我运行catkin_make
时遇到的新错误:
/bin/sh: 1: cannot open /home/yukti/catkin_ws/src/fix-unused-typedef-warning.patch: No such file
glog_catkin-master/CMakeFiles/glog_src.dir/build.make:101: recipe for target 'glog_catkin-master/glog_src-prefix/src/glog_src-stamp/glog_src-patch' failed
make[2]: *** [glog_catkin-master/glog_src-prefix/src/glog_src-stamp/glog_src-patch] Error 2
CMakeFiles/Makefile2:502: recipe for target 'glog_catkin-master/CMakeFiles/glog_src.dir/all' failed
make[1]: *** [glog_catkin-master/CMakeFiles/glog_src.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 3%] Linking CXX shared library /home/yukti/catkin_ws/devel/lib/libmsf_timing.so
[ 3%] Built target msf_timing
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j2 -l2" failed
编辑2:
按如下所示运行其他make命令后:
cmake .. -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=/usr/local
我能够成功编译。但是,我仍然收到相同的错误;
can't locate node [pose_sensor] in package [msf_updates]
编辑3:编辑2不正确,因为我的主文件夹中包含CMakeLists.txt的src文件夹不正确。如果遵循正确的顺序,我仍然会收到类似于Edit 1的编译错误。
编辑4:添加请求请求中的所有更改后,cmake失败。这是日志:
Base path: /home/yukti/catkin_ws
Source space: /home/yukti/catkin_ws/src
Build space: /home/yukti/catkin_ws/build
Devel space: /home/yukti/catkin_ws/devel
Install space: /home/yukti/catkin_ws/install
####
#### Running command: "cmake /home/yukti/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/yukti/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/yukti/catkin_ws/install -G Unix Makefiles" in "/home/yukti/catkin_ws/build"
####
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using CATKIN_DEVEL_PREFIX: /home/yukti/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /home/yukti/catkin_ws/devel;/opt/ros/kinetic
-- This workspace overlays: /home/yukti/catkin_ws/devel;/opt/ros/kinetic
-- Found PythonInterp: /usr/bin/python (found version "2.7.12")
-- 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/yukti/catkin_ws/build/test_results
-- Found gmock sources under '/usr/src/gmock': gmock will be built
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found gtest sources under '/usr/src/gmock': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.14
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~ traversing 12 packages in topological order:
-- ~~ - asctec_mav_framework (metapackage)
-- ~~ - catkin_simple
-- ~~ - ethzasl_msf
-- ~~ - glog_catkin
-- ~~ - msf_timing
-- ~~ - sensor_fusion_comm
-- ~~ - asctec_hl_comm
-- ~~ - asctec_hl_gps
-- ~~ - asctec_hl_interface
-- ~~ - msf_core
-- ~~ - msf_distort
-- ~~ - msf_updates
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin metapackage: 'asctec_mav_framework'
-- ==> add_subdirectory(asctec_mav_framework-master/asctec_mav_framework)
-- +++ processing catkin package: 'catkin_simple'
-- ==> add_subdirectory(catkin_simple-master)
-- +++ processing catkin package: 'ethzasl_msf'
-- ==> add_subdirectory(ethzasl_msf/ethzasl_msf)
-- +++ processing catkin package: 'glog_catkin'
-- ==> add_subdirectory(glog_catkin-master)
-- +++ processing catkin package: 'msf_timing'
-- ==> add_subdirectory(ethzasl_msf/msf_timing)
CMake Error at /opt/ros/kinetic/share/catkin/cmake/test/gtest.cmake:169 (add_executable):
add_executable cannot create target "msf_timing_tests" because another
target with the same name already exists. The existing target is an
executable created in source directory
"/home/yukti/catkin_ws/src/ethzasl_msf/msf_timing". See documentation for
policy CMP0002 for more details.
Call Stack (most recent call first):
/opt/ros/kinetic/share/catkin/cmake/test/gtest.cmake:79 (_catkin_add_executable_with_google_test)
/opt/ros/kinetic/share/catkin/cmake/test/gtest.cmake:28 (_catkin_add_google_test)
ethzasl_msf/msf_timing/CMakeLists.txt:46 (catkin_add_gtest)
-- +++ processing catkin package: 'sensor_fusion_comm'
-- ==> add_subdirectory(ethzasl_msf/sensor_fusion_comm)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- sensor_fusion_comm: 5 messages, 2 services
-- +++ processing catkin package: 'asctec_hl_comm'
-- ==> add_subdirectory(asctec_mav_framework-master/asctec_hl_comm)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- Generating .msg files for action asctec_hl_comm/Waypoint /home/yukti/catkin_ws/src/asctec_mav_framework-master/asctec_hl_comm/action/Waypoint.action
Generating for action Waypoint
-- asctec_hl_comm: 18 messages, 3 services
-- +++ processing catkin package: 'asctec_hl_gps'
-- ==> add_subdirectory(asctec_mav_framework-master/asctec_hl_gps)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'eigen3'
-- Found eigen3, version 3.2.92
CMake Warning at /opt/ros/kinetic/share/cmake_modules/cmake/Modules/FindEigen.cmake:62 (message):
The FindEigen.cmake Module in the cmake_modules package is deprecated.
Please use the FindEigen3.cmake Module provided with Eigen. Change
instances of find_package(Eigen) to find_package(Eigen3). Check the
FindEigen3.cmake Module for the resulting CMake variable names.
Call Stack (most recent call first):
asctec_mav_framework-master/asctec_hl_gps/CMakeLists.txt:7 (find_package)
-- Found Eigen: /usr/include/eigen3
-- Eigen found (include: /usr/include/eigen3)
CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:166 (message):
catkin_package() DEPENDS on 'eigen' but neither 'eigen_INCLUDE_DIRS' nor
'eigen_LIBRARIES' is defined.
Call Stack (most recent call first):
/opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:102 (_catkin_package)
asctec_mav_framework-master/asctec_hl_gps/CMakeLists.txt:21 (catkin_package)
-- +++ processing catkin package: 'asctec_hl_interface'
-- ==> add_subdirectory(asctec_mav_framework-master/asctec_hl_interface)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- signals
-- system
-- thread
-- chrono
-- date_time
-- atomic
-- +++ processing catkin package: 'msf_core'
-- ==> add_subdirectory(ethzasl_msf/msf_core)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
CMake Warning at /opt/ros/kinetic/share/cmake_modules/cmake/Modules/FindEigen.cmake:62 (message):
The FindEigen.cmake Module in the cmake_modules package is deprecated.
Please use the FindEigen3.cmake Module provided with Eigen. Change
instances of find_package(Eigen) to find_package(Eigen3). Check the
FindEigen3.cmake Module for the resulting CMake variable names.
Call Stack (most recent call first):
ethzasl_msf/msf_core/CMakeLists.txt:18 (find_package)
-- Eigen found (include: /usr/include/eigen3)
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:166 (message):
catkin_package() DEPENDS on 'eigen' but neither 'eigen_INCLUDE_DIRS' nor
'eigen_LIBRARIES' is defined.
Call Stack (most recent call first):
/opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:102 (_catkin_package)
ethzasl_msf/msf_core/CMakeLists.txt:44 (catkin_package)
CMake Error at /opt/ros/kinetic/share/catkin/cmake/test/gtest.cmake:169 (add_executable):
add_executable cannot create target "test_similaritytransform" because
another target with the same name already exists. The existing target is
an executable created in source directory
"/home/yukti/catkin_ws/src/ethzasl_msf/msf_core". See documentation for
policy CMP0002 for more details.
Call Stack (most recent call first):
/opt/ros/kinetic/share/catkin/cmake/test/gtest.cmake:79 (_catkin_add_executable_with_google_test)
/opt/ros/kinetic/share/catkin/cmake/test/gtest.cmake:28 (_catkin_add_google_test)
ethzasl_msf/msf_core/CMakeLists.txt:78 (catkin_add_gtest)
CMake Error at /opt/ros/kinetic/share/catkin/cmake/test/gtest.cmake:169 (add_executable):
add_executable cannot create target "test_static_statelist" because another
target with the same name already exists. The existing target is an
executable created in source directory
"/home/yukti/catkin_ws/src/ethzasl_msf/msf_core". See documentation for
policy CMP0002 for more details.
Call Stack (most recent call first):
/opt/ros/kinetic/share/catkin/cmake/test/gtest.cmake:79 (_catkin_add_executable_with_google_test)
/opt/ros/kinetic/share/catkin/cmake/test/gtest.cmake:28 (_catkin_add_google_test)
ethzasl_msf/msf_core/CMakeLists.txt:80 (catkin_add_gtest)
-- +++ processing catkin package: 'msf_distort'
-- ==> add_subdirectory(ethzasl_msf/msf_distort)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- +++ processing catkin package: 'msf_updates'
-- ==> add_subdirectory(ethzasl_msf/msf_updates)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- Configuring incomplete, errors occurred!
See also "/home/yukti/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/yukti/catkin_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed
答案 0 :(得分:0)
不幸的是,您没有正确的CMake文件,存储库的管理员似乎对维护它并不感兴趣。
但是,此拉取请求包含启动pose_sensor
所需的CMakeLists
https://github.com/ethz-asl/ethzasl_msf/pull/141/files
具体来说,这是您需要的差异
https://github.com/ethz-asl/ethzasl_msf/pull/141/files#diff-a855f8508d144ac9c52a05344bfeba5cR7
install(TARGETS
pose_sensor
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)
中