【配置跑通Omni-Swarm(omni swarm:开源的多机器人协同SLAM算法)持续踩坑排雷更新中。。。】

这篇具有很好参考价值的文章主要介绍了【配置跑通Omni-Swarm(omni swarm:开源的多机器人协同SLAM算法)持续踩坑排雷更新中。。。】。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

配置Omni-Swarm(omni swarm:开源的多机器人协同SLAM算法)更新中

旨在记录配置Omni-Swarm过程

1 简介

Omni-swarm: A Decentralized Omnidirectional Visual-Inertial-UWB State Estimation System for Aerial Swarms
Omni-swarm是一种用于空中群体的分布式全向视觉惯性超宽带(visual-inertial-UWB)状态估计系统。为了解决可观测性、复杂初始化、精度不足和缺乏全局一致性等问题,引入了全向感知系统作为Omni-swarm的前端,包括全向传感器,如立体鱼眼摄像头和超宽带(UWB)传感器,以及算法,包括鱼眼视觉惯性里程计(VIO)、多无人机基于地图的定位和视觉目标检测。该系统采用基于图优化和前向传递的方式作为Omni-swarm的后端,融合来自前端的测量数据。根据实验结果,所提出的分布式状态估计方法在群体系统上实现了厘米级的相对状态估计精度,并确保了全局一致性。此外,通过Omni-swarm的支持,无需任何外部设备就可以在完全分布式的方案中实现无人机之间的避障,展示了Omni-swarm在不同场景下成为自主空中群体飞行的基础的潜力。
论文地址
代码地址


2 配置过程

配置环境为Ubuntu18.04 amd64

2.1 ROS安装

最简便的ROS安装方法是采用鱼香ROS编写的fishROS一键安装脚本,使用过程如下
打开终端,运行以下代码:

sudo wget http://fishros.com/install -O fishros && sudo bash fishros

omni swarm,开源,机器人,算法,ubuntu,linux

输入“1”以安装ROS,进到以下选择界面
omni swarm,开源,机器人,算法,ubuntu,linux

如果自己换过源则选择“2”,未换过源的选择“1”自动换源(amd64为清华源)
按照指示换完源后到以下选择界面
omni swarm,开源,机器人,算法,ubuntu,linux

选择“1”安装ROS1
图中为20.04示例,18.04对应的ros版本为melodic

omni swarm,开源,机器人,算法,ubuntu,linux

选择“1”桌面版,等待安装完成

安装完成后运行roscore测试如下
omni swarm,开源,机器人,算法,ubuntu,linux

ros安装完成

2.2 下载Omni-Swarm源码、CNN模型及数据集

1 源码下载
Omni-swarm可进入链接下载,也可使用git下载:

sudo apt install git
git clone https://github.com/HKUST-Aerial-Robotics/Omni-swarm.git

网络问题git不下来可以用以下命令git:

git clone https://mirror.ghproxy.com/https://github.com/HKUST-Aerial-Robotics/Omni-swarm.git

这种方式下载下来的是针孔相机版本,需要使用鱼眼相机版本于VINS-Fisheye网址下载源码
将git下来的包放入自己创建的工作空间,我的工作空间结构为:

/omni-swarm_ws/src/Omni-swarm-pinhole_compatiable

2 CNN模型下载
根据readme所述,须于此网址(科学上网)下载models文件夹
放于/Omni-swarm_ws/src/Omni-swarm/swarm_loop

3 数据集下载
此网址(科学上网)下载数据集
三个压缩包,共31.5g
omni swarm,开源,机器人,算法,ubuntu,linux

2.3 下载依赖

根据README.md文件所述,需要下载安装:

  • swarm_msgs
  • inf_uwb_ros

参考此博客为了编译通过还需要安装以下未提到的依赖:

  • libtorch
  • TensorRT
  • lcm
  • libSGM
  • yolo-tensorrt
  • camera_models
  • dw
  • backward-cpp
  • faiss
  • graphviz

1 swarm_msgs和inf_uwb_ros
swarm_msgs和inf_uwb_ros直接git到主目录

git clone https://mirror.ghproxy.com/https://github.com/HKUST-Swarm/swarm_msgs.git
git clone https://mirror.ghproxy.com/https://github.com/HKUST-Swarm/inf_uwb_ros.git

