由于项目和科研需要,经常需要在不同的平台上(例如我的台式机和项目pc)部署 GEM(elevation map) + Fast_lio(odomtry) 的环境,因此记录下安装过程和过程中每次都会出现的和解决方案。
系统:
Ubuntu 18.04 CUDA10.2

1. GEM && GEM Dependencies install

GEM是ZJU Robotics Lab开源的建elevation map程序

@ARTICLE{9293017,
author={Y. {Pan} and X. {Xu} and X. {Ding} and S. {Huang} and Y. {Wang} and R. {Xiong}},
journal={IEEE Transactions on Instrumentation and Measurement},
title={GEM: Online Globally Consistent Dense Elevation Mapping for Unstructured Terrain},
year={2021},
volume={70},
number={},
pages={1-13},
doi={10.1109/TIM.2020.3044338}}

0) costmap 、octomap INSTALL

sudo apt install ros-melodic-costmap-2dsudo apt-get install ros-melodic-octomap-msgs
sudo apt-get install ros-melodic-octomap-ros

1)Grid Map INSTALL

Addr: https://github.com/anybotics/grid_map
INSTALL

cd catkin_ws/src
git clone https://github.com/anybotics/grid_map.git
cd ../
catkin_make

可能会遇到问题:

In file included from /home/ysc/hedian_lib/grid_map_ws/src/grid_map-master/grid_map_filters/src/ThresholdFilter.cpp:9:0:
/home/ysc/hedian_lib/grid_map_ws/src/grid_map-master/grid_map_filters/include/grid_map_filters/ThresholdFilter.hpp:14:10: fatal error: filters/filter_base.hpp: 没有那个文件或目录#include <filters/filter_base.hpp>^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
grid_map-master/grid_map_filters/CMakeFiles/grid_map_filters.dir/build.make:62: recipe for target 'grid_map-master/grid_map_filters/CMakeFiles/grid_map_filters.dir/src/ThresholdFilter.cpp.o' failed
make[2]: *** [grid_map-master/grid_map_filters/CMakeFiles/grid_map_filters.dir/src/ThresholdFilter.cpp.o] Error 1
CMakeFiles/Makefile2:4940: recipe for target 'grid_map-master/grid_map_filters/CMakeFiles/grid_map_filters.dir/all' failed
make[1]: *** [grid_map-master/grid_map_filters/CMakeFiles/grid_map_filters.dir/all] Error 2
make[1]: *** 正在等待未完成的任务....

解决:
将grid_map中的所有的filter_base.hpp换成filter_base.h。如图

2)Kindr

Addr : https://github.com/anybotics/kindr

git clone https://github.com/ANYbotics/kindr.git
cd kindr/
mkdir build
cd build
cmake .. -DUSE_CMAKE=true
sudo make install

3) PCL

ROS已装背景下安装PCL和VTK
测试可用PCL版本:PCL-1.8

4) Eigen

由于fast lio需要Eigen 3.3.9,因此可以在已有Eigen的基础上再装一个3.3.9版本,使用时切换版本
Eigen 3.3.9版本下载
查看目前Eigen版本

gedit /usr/include/eigen3/Eigen/src/Core/util/Macros.h

安装Eigen 3.3.9

#git clone https://github.com/libeigen/eigen.git
wget https://gitlab.com/libeigen/eigen/-/archive/3.3.9/eigen-3.3.9.zip
unzip eigen-3.3.9.zip

Eigen3多版本切换

4) CUDA

测试过的GEM可用的CUDA版本

CUDA Version 11.0.207
CUDA Version 10.2.89

首先检查cuda版本

 cat /usr/local/cuda/version.txtCUDA Version 10.2.89

查看CUDA计算能力(GEM中CUDA配置需要)

cd /usr/local/cuda-11.0/samples/1_Utilities/deviceQuery
2 sudo make
3 sudo ./deviceQuery

查询结果:

因此,本机CUDA计算能力
arch=compute_86,code=sm_86

5) GEM

cd catkin_workspace/src
git clone https://github.com/ZJU-Robotics-Lab/GEM.git
git clone https://github.com/ZJU-Robotics-Lab/slam_msg.git
git clone https://github.com/ANYbotics/kindr_ros.git
cd ../
catkin_make

问题1:

