X86结构移植

系统环境

OS:Ubuntu20.04

ROS:noetic apt安装

PCL部分

因为gpd用到了pcl_gpu,因此需要针对pcl进行源码定制编译,这里记录遇到的问题和解决方案。使用cmake-gui配置pcl的cmakelists,如图,打开WITH部分,选中WITH GPU和WITH CUDA。

编译是遇到了问题,说compute_30不支持了,这个时候如下图,在CUDA里面把CUDA_ARCH_BIN中的不支持的版本去掉即可。

由于我电脑安装了cuda11、cuda11.4、gcc8、gcc9等多个版本,编译提示

1、/usr/include/crt/host_config.h:138:2: error: #error -- unsupported GNU version! gcc versions later than 8 are not supported!

138 | #error -- unsupported GNU version! gcc versions later than 8 are not supported!

这个问题是由于nvcc版本不对导致的,手动选择指定版本目录的nvcc即可,如下图

2、gcc未找到c11plusplus类似的错误,是因为gcc和g++版本不对应导致的,参考下图配置

GPD部分

正确编译pcl后未遇到问题,一次性编译通过。

Dex-Net部分

1、github下载慢或者404问题,尝试gitee 导入项目,替换github的地址clone,即可。

2、python setup.py develop异常,没有继续 调试,后续有时间再搞;使用ros方式编译,sudo sh install.sh(sh文件中已经替换github到gitee)

3、dexnet中引用的包,autolab_core等python版本为2,请切换至3(我的电脑为ubuntu20.04)

否则会报错,下图为其中之一

4、配置realsense2的perception的launch,启动后报错如下图,解决办法,

5、所有项目在python3下支持不友好,print格式不对、import路径不对,需要一一修改

6、meshpy编译错误,

/home/song/turtlebot_ros/grasp_ws/src/dex_net/meshpy/meshpy/meshrender.cpp:3:10: fatal error: boost/python/numeric.hpp: 没有那个文件或目录

3 | #include "boost/python/numeric.hpp"

没解决,最后通过pip install meshpy解决。

8 | #include "GL/osmesa.h"

安装:sudo apt-get install libosmesa6-dev

moveit deep grasp部分

moveit deep grasp处在测试阶段,并没有完善的代码,遇到的坑比较多,后面调试过程中在下面一一列出解决办法。

前言:

moveit deep grasp 依赖图,moveit task contructor是框架,融合了moveit和gpd等算法,实现抓取。

问题:

编译moveit task constructor问题