2 libtorch和tensorRT
参考此博客
首先,查看cuda版本

nvcc --version

omni swarm,开源,机器人,算法,ubuntu,linux

查看torch版本

python
>>import torch
>>print(torch.__version__)

omni swarm,开源,机器人,算法,ubuntu,linux

根据以上版本在此博客选择对应的libtorch版本下载
在此博客选择对应的tensorRT版本下载,本机下载tensorRT7.1.3.4
将lib绝对路径添加到环境变量中:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/d/Library/TensorRT-7.1.3.4.Ubuntu-18.04.x86_64-gnu.cuda-11.0.cudnn8.0/TensorRT-7.1.3.4/lib

为了避免其它软件找不到 TensorRT 的库,建议把 TensorRT 的库和头文件添加到系统路径下:

sudo cp -r ./lib/* /usr/lib
sudo cp -r ./include/* /usr/include

其使用需要修改omni-swarm的cmakelist,参考此博客

3 lcm
下载

git clone https://mirror.ghproxy.com/https://github.com/lcm-proj/lcmb.git

编译:

mkdir build
cd build/
cmake ..
make -j4
sudo make install    

4 yolo-tensorrt
下载dev-yolov4版本:

git clone https://mirror.ghproxy.com/https://github.com/enazoe/yolo-tensorrt/tree/dev-yolov4.git

修改cmakelist:

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wno-write-strings")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath -Wl,$ORIGIN")
set(Torch_DIR "$ENV{HOME}/3rdParty/libtorch/share/cmake/Torch")
find_package(Torch REQUIRED)
set(TENSORRT_ROOT $ENV{HOME}/3rdParty/TensorRT-7.1.3.4)
include_directories("$ENV{HOME}/3rdParty/TensorRT-7.1.3.4/include")

编译:

sudo apt-get install libgflags-dev
cd yolo-tensorrt/
mkdir build
cd build/
cmake ..
make

报错1:
omni swarm,开源,机器人,算法,ubuntu,linux

原因:cuda版本错误,重装tensorRT相应版本的cuda(tensorRT7目前仅有cuda10.2版本以及cuda11.0版本)
重装后编译通过

5 dw

sudo apt-get install libdw-dev

6 backward-cpp

网址或git下载:

git clone https://mirror.ghproxy.com/https://github.com/bombela/backward-cpp.git

常规编译:

mkdir build
cd build/
cmake ..
make -j4
sudo make install 

7 faiss
安装参考此博客
1 安装依赖库openblas:

sudo apt-get install gfortran
git clone https://mirror.ghproxy.com/https://github.com/xianyi/OpenBLAS.git
cd OpenBLAS
make FC=gfortran
sudo make install

sudo ln -s /opt/OpenBLAS/lib/libopenblas.so  /usr/lib/libopenblas.so
sudo cp libopenblas.so.0  /usr/lib/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/OpenBLAS/lib

2 安装依赖库lapack

# 下载lapack源码
wget http://www.netlib.org/lapack/lapack-3.4.2.tgz
tar -zxf lapack-3.4.2.tgz
# 首先当然是进入lapack-3.4.2文件夹,然后根据平台的特点,将INSTALL目录下对应的make.inc.XXX复制一份到 lapack-3.4.2目录下,并命名为make.inc, 这里我复制的是INSTALL/make.inc.gfortran,因为我这里用的是gfortran编译器
cd lapack-3.4.2
cp ./INSTALL/make.inc.gfortran ./
mv make.inc.gfortran make.inc

修改lapack-3.4.2/Makefile,因为lapack以来于blas库,所以需要做如下修改(注释第一句话,去掉注释第二句话):

#lib: lapacklib tmglib
lib: blaslib variants lapacklig tmglib

编译:
在lapack-3.4.2下运行:

# 编译所有的lapack文件
make
# 进入lapacke 文件夹,这个文件夹包含lapack的C语言接口文件 
cd lapacke
# 编译lapacke
make  

由于lapack的makefile文件中没有make isntall 命令,需要手工进行安装

# 将lapacke的头文件复制到系统头文件目录
sudo cp include/*.h /usr/include  
# 返回到 lapack-3.4.2 目录 
cd .. 
# 将生成的所有库文件复制到系统库目录 
sudo cp *.a /usr/lib 

3 编译安装faiss

#下载源码 // 这里注意代码路径
git clone https://mirror.ghproxy.com/https://github.com/RobotWithCV/faiss  
# 进入FAISS源码目录.
cd faiss
# 根据系统配置编译环境. [Linux 为例]
cp example_makefiles/makefile.inc.Linux ./makefile.inc

# 首先先执行./configure,看看环境是否符合编译条件,其中有一些不是必选项,一般只管输出日志的最后一句话有无错误即可
./configure

# 之后进行编译用例测试,若无报错即代表数学库安装成功
make misc/test_blas
./misc/test_blas

omni swarm,开源,机器人,算法,ubuntu,linux

# 执行最重要的make & make install
make
sudo make install

8 graphviz

sudo apt install graphviz graphviz-dev

2.2 编译Omni-Swarm源码

前往Omni-swarm_ws运行:

catkin build

我首次编译只成功了4/9个包
omni swarm,开源,机器人,算法,ubuntu,linux

一个一个找问题

问题1:
omni swarm,开源,机器人,算法,ubuntu,linux

原因:缺少camera_models
解决方法:参考此博客下载VINS-Fisheye:

git clone https://mirror.ghproxy.com/https://github.com/HKUST-Aerial-Robotics/VINS-Fisheye.git

将里面的camera_models和vins_estimator复制到Omni的src中
同时下载bspline放入src中

git clone https://ghproxy.com/https://github.com/HKUST-Swarm/bspline

最终我的工作空间为这样:
omni swarm,开源,机器人,算法,ubuntu,linux
问题2:
omni swarm,开源,机器人,算法,ubuntu,linuxOpenCV版本小于3.4,我的OpenCV为3.3.1,现安装OpenCV,参考此博客
多版本OPENCV共存参考此博客

注意:需要安装OPENCV+Contrib+CUDA.编译过程会遇到很多问题,目前我CUDA版本11.0使用了很多方法都不成功,后续可能考虑降cuda版本


2024年1月16日更新
目前使用ubuntu20.04 Opencv4.8.0+cuda12.1 Swarm_loop包编译到最终的链接过程失败,opencv和ros链接不了,其他包编译通过。
报错如下:

/usr/bin/ld: CMakeFiles/swarm_loop_net_tester.dir/src/loop_network_tester.cpp.o: in function `void ros::Publisher::publish<swarmcomm_msgs::drone_network_status_<std::allocator<void> > >(swarmcomm_msgs::drone_network_status_<std::allocator<void> > const&) const':
/opt/ros/noetic/include/ros/publisher.h:107: undefined reference to `ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
/usr/bin/ld: /opt/ros/noetic/include/ros/publisher.h:107: undefined reference to `ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
/usr/bin/ld: /opt/ros/noetic/include/ros/publisher.h:107: undefined reference to `ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
/usr/bin/ld: /opt/ros/noetic/include/ros/publisher.h:113: undefined reference to `ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
/usr/bin/ld: /opt/ros/noetic/include/ros/publisher.h:113: undefined reference to `ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
/usr/bin/ld: CMakeFiles/swarm_loop_net_tester.dir/src/loop_network_tester.cpp.o:/opt/ros/noetic/include/ros/publisher.h:113: more undefined references to `ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)' follow
/usr/bin/ld: CMakeFiles/swarm_loop_net_tester.dir/src/loop_network_tester.cpp.o: in function `bool ros::NodeHandle::param<int>(std::string const&, int&, int const&) const':
/opt/ros/noetic/include/ros/node_handle.h:2122: undefined reference to `ros::NodeHandle::hasParam(std::string const&) const'
/usr/bin/ld: /opt/ros/noetic/include/ros/node_handle.h:2124: undefined reference to `ros::NodeHandle::getParam(std::string const&, int&) const'
/usr/bin/ld: CMakeFiles/swarm_loop_net_tester.dir/src/loop_network_tester.cpp.o: in function `main':
/home/d/Workspace/Omni-swarm_ws/src/Omni-swarm-pinhole_compatiable/Omni-swarm/swarm_loop/src/loop_network_tester.cpp:67: undefined reference to `ros::init(int&, char**, std::string const&, unsigned int)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/src/Omni-swarm-pinhole_compatiable/Omni-swarm/swarm_loop/src/loop_network_tester.cpp:68: undefined reference to `ros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/src/Omni-swarm-pinhole_compatiable/Omni-swarm/swarm_loop/src/loop_network_tester.cpp:70: undefined reference to `ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `cv::putText(cv::_InputOutputArray const&, std::string const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `cv::imshow(std::string const&, cv::_InputArray const&)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `ros::NodeHandle::getParam(std::string const&, double&) const'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `cv_bridge::toCvCopy(sensor_msgs::Image_<std::allocator<void> > const&, std::string const&)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `cv::error(int, std::string const&, char const*, char const*, int)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/libloop_cnn.so: undefined reference to `loadTRTEngine(std::string, Logger&)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `cv::imwrite(std::string const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `ros::NodeHandle::getParam(std::string const&, bool&) const'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `cv_bridge::toCvCopy(boost::shared_ptr<sensor_msgs::Image_<std::allocator<void> > const> const&, std::string const&)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `ros::NodeHandle::getParam(std::string const&, std::string&) const'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `cv::imencode(std::string const&, cv::_InputArray const&, std::vector<unsigned char, std::allocator<unsigned char> >&, std::vector<int, std::allocator<int> > const&)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `cv::read(cv::FileNode const&, std::string&, std::string const&)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `cv::FileStorage::open(std::string const&, int, std::string const&)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `camodocal::CameraFactory::generateCameraFromYamlFile(std::string const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/swarm_loop_net_tester.dir/build.make:293:/home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/swarm_loop/swarm_loop_net_tester] 错误 1
make[1]: *** [CMakeFiles/Makefile2:1288:CMakeFiles/swarm_loop_net_tester.dir/all] 错误 2
make[1]: *** 正在等待未完成的任务....
/usr/bin/ld: CMakeFiles/swarm_loop_spy.dir/src/swarm_loop_spy.cpp.o: in function `SwarmLoopSpy::SwarmLoopSpy(ros::NodeHandle&)::{lambda(LoopEdge_t const&)#2}::operator()(LoopEdge_t const&) const':
/home/d/Workspace/Omni-swarm_ws/src/Omni-swarm-pinhole_compatiable/Omni-swarm/swarm_loop/src/swarm_loop_spy.cpp:40: undefined reference to `ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
/usr/bin/ld: CMakeFiles/swarm_loop_spy.dir/src/swarm_loop_spy.cpp.o: in function `bool ros::NodeHandle::param<std::string>(std::string const&, std::string&, std::string const&) const':
/opt/ros/noetic/include/ros/node_handle.h:2122: undefined reference to `ros::NodeHandle::hasParam(std::string const&) const'
/usr/bin/ld: /opt/ros/noetic/include/ros/node_handle.h:2124: undefined reference to `ros::NodeHandle::getParam(std::string const&, std::string&) const'
/usr/bin/ld: /opt/ros/noetic/include/ros/node_handle.h:2122: undefined reference to `ros::NodeHandle::hasParam(std::string const&) const'
/usr/bin/ld: /opt/ros/noetic/include/ros/node_handle.h:2124: undefined reference to `ros::NodeHandle::getParam(std::string const&, std::string&) const'
/usr/bin/ld: CMakeFiles/swarm_loop_spy.dir/src/swarm_loop_spy.cpp.o: in function `main':
/home/d/Workspace/Omni-swarm_ws/src/Omni-swarm-pinhole_compatiable/Omni-swarm/swarm_loop/src/swarm_loop_spy.cpp:83: undefined reference to `ros::init(int&, char**, std::string const&, unsigned int)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/src/Omni-swarm-pinhole_compatiable/Omni-swarm/swarm_loop/src/swarm_loop_spy.cpp:84: undefined reference to `ros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/src/Omni-swarm-pinhole_compatiable/Omni-swarm/swarm_loop/src/swarm_loop_spy.cpp:80: undefined reference to `ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
/usr/bin/ld: CMakeFiles/swarm_loop_spy.dir/src/swarm_loop_spy.cpp.o: in function `SwarmLoopSpy::timer_callback(ros::TimerEvent const&)':
/home/d/Workspace/Omni-swarm_ws/src/Omni-swarm-pinhole_compatiable/Omni-swarm/swarm_loop/src/swarm_loop_spy.cpp:67: undefined reference to `cv::putText(cv::_InputOutputArray const&, std::string const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/src/Omni-swarm-pinhole_compatiable/Omni-swarm/swarm_loop/src/swarm_loop_spy.cpp:70: undefined reference to `cv::putText(cv::_InputOutputArray const&, std::string const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/src/Omni-swarm-pinhole_compatiable/Omni-swarm/swarm_loop/src/swarm_loop_spy.cpp:72: undefined reference to `cv::imshow(std::string const&, cv::_InputArray const&)'
/usr/bin/ld: CMakeFiles/swarm_loop_spy.dir/src/swarm_loop_spy.cpp.o: in function `SwarmLoopSpy::SwarmLoopSpy(ros::NodeHandle&)::{lambda(FisheyeFrameDescriptor_t const&)#1}::operator()(FisheyeFrameDescriptor_t const&) const':
/home/d/Workspace/Omni-swarm_ws/src/Omni-swarm-pinhole_compatiable/Omni-swarm/swarm_loop/src/swarm_loop_spy.cpp:35: undefined reference to `ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `ros::NodeHandle::getParam(std::string const&, double&) const'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `cv_bridge::toCvCopy(sensor_msgs::Image_<std::allocator<void> > const&, std::string const&)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `cv::error(int, std::string const&, char const*, char const*, int)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/libloop_cnn.so: undefined reference to `loadTRTEngine(std::string, Logger&)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `cv::imwrite(std::string const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `ros::NodeHandle::getParam(std::string const&, bool&) const'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `cv_bridge::toCvCopy(boost::shared_ptr<sensor_msgs::Image_<std::allocator<void> > const> const&, std::string const&)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `cv::imencode(std::string const&, cv::_InputArray const&, std::vector<unsigned char, std::allocator<unsigned char> >&, std::vector<int, std::allocator<int> > const&)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `cv::read(cv::FileNode const&, std::string&, std::string const&)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `ros::NodeHandle::getParam(std::string const&, int&) const'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `cv::FileStorage::open(std::string const&, int, std::string const&)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `camodocal::CameraFactory::generateCameraFromYamlFile(std::string const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/swarm_loop_spy.dir/build.make:286:/home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/swarm_loop/swarm_loop_spy] 错误 1
make[1]: *** [CMakeFiles/Makefile2:1545:CMakeFiles/swarm_loop_spy.dir/all] 错误 2
In file included from /home/d/Workspace/Omni-swarm_ws/src/Omni-swarm-pinhole_compatiable/Omni-swarm/swarm_loop/include/swarm_loop/swarm_loop.h:5,
                 from /home/d/Workspace/Omni-swarm_ws/src/Omni-swarm-pinhole_compatiable/Omni-swarm/swarm_loop/src/swarm_loop_nodelet.cpp:1:
/home/d/Workspace/Omni-swarm_ws/src/Omni-swarm-pinhole_compatiable/Omni-swarm/swarm_loop/include/swarm_loop/loop_cam.h: In constructor ‘StereoFrame::StereoFrame(vins::FlattenImages, int)’:
/home/d/Workspace/Omni-swarm_ws/src/Omni-swarm-pinhole_compatiable/Omni-swarm/swarm_loop/include/swarm_loop/loop_cam.h:64:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<sensor_msgs::Image_<std::allocator<void> >, std::allocator<sensor_msgs::Image_<std::allocator<void> > > >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
   64 |         for (int i = 1; i < vins_flatten.up_cams.size(); i++) {
      |                         ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/d/Workspace/Omni-swarm_ws/src/Omni-swarm-pinhole_compatiable/Omni-swarm/swarm_loop/include/swarm_loop/swarm_loop.h:5,
                 from /home/d/Workspace/Omni-swarm_ws/src/Omni-swarm-pinhole_compatiable/Omni-swarm/swarm_loop/src/swarm_loop_node.cpp:1:
/home/d/Workspace/Omni-swarm_ws/src/Omni-swarm-pinhole_compatiable/Omni-swarm/swarm_loop/include/swarm_loop/loop_cam.h: In constructor ‘StereoFrame::StereoFrame(vins::FlattenImages, int)’:
/home/d/Workspace/Omni-swarm_ws/src/Omni-swarm-pinhole_compatiable/Omni-swarm/swarm_loop/include/swarm_loop/loop_cam.h:64:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<sensor_msgs::Image_<std::allocator<void> >, std::allocator<sensor_msgs::Image_<std::allocator<void> > > >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
   64 |         for (int i = 1; i < vins_flatten.up_cams.size(); i++) {
      |                         ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/ld: CMakeFiles/swarm_loop_node.dir/src/swarm_loop_node.cpp.o: in function `main':
/home/d/Workspace/Omni-swarm_ws/src/Omni-swarm-pinhole_compatiable/Omni-swarm/swarm_loop/src/swarm_loop_node.cpp:16: undefined reference to `ros::init(int&, char**, std::string const&, unsigned int)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/src/Omni-swarm-pinhole_compatiable/Omni-swarm/swarm_loop/src/swarm_loop_node.cpp:17: undefined reference to `ros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/src/Omni-swarm-pinhole_compatiable/Omni-swarm/swarm_loop/src/swarm_loop_node.cpp:18: undefined reference to `ros::console::set_logger_level(std::string const&, ros::console::levels::Level)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `cv::putText(cv::_InputOutputArray const&, std::string const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `cv::imshow(std::string const&, cv::_InputArray const&)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `ros::NodeHandle::getParam(std::string const&, double&) const'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `ros::NodeHandle::hasParam(std::string const&) const'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `cv_bridge::toCvCopy(sensor_msgs::Image_<std::allocator<void> > const&, std::string const&)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `cv::error(int, std::string const&, char const*, char const*, int)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/libloop_cnn.so: undefined reference to `loadTRTEngine(std::string, Logger&)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `cv::imwrite(std::string const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `ros::NodeHandle::getParam(std::string const&, bool&) const'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `cv_bridge::toCvCopy(boost::shared_ptr<sensor_msgs::Image_<std::allocator<void> > const> const&, std::string const&)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `ros::NodeHandle::getParam(std::string const&, std::string&) const'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `cv::imencode(std::string const&, cv::_InputArray const&, std::vector<unsigned char, std::allocator<unsigned char> >&, std::vector<int, std::allocator<int> > const&)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `cv::read(cv::FileNode const&, std::string&, std::string const&)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `ros::NodeHandle::getParam(std::string const&, int&) const'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `cv::FileStorage::open(std::string const&, int, std::string const&)'
/usr/bin/ld: /home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/liblibswarm_loop.so: undefined reference to `camodocal::CameraFactory::generateCameraFromYamlFile(std::string const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/swarm_loop_node.dir/build.make:293:/home/d/Workspace/Omni-swarm_ws/devel/.private/swarm_loop/lib/swarm_loop/swarm_loop_node] 错误 1
make[1]: *** [CMakeFiles/Makefile2:652:CMakeFiles/swarm_loop_node.dir/all] 错误 2
make: *** [Makefile:141:all] 错误 2

CMakeLists检查修改都无法解决。初步判断为C++17和C++14的链接冲突问题(我的libtorch必须使用C++17编译),还有待继续研究。


2024年1月17日更新
的确为libtorch导致的C++17和C++14的链接冲突问题
更换为docker中的libtorch版本(1.7.0+cpu,并未使用gpu,且为C++14)后编译通过
omni swarm,开源,机器人,算法,ubuntu,linux运行roslaunch

roslaunch swarm_loop nodelet-sfisheye.launch

omni swarm,开源,机器人,算法,ubuntu,linux
存在问题:1.针孔相机roslaunch还有报错 2.后续运行数据,跑出结果 3.docker没有运行成功,容器中没有src源码文章来源地址https://www.toymoban.com/news/detail-761007.html

到了这里,关于【配置跑通Omni-Swarm(omni swarm:开源的多机器人协同SLAM算法)持续踩坑排雷更新中。。。】的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 最新!OMNI3D:3D目标检测的大型基准和模型(Meta AI)

    点击下方 卡片 ,关注“ 自动驾驶之心 ”公众号 ADAS巨卷干货,即可获取 点击进入→ 自动驾驶之心【3D目标检测】技术交流群 后台回复【3D检测综述】获取最新基于点云/BEV/图像的3D检测综述! 论文链接:https://arxiv.org/pdf/2207.10660v1.pdf 代码链接:https://github.com/facebookresearch/

    2024年02月16日
    浏览(37)
  • 一张图看懂 USDT三种类型地址 Omni、ERC20、TRC20的区别

    USDT 是当前实用最广泛,市值最高的稳定币,它是中心化的公司Tether发行的。在今年的4月17日之前,市场上存在着2种不同类型的USDT。4月17日又多了一种波场TRC20协议发行的USDT,它们各自有什么区别呢?哪个转账最快到账?哪种最安全?手续费最低? USDT三种链类型Omni、ERC20、

    2024年02月03日
    浏览(49)
  • Docker swarm 网络配置与管理

    创建自定义overlay网络名为nginx-net创建nginx服务设置3个副本并使用nginx-net网络 Swatm集群部署nginx服务副本数量为3并使用自定义overlay网络 在创建一个overlay网络名为nginx-net01 将现已经启动的nginx01服务进行修改链接至nginx-net01网络 删除上述创建的自定义overlay网络和nginx01服务工作节

    2024年02月12日
    浏览(40)
  • Docker:Docker集群配置与应用(Docker Swarm)

    可以认为Docker Swarm(Go语言开发)将一个Docker主机池变成了一个单独的虚拟机。 了解 Docker Swarm,掌握 Swarm 集群 建立及节点管理 ; 了解 Swarm 服务,学会在 集群中部署和管理服务 ; 了解 Swarm 网络, 掌握 overlay 网络的创建和使用 ; 了解 Swarm 高可用性和负载平衡,学会配置外部

    2024年02月03日
    浏览(48)
  • [Docker]十一.Docker Swarm集群raft算法,Docker Swarm Web管理工具

    Raft :一致性算法,在保证大多数管理节点存活的情况下,集群才能使用, 所以就要求如果集群的话, manager 节点必须 =3 台 ,如果是两个台,其中一台宕机,剩余的一台也将不可用,以致整个集群不可用 Manager : 管理节点,用于管理工作节点,为了利用 swarm 模式的容错特性

    2024年02月04日
    浏览(49)
  • 了解Swarm 集群管理

    简介 Docker Swarm 是 Docker 的集群管理工具。它将 Docker 主机池转变为单个虚拟 Docker 主机。 Docker Swarm 提供了标准的 Docker API,所有任何已经与 Docker 守护程序通信的工具都可以使用 Swarm 轻松地扩展到多个主机。 支持的工具包括但不限于以下各项: Dokku Docker Compose Docker Machine J

    2024年02月13日
    浏览(33)
  • 【swarm集群】

    今天给大家带来Dockers Swarm的学习 一、什么是Docker Swarm Swarm是Docker公司推出的用来管理docker集群的平台,几乎全部用GO语言来完成的开发的,代码开源在https://github.com/docker/swarm, 它是将一群Docker宿主机变成一个单一的虚拟主机,Swarm使用标准的Docker API接口作为其前端的访问入

    2024年02月11日
    浏览(28)
  • swarm集群

    一、什么是Docker Swarm Swarm是Docker公司推出的用来管理docker集群的平台,几乎全部用GO语言来完成的开发的,代码开源在https://github.com/docker/swarm, 它是将一群Docker宿主机变成一个单一的虚拟主机,Swarm使用标准的Docker API接口作为其前端的访问入口,换言之,各种形式的Docker C

    2024年02月11日
    浏览(33)
  • 【Docker】Swarm学习

    定义 Swarm是Docker公司推出的用来管理docker集群的平台。它是将一群Docker宿主机变成一个单一的虚拟主机。 Swarm使用标准的Docker API接口作为其前端的访问入口,换言之,各种形式的Docker Client(compose,docker-py等)均可以直接与Swarm通信,甚至Docker本身都可以很容易的与Swarm集成,这大

    2024年02月07日
    浏览(40)
  • 11. Docker Swarm(二)

    上一篇中我们利用Docker Swarm搭建了基础的集群环境。那么今天我们就来验证以下该集群的可用性。上一篇的示例中,我创建了3个实例副本,并且通过访问http://192.168.74.132:8080得到我们的页面。 1)我们可以通过以下命令查看当前应用的节点信息: 可以看出在IP为132,133,134上

    2024年02月12日
    浏览(36)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包