热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Lidar论文学习

文章复现-speedandaccuracytradeoffforLiDARData…作者初出茅庐-文章复现文章复现大致包括:环境配置数据复现个人数据库尝试环境配置

文章复现-speed and accuracy tradeoff for LiDAR Data…@作者

初出茅庐-文章复现
文章复现大致包括:环境配置+数据复现+个人数据库尝试

环境配置
vpn: https://www.maomi.in/user/tutorial?os=linux&client=clash##

https://github.com/wangguojun2018/LidarRoadBoundaryDetection

Install proto3
Please check README.md for proto3 installation instructions.
软件包:
安装后:更新protobu文件
protoc -I=S R C D I R − − c p p o u t = SRC_DIR --cpp_out=SRC
D

IR−−cpp
o

ut=DST_DIR $SRC_DIR/addressbook.proto
例如:当前目录里的proto
protoc -I=./ --cpp_out=./ xxx.proto

Install glog
原文的打不开,现在用的pip install glog

Install OpenCV 3.4.5++ and PCL 1.7++

opencv 安装-参考链接:
https://www.cnblogs.com/phyger/p/14069437.html

原文俩出小修改:
修改1:opencv_contrib 无法下载,可从下链接下载:
https://github.com/opencv/opencv_contrib/tree/3.4.5

修改2:
opencv安装opencv_contrib出现无法打开包括文件: “opencv2/xfeatures2d/cuda.hpp”的解决方法:
这里比较简单的就是直接改掉头文件

解决办法&#xff1a; 在CMakeLists.txt增加以下内容&#xff1a; &#xff08;这里原文有点问题&#xff0c;大家注意修改一个是路径&#xff0c;还有一个是版本是自己安装的opencv版本&#xff09;INCLUDE_DIRECTORIES("<你的路径>/opencv-3.4.5/opencv_contrib-3.4.5/modules/xfeatures2d/include")
CMakeLists.txt文件所在路径为&#xff1a; <你的路径>/opencv-3.4.5/modules/stitching/ CMakeLists.txt

验证是否安装成功&#xff1a;
首先ubuntu打开相机&#xff1a;
直接在活动中找到茄子&#xff08;cheese&#xff09;&#xff0c;如果没有请安装&#xff1a;sudo apt-get install cheese

opencv demo验证&#xff1a;
cd <你的路径>/opencv-3.4.5/samples/cpp/example_cmake
cmake.
make
./opencv_example
如果能打开相机说明成功&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;

PCL安装 - 参考链接&#xff1a;
https://blog.csdn.net/HHT0506/article/details/104439748
我在20.04.3实验成功

limbo build&#xff1a;
clone limbo
cd LidarRoadBoundaryDetection
git clone https://github.com/resibots/limbo

Build limbo
Then please check official documentation to build and intall limbo&#xff1a;https://github.com/resibots/libcmaes
有时候网络问题&#xff1a;GitHub的文件无法clone&#xff0c;需要翻墙。

目前这里有些问题&#xff0c;好像没有编成&#xff0c;导致demo frame无法运行。

编译问题&#xff1a;
1 error&#xff1a;#error PCL requires C&#43;&#43;14 or above
解决&#xff1a;在CMakeList中新增一句&#xff1a;
set(CMAKE_CXX_STANDARD 14)
2 boost ‘boost::mutex’ has not been declared:
解决&#xff1a; 安装boost
https://blog.csdn.net/hailangdeyingzi/article/details/73527877
上面不行&#xff0c;试试&#xff1a;
www.cnblogs.com/oracleloyal/p/6060779.html

boost 测试代码&#xff1a;
https://blog.csdn.net/Jailman/article/details/86150810?utm_medium&#61;distribute.pc_relevant.none-task-blog-2defaultbaidujs_title~default-1.essearch_pc_relevant&spm&#61;1001.2101.3001.4242.2

main_thread.cpp修改&#xff1a;
添加头文件&#xff1a;
#include
#include

bug补充&#xff1a;
intel TBB Installation
https://blog.csdn.net/weixin_35782556/article/details/113584141?utm_medium&#61;distribute.pc_relevant.none-task-blog-2defaultbaidujs_title~default-5.no_search_link&spm&#61;1001.2101.3001.4242.4
copy reference below:
https://blog.csdn.net/tfb760/article/details/106096245
下载&#xff1a;
first:选择合适的版本分支
最后&#xff1a;
注意添加路径需要修改自己的路径

test
cd examples
make

NLopt Installation
https://blog.csdn.net/eaglecoder/article/details/104335822?utm_medium&#61;distribute.pc_aggpage_search_result.none-task-blog-2aggregatepagefirst_rank_ecpm_v1~rank_v31_ecpm-1-104335822.pc_agg_new_rank&utm_term&#61;nlopt%E5%AE%89%E8%A3%85&#43;ubuntu&spm&#61;1000.2123.3001.4430

