位置: IT常识 - 正文
推荐整理分享工程复现 -- grid map和elevation map(工程复工程序是什么),希望有所帮助,仅作参考,欢迎阅读内容。
文章相关热门搜索词:工程复工具备的条件,工程复盘的正确方法和步骤,复原工程工作步骤,工程复盘的正确方法和步骤,复原工程工作步骤,工程复工具备的条件,工程复工程序是什么,工程复工具备的条件,内容如对您有帮助,希望把文章链接给更多的朋友!
参考: 1. ROS grid map 2. ROS elevation_mapping 3. ROS高程地图–elevation_mapping使用记录(一) 4. ROS高程地图–elevation_mapping使用记录(二)
一.下载和编译安装工程注意: 安装和编译过程中如果出现疑问,请参考第三部分的答疑内容。
1.1 下载两个工程git clone https://github.com/anybotics/grid_mapgit clone https://github.com/ANYbotics/elevation_mapping1.2 安装依赖库grid_map 和libeigensudo apt-get install ros-$ROS_DISTRO-grid-mapsudo apt-get install libeigen3-devkindrkindr_rospoint_cloud_iogit clone https://github.com/ANYbotics/point_cloud_io.gitcd .. && catkin_makesource devel/setup.bash1.3 安装两个工程catkin_make -DCMAKE_BUILD_TYPE=Releasesource devel/setup.bash注意:将两个工程放在一个工作空间下,本空间内还需要其他依赖包,完整目录如下:
cui@cui-pc:~/catkin_map/src $ tree -f -L 1.├── ./CMakeLists.txt -> /opt/ros/melodic/share/catkin/cmake/toplevel.cmake├── ./elevation_mapping├── ./grid_map├── ./kindr_ros├── ./message_logger└── ./point_cloud_io二. 运行demo2.1 grid_map1. 跳动的地毯roslaunch grid_map_demos simple_demo.launchroslaunch grid_map_demos tutorial_demo.launch ## 完整版本2.2 elevation_mapping1. TurtleBot3 Waffle Simulation 仿真机器人## 安装turtlebot3 仿真sudo apt install ros-melodic-turtlebot3*## 启动demoroslaunch elevation_mapping_demos turtlesim3_waffle_demo.launch## 控制仿真机器人export TURTLEBOT3_MODEL=waffleroslaunch turtlebot3_teleop turtlebot3_teleop_key.launch2. Ground Truth Demoroslaunch elevation_mapping_demos simple_demo.launch## 前提需要安装point_cloud_ioroslaunch elevation_mapping_demos ground_truth_demo.launch三. 遇到问题及解决3.1 grid map工程可能遇到的问题Q1: catkin_make,编译过程中,CMake Error at grid_map/grid_map_octomap/CMakeLists.txt:13 (find_package): A1:
sudo apt-get install ros-$ROS_DISTRO-grid-mapQ2: catkin_make编译过程中, CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package) A2:
sudo apt install ros-melodic-costmap-2d -yQ3: catkin_make编译过程中,CMake Error at grid_map/grid_map_filters/CMakeLists.txt:35 (find_package), TBBConfig.cmake A3: 参考: 1. csdn 编译需要TBBConfig.cmake,但TBB 2020及older版本不生成.cmake文件”的问题 2. 源码编译TBB 采用源码编译的方式。
git clone https://github.com/oneapi-src/oneTBB# 查看tag,找到2020.1版本git checkout v2020.1## 在cmake文件夹下生成TBBConfig.cmakecmake -DTBB_ROOT=/home/cui/workspace/tools/oneTBB -DTBB_OS=Linux -P cmake/tbb_config_generator.cmake## 安装TBB需要的库文件cd buildsudo chmod +x *.shsh generate_tbbvars.shsh tbbvars.sh## 编译TBB,拷贝相关包含目录库目标到系统环境中cd oneTBBmakecd build/linux_intel64_gcc_cc7.5.0_libc2.27_kernel5.4.0_release/sudo cp *.so /usr/local/lib #或者/usr/libsudo cp *.so.2 /usr/local/lib #或者/usr/libsudo /sbin/ldconfigcd ../../include/ && sudo cp -rf ./* /usr/local/includecd ../cmake && sudo mkdir /usr/local/lib/cmake/TBBsudo cp TBBConfig.cmake TBBConfigVersion.cmake /usr/local/lib/cmake/TBB/.## 设置TBB_FOUND为TRUEsudo gedit /usr/local/lib/cmake/TBB/TBBConfig.cmake修改#set(TBB_FOUND FALSE) 为 set(TBB_FOUND TRUE)Q4:catkin_make编译过程中,home/cui/catkin_others/src/grid_map/grid_map_cv/include/grid_map_cv/InpaintFilter.hpp:11:10: fatal error: filters/filter_base.hpp: No such file or directory #include <filters/filter_base.hpp> A4: 参考: grid_map(二):ubuntu16.04安装测试grid_map 1.6.0-1.6.2
## grid_map_ws/src/grid_map/grid_map_cv/include/grid_map_cv/InpaintFilter.hpp 的第十行#include <filters/filter_base.hpp> 为 #include <filters/filter_base.h>## 文件夹grid_map_ws/src/grid_map/grid_map_filters/include/grid_map_filters下几乎所有文件全部替换#include <filters/filter_base.hpp> 或 #include <filters/filter_base.h>Q5:home/cui/catkin_others/src/grid_map/grid_map_demos/include/grid_map_demos/FiltersDemo.hpp:17:10: fatal error: filters/filter_chain.hpp: No such file or directory A5:解法同Q4
3.2 elevation_mapping 工程可能遇到问题Q1:catkin_make编译过程中,CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83,kindrConfig.cmake A1:
1)先安装kindr库git clone https://github.com/ANYbotics/kindr.gitcd kindrmkdir build && cd buildcmake .. -DUSE_CMAKE=truesudo make install## 拷贝kindConfig.cmake(可以不加)sudo mkdir /usr/local/lib/cmake/kindrsudo cp kindrConfig.cmake /usr/local/lib/cmake/kindr/2)再安装kindr_ros库## 进入elevation_mapping工作空间git clone https://github.com/ANYbotics/kindr_ros.gitcd ../ && catkin_make3)最后编译elevation_mappingQ2: catkin_make编译过程中,CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 ,message_loggerConfig.cmake A2: 参考:message_logger安装
## 先进入elevation_mapping工作空间git clone https://github.com/ANYbotics/message_logger.gitQ3:error: ‘PCL_MAKE_ALIGNED_OPERATOR_NEW’ does not name a type; did you mean A3:
修改elevation_mapping/elevation_mapping/include/elevation_mapping/PointXYZRGBConfidenceRatio.hpp:32 为 EIGEN_MAKE_ALIGNED_OPERATOR_NEWQ4:home/cui/catkin_others/src/grid_map/grid_map_demos/include/grid_map_demos/FiltersDemo.hpp:17:10: fatal error: filters/filter_chain.hpp: No such file or directory A4:同第一部分Q5
Q5: 运行ground_truth_demo过程中,出现ERROR: cannot launch node of type [point_cloud_io/read]: point_cloud_io A5: 需要安装point_cloud_io package, 详细过程参考第一部分1.2 安装过程。
Q6: 编译point_cloud_io工程过程中,BUG: point_cloud_io/src/Read.cpp:11:10: fatal error: filesystem: No such file or directory A6: 参考: fatal error: filesystem: No such file or directory,fatal error: filesystem: 没有那个文件或目录 undefined reference to `std::experimental::filesystem::v1::__cxx11::path::_M_split_cmpts() 原因在于g++版本问题,g++8以上才支持。
#include <filesystem> 替换为 #include <experimental/filesystem>std::filesystem 替换为 std::experimental::filesystem## cmakelist中添加-lstdc++fstarget_link_libraries(read ${catkin_LIBRARIES} -lstdc++fs)Q7: 试跑 roslaunch elevation_mapping_demos simple_demo.launch看不到任何画面 A7: 问题在于point_cloud_io pkg未能发布点云。重启电脑之后问题解决,猜测可能Rviz卡住或者内存不足。 注意: ground_truth_demo.launch 确实看不到画面,但是地图topic还在不断发送。
上一篇:【uni-app】点击左上角返回按钮,弹出弹窗或者是携带参数返回上一页(uni-app怎么样)
下一篇:三七粉的价格(豹七三七粉的价格)
友情链接: 武汉网站建设