[  1%] Built target actionlib_generate_messages_eus
In file included from /usr/include/eigen3/Eigen/Core:42:0,from /home/ysc/gem_test_0422/src/elevation_mapping_periodical/elevation_mapping/cuda/gpu_process.cu:15:
/usr/local/cuda-10.2/include/math_functions.hpp:54:2: warning: #warning "crt/math_functions.hpp is an internal header file and must not be used directly.  Please use cuda_runtime_api.h or cuda_runtime.h instead." [-Wcpp]#warning "crt/math_functions.hpp is an internal header file and must not be used directly.  Please use cuda_runtime_api.h or cuda_runtime.h instead."^~~~~~~
In file included from /usr/local/cuda-10.2/include/cuda_runtime.h:115:0,from <command-line>:0:
/usr/local/cuda-10.2/include/crt/common_functions.h:74:24: error: token ""__CUDACC_VER__ is no longer supported.  Use __CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, and __CUDACC_VER_BUILD__ instead."" is not valid in preprocessor expressions#define __CUDACC_VER__ "__CUDACC_VER__ is no longer supported.  Use __CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, and __CUDACC_VER_BUILD__ instead."^
/usr/local/cuda-10.2/include/crt/common_functions.h:74:24: note: in definition of macro ‘__CUDACC_VER__’#define __CUDACC_VER__ "__CUDACC_VER__ is no longer supported.  Use __CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, and __CUDACC_VER_BUILD__ instead."^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/cuda-10.2/include/crt/common_functions.h:74:24: error: token ""__CUDACC_VER__ is no longer supported.  Use __CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, and __CUDACC_VER_BUILD__ instead."" is not valid in preprocessor expressions#define __CUDACC_VER__ "__CUDACC_VER__ is no longer supported.  Use __CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, and __CUDACC_VER_BUILD__ instead."^
/usr/local/cuda-10.2/include/crt/common_functions.h:74:24: note: in definition of macro ‘__CUDACC_VER__’#define __CUDACC_VER__ "__CUDACC_VER__ is no longer supported.  Use __CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, and __CUDACC_VER_BUILD__ instead."^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[  1%] Built target tf_generate_messages_lisp
/

问题1解决:

 cd /usr/local/cuda-10.2/include/crt/common_functions.h comment out line 74#define __CUDACC_VER__ "__CUDACC_VER__ is no longer supported.  Use __CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, and __CUDACC_VER_BUILD__ instead.

问题2

问题2解决

这是CUDA Cmakelist中NVCC编译设置没设置对
CUDA用的是NVCC编译器,编译过程中不会在catkin_make窗口报错,但是会在GEM运行CUDA过程中报错

应该根据CUDA deviceQuery 查询得到的结果修改arch=compute_80,code=sm_80

src/elevation_mapping_periodical/elevation_mapping/cuda/CMakeLists.txt
project(gpu) # required cmake version
cmake_minimum_required(VERSION 2.8) # packages
find_package(CUDA REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(kindr)# set(CUDA_NVCC_FLAGS -O3;-G;-g)
SET(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-O3;-std=c++14 -gencode arch=compute_80,code=sm_80)
# SET(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-O3;-std=c++14 -gencode arch=compute_75,code=sm_75)
#include_directories(${EIGEN3_INCLUDE_DIRS})
file(GLOB_RECURSE CURRENT_HEADERS *.h *.hpp *.cuh)
file(GLOB CURRENT_SOURCES *.cpp *.cu)
source_group("Include" FILES ${CURRENT_HEADERS})
source_group("Source" FILES ${CURRENT_SOURCES})
cuda_add_library(gpu SHARED ${CURRENT_HEADERS} ${CURRENT_SOURCES})

问题3

这个是在一台性能较差的NX上跑的GEM,一跑起来就挂掉了,因为处理器性能太差了,处理不过来这么多点

问题4解决

把src/elevation_mapping_periodical/elevation_mapping/src/ElevationMapping.cpp中对image的处理部分注释掉(image对点云着色),会省掉很多算力
如图
注释掉就能跑起来了

问题5

code ~/src/elevation_mapping_periodical/elevation_mapping_demos/config/robots/fxz_robot.yaml
camera_params_yaml: "/home/nickle/yq_intrinsic.yaml" 要改路径,这里源码里设置的是绝对路径

2. FAST-Lio && FAST-Lio Dependencies install

1) Livox-SDK

Livox-SDK安装说明