1、undefined reference to `GOMP_loop_nonmonotonic_dynamic_start@GOMP_4.5'

原因:缺少gomp.so链接导致的

解决方案:

set(EXT_LIBS libgomp.so)

target_link_libraries(point_cloud_server
${catkin_LIBRARIES}
${PROJECT_NAME}
${PCL_LIBRARIES}
${EXT_LIBS}
)

2、/usr/bin/ld: /opt/ros/noetic/lib/libresource_retriever.so: undefined reference to `curl_global_init@CURL_OPENSSL_4'
/usr/bin/ld: /opt/ros/noetic/lib/libresource_retriever.so: undefined reference to `curl_easy_perform@CURL_OPENSSL_4'
/usr/bin/ld: /opt/ros/noetic/lib/libresource_retriever.so: undefined reference to `curl_easy_setopt@CURL_OPENSSL_4'
/usr/bin/ld: /opt/ros/noetic/lib/libresource_retriever.so: undefined reference to `curl_easy_init@CURL_OPENSSL_4'
/usr/bin/ld: /opt/ros/noetic/lib/libresource_retriever.so: undefined reference to `curl_easy_cleanup@CURL_OPENSSL_4'
/usr/bin/ld: /opt/ros/noetic/lib/libresource_retriever.so: undefined reference to `curl_global_cleanup@CURL_OPENSSL_4'

第一眼看到原因应该和上个问题一样,重新编译curl并且支持OpenSSL4,猜测是这个原因。

git clone songyb/curl

编译后并没有解决,最终发现因为anaconda导致环境变换引起的,卸载后上述两个现象都解决了。

3、发现一个moveit源码BUG,

/**
* \def MOVEIT_STRUCT_FORWARD
* Like MOVEIT_CLASS_FORWARD, but forward declares the type as a struct
* instead of a class.
*/
#define MOVEIT_STRUCT_FORWARD(C) \
struct C; \
MOVEIT_DECLARE_PTR(C, C) 缺少一个";" noetic版本和master分支缺少,老版本(melodic,kinetic)等有。

编译通过。

MoveIT和gpd联合规划仿真遇到的问题

1、内存溢出, ,gdb调试后发现moveit官方代码中chomp planner 报错,因此尝试更换planner到ompl规划算法;deep grasp

2、更换ompl后,第一个问题没复现,出现新的问题,

terminate called after throwing an instance of 'std::runtime_error'

what():  Property 'group': undefined

stage 'close hand': declared, but undefined

问题出现在源码BUG,https://github.com/ros-planning/moveit_task_constructor/issues/204#

替换所有的stage->properties().configureInitFrom(Stage::PARENT, { "group" });
到stage→setGroup(arm_group_name_);

可以解决。

Arm架构移植

背景

由于x86代码在台式机器上,远程点云等数据传输延时,不方便调试,因此,尝试把gpd代码移植到agx上去。

系统环境

OS:Ubuntu 18.04

ROS: melodic apt安装

PCL部分

和x86架构类似,没遇到问题,就是编译时间比较长,

OpenVino

参考安装手册

Install Intel® Distribution of OpenVINO™ toolkit for Linux* Using APT Repository — OpenVINO™ documentation

问题:xavier的处理器架构不支持,因此放弃。后面尝试采用和部署caffe

Caffe

参考安装

Caffe installation on Xavier - Jetson & Embedded Systems / Jetson AGX Xavier - NVIDIA Developer Forums

问题1: Could NOT find LMDB (missing: LMDB_INCLUDE_DIR LMDB_LIBRARIES)

解决方法:sudo apt-get install liblmdb-dev libleveldb-dev libsnappy-dev libatlas-base-dev doxygen

问题2: Found cuDNN: ver. ??? found (include: /usr/include, library: /usr/lib/aarch64-linux-gnu/libcudnn.so)
CMake Error at cmake/Cuda.cmake:227 (message):
  cuDNN version >3 is required.

说明,已经安装cudnn,但是没找到版本号,手动添加版本号,#define CUDNN_MAJOR 5到文件,/usr/include/cudnn.h

问题3:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CUDA_cublas_device_LIBRARY (ADVANCED)
    linked by target "caffe" in directory /media/sd/soft/caffe/src/caffe

解决办法:

升级Cmake版本可以解决。

CUDA_cublas_device_LIBRARY-NOTFOUND · Issue #22 · weigao95/surfelwarp (github.com)

升级途径:https://cmake.org/files/v3.22/cmake-3.22.1-linux-aarch64.sh

问题4:Caffe installation on Xavier - Jetson & Embedded Systems / Jetson AGX Xavier - NVIDIA Developer Forums

makefile.config 配置,参考上面链接

## Refer to http://caffe.berkeleyvision.org/installation.html
# Contributions simplifying and improving our build system are welcome!# cuDNN acceleration switch (uncomment to build with cuDNN).
USE_CUDNN := 1# CPU-only switch (uncomment to build without GPU support).
# CPU_ONLY := 1# uncomment to disable IO dependencies and corresponding data layers
# USE_OPENCV := 0
# USE_LEVELDB := 0
# USE_LMDB := 0
# This code is taken from https://github.com/sh1r0/caffe-android-lib
# USE_HDF5 := 0# uncomment to allow MDB_NOLOCK when reading LMDB files (only if necessary)
#   You should not set this flag if you will be reading LMDBs with any
#   possibility of simultaneous read and write
# ALLOW_LMDB_NOLOCK := 1# Uncomment if you're using OpenCV 3OPENCV_VERSION := 3# To customize your choice of compiler, uncomment and set the following.
# N.B. the default for Linux is g++ and the default for OSX is clang++
# CUSTOM_CXX := g++# CUDA directory contains bin/ and lib/ directories that we need.
CUDA_DIR := /usr/local/cuda
# On Ubuntu 14.04, if cuda tools are installed via
# "sudo apt-get install nvidia-cuda-toolkit" then use this instead:
# CUDA_DIR := /usr# CUDA architecture setting: going with all of them.
# For CUDA < 6.0, comment the *_50 through *_61 lines for compatibility.
# For CUDA < 8.0, comment the *_60 and *_61 lines for compatibility.
# For CUDA >= 9.0, comment the *_20 and *_21 lines for compatibility.
CUDA_ARCH := -gencode arch=compute_72,code=sm_72 \-gencode arch=compute_72,code=compute_72# BLAS choice:
# atlas for ATLAS (default)
# mkl for MKL
# open for OpenBlas
BLAS := atlas
# Custom (MKL/ATLAS/OpenBLAS) include and lib directories.
# Leave commented to accept the defaults for your choice of BLAS
# (which should work)!
# BLAS_INCLUDE := /path/to/your/blas
# BLAS_LIB := /path/to/your/blas# Homebrew puts openblas in a directory that is not on the standard search path
# BLAS_INCLUDE := $(shell brew --prefix openblas)/include
# BLAS_LIB := $(shell brew --prefix openblas)/lib# This is required only if you will compile the matlab interface.
# MATLAB directory should contain the mex binary in /bin.
# MATLAB_DIR := /usr/local
# MATLAB_DIR := /Applications/MATLAB_R2012b.app# NOTE: this is required only if you will compile the python interface.
# We need to be able to find Python.h and numpy/arrayobject.h.
PYTHON_INCLUDE := /usr/include/python2.7 \/usr/lib/python2.7/dist-packages/numpy/core/include
# Anaconda Python distribution is quite popular. Include path:
# Verify anaconda location, sometimes it's in root.
# ANACONDA_HOME := $(HOME)/anaconda
# PYTHON_INCLUDE := $(ANACONDA_HOME)/include \# $(ANACONDA_HOME)/include/python2.7 \# $(ANACONDA_HOME)/lib/python2.7/site-packages/numpy/core/include# Uncomment to use Python 3 (default is Python 2)
# PYTHON_LIBRARIES := boost_python3 python3.5m
# PYTHON_INCLUDE := /usr/include/python3.5m \
#                 /usr/lib/python3.5/dist-packages/numpy/core/include# We need to be able to find libpythonX.X.so or .dylib.
PYTHON_LIB := /usr/lib
# PYTHON_LIB := $(ANACONDA_HOME)/lib# Homebrew installs numpy in a non standard path (keg only)
# PYTHON_INCLUDE += $(dir $(shell python -c 'import numpy.core; print(numpy.core.__file__)'))/include
# PYTHON_LIB += $(shell brew --prefix numpy)/lib# Uncomment to support layers written in Python (will link against Python libs)
# WITH_PYTHON_LAYER := 1# Whatever else you find you need goes here.
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial/
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib# If Homebrew is installed at a non standard location (for example your home directory) and you use it for general dependencies
# INCLUDE_DIRS += $(shell brew --prefix)/include
# LIBRARY_DIRS += $(shell brew --prefix)/lib# NCCL acceleration switch (uncomment to build with NCCL)
# https://github.com/NVIDIA/nccl (last tested version: v1.2.3-1+cuda8.0)
# USE_NCCL := 1# Uncomment to use `pkg-config` to specify OpenCV library paths.
# (Usually not necessary -- OpenCV libraries are normally installed in one of the above $LIBRARY_DIRS.)
# USE_PKG_CONFIG := 1# N.B. both build and distribute dirs are cleared on `make clean`
BUILD_DIR := build
DISTRIBUTE_DIR := distribute# Uncomment for debugging. Does not work on OSX due to https://github.com/BVLC/caffe/issues/171
# DEBUG := 1# The ID of the GPU that 'make runtest' will use to run unit tests.
TEST_GPUID := 0# enable pretty build (comment to see full commands)
Q ?= @

问题5:error: ‘CV_LOAD_IMAGE_COLOR’ was not declared in this scope    int cv_read_flag = (is_color ? CV_LOA

.原来是说,旧版的声明已经没了,但是我可以在constants_c.h 这个头文件中获得,那么根据他的操作来吧。
同样,在使用了CV_LOAD_IMAGE_COLOR这个定义的c文件下,添加头文件:

#include "opencv2/imgcodecs/legacy/constants_c.h"
————————————————
版权声明:本文为CSDN博主「wx_polish」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:SLAM十四讲,第七章程序ch7报错, error: ‘CV_LOAD_IMAGE_COLOR’ was not declared in this scope_XXX的博客-CSDN博客_cv_load_image_color

GPD部分

问题1:c++: error: unrecognized command line option ‘-msse4.2’

解决办法cmake将

you have to disable -msse option in Cmake configuration. ARM processor of JETSON does not support SSE instructions.

问题2:不支持sse编译

c++ - using cmake to make a library without sse support (windows version) - Stack Overflow

Deep Grasp部署调试相关推荐

  1. Deep Learning部署TVM Golang运行时Runtime

    Deep Learning部署TVM Golang运行时Runtime 介绍 TVM是一个开放式深度学习编译器堆栈,用于编译从不同框架到CPU,GPU或专用加速器的各种深度学习模型.TVM支持来自Te ...

  2. SSMS2008插件开发(3)--部署调试SSMS2008插件

    原文:SSMS2008插件开发(3)--部署调试SSMS2008插件 上一次说到VS2008中的插件开发,最终结果插件是部署在VS2008中,现在我们将插件部署到SSMS2008(Microsoft ...

  3. IDEA远程部署调试Java应用程序

    IDEA远程部署调试Java应用程序 文章目录 IDEA远程部署调试Java应用程序 基本概述 准备工作 远程服务器准备 安装JDK 配置JAVA_HOME 项目准备 创建一个SpringBoot项目 ...

  4. Zookeeper安装部署调试命令

    Zookeeper安装部署调试命令 ZooKeeper 常用四字命令: 下载地址: http://www.apache.org/dyn/closer.cgi/zookeeper/ 我选用清华的镜像 h ...

  5. dnSpy反编译、部署调试神器

    一.概要 在工作当中,当程序部署了之后就算打了日志遇到极个别的特殊异常没有在程序日志中体现出来或者没有详细的报错原因会让开发者非常头疼,不得不盲猜bug到底出在哪里.这里分享一下工作上经常会用到的工具 ...

  6. myeclipse中对jar包中的类热部署调试方法介绍

    在myeclipse代码中调试jar包中的类一般方式是修改了类后把代码替换jar中的class,然后替换系统中的jar文件并重启Web服务器,对jar可以关联源代码,关联后就能够断点跟踪代码. 上面的 ...

  7. disconf在windows环境下部署调试

    disconf介绍 disconf,全称 Distributed Configuration Management Platform(分布式配置管理平台),是java下的一个开源项目,其地址为http ...

  8. Oracle Dataguard HA (主备,灾备)方案部署调试

    包括: centos6.5 oracle11gR2 DataGuard安装 dataGuard 主备switchover角色切换 数据同步测试 <一,>DG数据库数据同步测试 1,正常启动 ...

  9. Iec61850 部署调试笔记一

    1. 联网更新 sudo apt-get update 2. sudo wget https://libiec61850.com/wp-content/uploads/2022/03/libiec61 ...

最新文章

  1. 使用 OPEN SQL 语句读取数据库表数据的一个补充练习
  2. php自动维护,window_Win7系统中的一些自动维护计划、任务关闭、禁用方法图文教程,  windows自动维护功能会在计 - phpStudy...
  3. codis配置_Codis的安装配置
  4. VB6.0操作SQL Server——增删改查
  5. c语言中初始值的作用,初始C语言学习
  6. 2.make file
  7. Oracle迁移PPAS:中文表名的处理
  8. JavaScript之网页对话框
  9. pdf打印机如何加密pdf文件?
  10. 体重 年龄 性别 身高 预测鞋码_根据一个人的身高和体重能知道他的鞋码吗?
  11. 计算机word的关闭怎么办,电脑无法打开Word提示已停止工作并自动退出怎么办
  12. 主成分分析结果成分不显著_数据分析|主成分分析
  13. 从一坨「便便」说起,大V亲测iPhone X为什么这么贵!
  14. 1062 最简分数 python
  15. python联机麻将_python麻将和牌算法
  16. weex 打包成android的apk之后安装提示安装包解析错误
  17. 将云顶之奕或者金铲铲S8导入数据库。
  18. 超声波测距模块HC-SR04详解(基于51单片机)
  19. 算法竞赛入门经典——训练指南
  20. MyEclispe发布web项目-遁地龙卷风

热门文章

  1. unity协程和线程
  2. python引入模块的五种方式与内置模块
  3. 脚本病毒---实验十一:跨站脚本攻击基础
  4. 服务器碰盘故障转储 可用空间为空,【服务器】基本磁盘与动态磁盘的相互转换(精选).doc...
  5. 微信要做操作系统?一文为你把脉小程序未来十年
  6. 球半足球比分,瑞典超:哈马比 VS 哥德堡 7月12日
  7. idea js检查太卡_IntelliJ IDEA代码检查
  8. 【机器学习】新手必看的十种机器学习算法
  9. 启动visualVM的两种方式
  10. java毕业设计消防应急管理系统源码+lw文档+mybatis+系统+mysql数据库+调试