melodic hector_mapping cmake 出现问题


#1

CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by “hector_mapping”
with any of the following names:

hector_mappingConfig.cmake
hector_mapping-config.cmake

Add the installation prefix of “hector_mapping” to CMAKE_PREFIX_PATH or set
“hector_mapping_DIR” to a directory containing one of the above files. If
“hector_mapping” provides a separate development package or SDK, be sure it
has been installed.
Call Stack (most recent call first):
ROS-Academy-for-Beginners/slam_sim_demo/CMakeLists.txt:3 (find_package)

– Configuring incomplete, errors occurred!
See also “/home/mt/tutorial_ws/build/CMakeFiles/CMakeOutput.log”.
See also “/home/mt/tutorial_ws/build/CMakeFiles/CMakeError.log”.
Invoking “cmake” failed

刚开始是没有没有gmapping和hector_mapping这两个依赖,安装之后cmake编译的时候,找不到hector_mapping的配置文件


#2

hector本身也需要安装。执行

apt-cache search hector

找到相应的包,把需要安装的安装一下。


#3

一般这种错误Google就能解决了,安装对应文件即可


#4

就是没有解决方案。才发问的


#5

rosdep install --from-path . --ignore-src --rosdistro melodic
已经自动安装文件夹内的所有依赖了


#6

rosdep install --from-path . --ignore-src --rosdistro melodic
之前已经自动安装文件夹内的所有依赖了,安装之后catkin_make还是一样结果


#7

somebody can help me?


#8

apt-cache search hector

运行下,贴上来看看返回的结果?


#9

ros-melodic-hector-components-description - hector_components_description contains URDF xacro macros for robot components, so they are easily attachable to robot models.
ros-melodic-hector-gazebo - hector_gazebo provides packages related to to simulation of robots using gazebo (gazebo plugins, world files etc.)
ros-melodic-hector-gazebo-plugins - hector_gazebo_plugins provides gazebo plugins from Team Hector.
ros-melodic-hector-gazebo-plugins-dbgsym - debug symbols for ros-melodic-hector-gazebo-plugins
ros-melodic-hector-gazebo-thermal-camera - hector_gazebo_thermal_camera provides a gazebo plugin that produces simulated thermal camera images.
ros-melodic-hector-gazebo-thermal-camera-dbgsym - debug symbols for ros-melodic-hector-gazebo-thermal-camera
ros-melodic-hector-gazebo-worlds - hector_gazebo_worlds provides gazebo scenarios used by Team Hector Darmstadt
ros-melodic-hector-models - hector_models contains (urdf) models of robots, sensors etc.
ros-melodic-hector-sensors-description - hector_sensors_description contains URDF xacro macros for sensors, so they are easily attachable to robot models and usable in gazebo.
ros-melodic-hector-sensors-gazebo - hector_sensors_gazebo depends on the necessary plugins for using the sensors from the hector_models repository.
ros-melodic-hector-xacro-tools - hector_xacro_tools


#10

可以参考下我的机器上的内容,有两点需要注意:

【1】我的是 ubuntu 16.04 所以是 kinetic 版本。如果你的机器不是 16.04 需要换成对应的版本的名字。
【2】看最后一行是我的机器上找到的文件的名字,以及对应的包的名字,可以尝试安装一下。
【3】如果是用源代码安装,并且是放在了ws目录下,那么有没有 source your-ws/??/setup.bash


#11

你好,谢谢。可能是因为版本不同的原因,melodic官方支持的依赖包里面缺失了hector_mapping这个依赖包,melodic还不太完善,暂时无法解决,除非自己编译这个package


#12

melodic 如果没有支持的话,可以考虑从 GitHub 的 repo 上直接 clone 到 ws 然后构建一下试试。

构建之后记得 source ./devel/setup.bash