git clone https://github.com/Livox-SDK/Livox-SDK.git
cd Livox-SDK
cd build && cmake ..
make
sudo make install

2)livox_ros_driver

https://github.com/Livox-SDK/livox_ros_driver

git clone https://github.com/Livox-SDK/livox_ros_driver.git ws_livox/src
cd ws_livox
catkin_make

3)FAST -LIO

cd ~/$A_ROS_DIR$/src
git clone https://github.com/hku-mars/FAST_LIO.git
cd FAST_LIO
git submodule update --init
cd ../..
catkin_make
source devel/setup.bash

问题1

In file included from /home/ysc/GEM_ws/src/fast-lio/FAST_LIO_ws/src/FAST_LIO/src/IMU_Processing.hpp:11:0,from /home/ysc/GEM_ws/src/fast-lio/FAST_LIO_ws/src/FAST_LIO/src/laserMapping.cpp:46:
/home/ysc/GEM_ws/src/fast-lio/FAST_LIO_ws/src/FAST_LIO/include/common_lib.h:8:10: fatal error: fast_lio/Pose6D.h: 没有那个文件或目录#include <fast_lio/Pose6D.h>^~~~~~~~~~~~~~~~~~~
compilation terminated.
fast-lio/FAST_LIO_ws/src/FAST_LIO/CMakeFiles/fastlio_mapping.dir/build.make:62: recipe for target 'fast-lio/FAST_LIO_ws/src/FAST_LIO/CMakeFiles/fastlio_mapping.dir/src/laserMapping.cpp.o' failed
make[2]: *** [fast-lio/FAST_LIO_ws/src/FAST_LIO/CMakeFiles/fastlio_mapping.dir/src/laserMapping.cpp.o] Error 1
make[2]: *** 正在等待未完成的任务....
In file included from /home/ysc/GEM_ws/src/fast-lio/FAST_LIO_ws/src/FAST_LIO/src/preprocess.cpp:1:0:
/home/ysc/GEM_ws/src/fast-lio/FAST_LIO_ws/src/FAST_LIO/src/preprocess.h:4:10: fatal error: livox_ros_driver/CustomMsg.h: 没有那个文件或目录#include <livox_ros_driver/CustomMsg.h>^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
fast-lio/FAST_LIO_ws/src/FAST_LIO/CMakeFiles/fastlio_mapping.dir/build.make:110: recipe for target 'fast-lio/FAST_LIO_ws/src/FAST_LIO/CMakeFiles/fastlio_mapping.dir/src/preprocess.cpp.o' failed
make[2]: *** [fast-lio/FAST_LIO_ws/src/FAST_LIO/CMakeFiles/fastlio_mapping.dir/src/preprocess.cpp.o] Error 1
CMakeFiles/Makefile2:6324: recipe for target 'fast-lio/FAST_LIO_ws/src/FAST_LIO/CMakeFiles/fastlio_mapping.dir/all' failed
make[1]: *** [fast-lio/FAST_LIO_ws/src/FAST_LIO/CMakeFiles/fastlio_mapping.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j6 -l6" failed

解决:
手动将livox_ros_driver生成的msg复制到ws/devel/include下

问题2

FASTlio适配的eigen是3.3.9
如果不是的话会产生大量的Eigen有关的报错,这时候可以按照上面的说明切换或者安装Eigen3-3-9

四足机器人 | GEM(elevation map) + Fast_Lio(odometry) 环境部署记录相关推荐

  1. 腾讯、华为、德鲁动力,为何众多科技厂商入局四足机器人?

    最近经常逛科技展会或者参加科技活动的朋友可能会发现,四足机器人的出现频率越来越高了.无论是11月26日世界5G大会上亮相的宇树科技的机器狗,11月23日浙江乌镇世界互联网大会"互联网之光&q ...

  2. 史上最全 2019 ICRA顶会四足机器人文献整理

    史上最全 2019 ICRA顶会四足机器人文献整理 一.ICRA论文集中相关文献对应subsession时间 二.文献整理内容 一.ICRA论文集中相关文献对应subsession时间 15:15-1 ...

  3. AI一分钟 | 浙大研发出“踢不倒”的四足机器人;富士康冲击A股上市,AI为最大卖点

    一分钟AI 滴滴公布新战略,成立战略事业群和智慧交通事业部 浙江大学熊蓉教授的机器人团队发布"绝影"四足机器人,展现"快稳准"优异性能 苹果智能音箱HomePo ...

  4. 赤兔四足机器人的作用_跑得快,打不死!清华大学开发“小强”机器人,壮汉狂踩也挡不住前进步伐...

    大数据文摘编辑部出品 提到蟑螂,很多同学都深恶痛绝. 这种身型小巧的虫子不仅跑得快.繁殖能力强,而且超级抗打抗压,在所有的环境下都能顽强地生存下去. 12mm高的蟑螂可以躲进4mm的缝隙 也难怪周星驰 ...

  5. UC伯克利给四足机器人加Buff:瞬间适应各种真实地形,抹了油的地面也能hold住...

    丰色 发自 凹非寺 量子位 报道 | 公众号 QbitAI 随着四足机器人的应用越来越成功,它们面对的场景也会越来越多: 今天爬楼梯,明天过草地,后天又去坑坑洼洼的石子地-- 这么复杂多变的地形它们可 ...

  6. 5位华人学生开发出了机器导盲犬!四足机器人技能又+1

    丰色 发自 凹非寺 量子位 报道 | 公众号 QbitAI 今天是四月的最后一个星期三,也是世界导盲犬日. 而在不久前,来自加州大学伯克利分校的研究团队,开发了一款机器人,可以用来壮大导盲犬的队伍了! ...

  7. 赤兔四足机器人的作用_腾讯 Robotics X 实验室四足移动机器人Jamoca首亮相,可挑战高难度梅花桩...

    11月20日,腾讯公布了其在移动机器人研究方面的新进展:四足移动机器人 Jamoca 和自平衡轮式移动机器人首次对外亮相. Jamoca 是国内首个能完成走梅花桩复杂挑战的四足机器人,而自平衡轮式移动 ...

  8. 会自学的四足机器人,3.5个小时学会走路!

    近日,Google的最新研究可能会使这种学习过程变得更加简单. 谷歌,加州大学伯克利分校和佐治亚理工学院的研究人员联合发表了一篇论文,构建了一个通过AI自学走路的四足机器人,并将它取名为"R ...

  9. gazebo 直接获取传感器数据_【ROS-Gazebo】IMU插件使用与数据采集——以四足机器人pigot为例...

    最近在琢磨别的事情,Gazebo探索上面进展不大,但也有一些收获,秉承慢慢写的佛系态度记录一下:pigot四足项目的步态改进,前行换成了摆线步态,加入了斜向步态 Gazebo-IMU(惯性测量单元)插 ...

最新文章

  1. 深度学习模型轻量化(下)
  2. 1.3 图像边缘检测edge函数的用法
  3. const形参与非const形参
  4. C - 3 求正弦值
  5. 16行代码AC_蓝桥杯 2017年C组第三题 算式900(暴力解法+DFS解法)
  6. eclipse 查找
  7. Java基础之理解Annotation
  8. 关于VGG模型文件的存放位置
  9. gridview checkbox从服务器端和客户端两个方面实现全选和反选
  10. FastStone Capture滚动截屏丢失行解决办法
  11. python 书签内容整理
  12. android4.4.3版本root,ROOT大师:支持安卓4.3、4.4机型root
  13. 【Win7开启DMA】
  14. Python教程——def()函数
  15. 18数藏,太一捡漏,抢购,
  16. 【优化算法】改进的侏儒猫鼬优化算法(IDMO)【含Matlab源码 2314期】
  17. android api 设置,Android API中文文档EditText
  18. 基于SpringBoot的校园志愿者管理系统
  19. TreeView 四技
  20. 高速公路数字孪生3D场景制作全流程记录【Blender + UE4】

热门文章

  1. 重庆理工大学计算机学院学概率论,重庆理工大学概率论与数理统计参考附标准答案(a)...
  2. arm-gfortran-4.8安装
  3. 科技向“实”万物生长,2023年云计算五大技术趋势展望
  4. jmeter分布式报错,Error in rconfigure() method java.rmi.ConnectException: Connection refused to ho st
  5. JAVA 图片地址路径转换 Base64 工具类
  6. python入门到放弃恶搞图-《Python3从入门到放弃》视频教程
  7. 短视频、直播和视频社交
  8. PowerBulider create database
  9. Linux sys文件系统
  10. 严重 [RMI TCP Connection(3)-127.0.0.1]