交叉编译工具安装&#xff1a;
gcc: https://blog.csdn.net/weixin_33672400/article/details/93757824
sudo apt-get install gcc-arm-linux-gnueabi
g&#43;&#43;:
sudo apt-get install g&#43;±arm-linux-gnueabi

locate: https://blog.csdn.net/chenshe1571/article/details/100714197
locate如果没有反应&#xff1a;可以试试关闭终端再打开&#43; sudo updatedb

limbo build:

error:
/usr/bin/ld: 当搜索用于 /usr/local/lib/libnlopt.a 时跳过不兼容的 -lnlopt

尝是不是NLopt安装不成功。

更新nlopt安装方式&#xff1a;
http://www.resibots.eu/limbo/tutorials/compilation.html
./configure --with-cxx --enable-shared --without-python --without-matlab --without-octave
make
sudo make install

limbo build成功

出现return errr

usr/bin/ld: lib/libextract.a(road_boundary.pb.cc.o)&#x1f626;.data.rel.ro&#43;0x50): more undefined references to &#96;google::protobuf::Message::CopyWithSizeCheck(google::protobuf::Message*, google::protobuf::Message const&)’ follow
collect2: error: ld returned 1 exit status
以下操作仍然不能解决&#xff0c;但proto安装成功
proto anzhuang gengxin:
https://github.com/protocolbuffers/protobuf/blob/master/src/README.md
https://blog.csdn.net/kdchxue/article/details/81046192

上个 error solved!

/home/gj/lidar/LidarRoadBoundaryDetection/limbo/src/limbo/serialize/text_archive.hpp:72:35: error: variable ‘std::ofstream ofs’ has initializer but incomplete type
72 | std::ofstream ofs(fname(object_name).c_str());

头文件添加&#xff1a;
#include

最新 error&#xff1a;
应该是protobuf问题
在这里插入图片描述
CMakeLists做了如下修改&#xff1a;

cmake_minimum_required(VERSION 2.8)

project(boundary_detection)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_FLAGS “-std&#61;c&#43;&#43;11 -march&#61;native”)
set(CMAKE_BUILD_TYPE Release CACHE STRING “set build type to release”)
set(CMAKE_MODULE_PATH CMAKEMODULEPATH"{CMAKE_MODULE_PATH} "CMAKEMODULEPATH"{CMAKE_CURRENT_LIST_DIR}/cmake")
set(LIMBO_INCLUDE_DIRS ./limbo/src)

find_package(OpenMP REQUIRED)
find_package(Protobuf REQUIRED)
if(PROTOBUF_FOUND)
message(STATUS “protobuf library found”)
else()
message(FATAL_ERROR “protobuf library is needed but cant be found”)
endif()

find_package(Boost)
find_package(PCL REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(OpenCV REQUIRED)
find_package(Glog REQUIRED)

include_directories(/home/gj/lidar/LidarRoadBoundaryDetection/limbo/src
${PCL_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS}
${Qt5Charts_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIRS}
${LIMBO_INCLUDE_DIRS} ${Protobuf_INCLUDE_DIRS} GLOGINCLUDEDIRS.)INCLUDEDIRECTORIES({GLOG_INCLUDE_DIRS} .) INCLUDE_DIRECTORIES(GLOGINCLUDEDIRS.)INCLUDEDIRECTORIES({CMAKE_CURRENT_BINARY_DIR})

link_directories(${PCL_LIBRARY_DIRS} /home/gj/lidar/LidarRoadBoundaryDetection/limbo/build/src)
protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS road_boundary.proto)


protobuf_generate_cpp(road_boundary.pb.cpp road_boundary.pb.h road_boundary.proto)

add_definitions(${PCL_DEFINITIONS})

add_subdirectory(./lib)

#add_library(extract ${SRC})
#target_link_libraries(extract ${PCL_LIBRARIES} OpenMP::OpenMP_CXX)

add_executable(demo_frame src/main.cpp)

target_link_libraries(demo_frame ${PCL_LIBRARIES} ${OpenCV_LIBS} extract
${Protobuf_LIBRARIES} ${GLOG_LIBRARIES})

add_executable(demo_video src/main_thread.cpp ${PROTO_SRCS} ${PROTO_HDRS})

target_link_libraries(demo_video ${PCL_LIBRARIES} ${OpenCV_LIBS} extract
${Protobuf_LIBRARIES} ${GLOG_LIBRARIES})

————————————————
版权声明&#xff1a;本文为CSDN博主「mark_GJ」的原创文章&#xff0c;遵循CC 4.0 BY-SA版权协议&#xff0c;转载请附上原文出处链接及本声明。
原文链接&#xff1a;https://blog.csdn.net/mark_GJ/article/details/121210107


推荐阅读
author-avatar
sprout--_557
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有