当前位置:网站首页>Realsense-Ros安装配置介绍与问题解决
Realsense-Ros安装配置介绍与问题解决
2022-07-25 14:19:00 【这世界比瞳孔还漆黑】
Realsense-Ros安装配置介绍与问题解决
本文主要讲述在如何进行Realsense-Ros的安装与配置,以及提出在安装配置过程中遇到相关问题的解决方案。
Realsense-Ros安装配置
Realsense-Ros的配置主要涉及两个功能包,realsense-ros以及ddynamic_reconfigure
https://github.com/IntelRealSense/realsense-ros.git
https://github.com/pal-robotics/ddynamic_reconfigure.git
功能包克隆与编译
如果你已经新建了ROS工作空间,或者已经建好了ROS工作空间,则可以直接在工作空间的src目录下克隆相关功能包,然后进行编译,具体命令参考下方:
#已建好工作空间
cd catkin_ws/src/
git clone https://github.com/IntelRealSense/realsense-ros.git
git clone https://github.com/pal-robotics/ddynamic_reconfigure.git
cd ~/catkin_ws && catkin_make
#未建立工作空间
mkdir -p ~/catkin_ws/src
catkin_init_workspace
cd ..
catkin_make
cd src/
git clone https://github.com/IntelRealSense/realsense-ros.git
git clone https://github.com/pal-robotics/ddynamic_reconfigure.git
cd ~/catkin_ws && catkin_make
编译错误与问题分析
在执行上述功能包克隆与编译的最后一部catkin_make时,你可能得到如下图所示的终端错误提示:
阅读终端反馈的错误提示我们可以看到其提及在克隆的realsense_ros功能包目录下realsense2_camera的CMakelist.txt文件中出现了错误,该文件的第43行需要寻找realsense2的功能包,且要求realsense2的版本号为2.37.0,但在安装realsense的相机驱动时,相机驱动的版本为2.36.0,故在编译时,无法找到2.37.0版本导致错误发生。
#catkin_ws/realsense-ros/realsense2_camera/CMakelist.txt
cmake_minimum_required(VERSION 2.8.3)
project(realsense2_camera)
add_compile_options(-std=c++11)
option(BUILD_WITH_OPENMP "Use OpenMP" OFF)
option(SET_USER_BREAK_AT_STARTUP "Set user wait point in startup (for debug)" OFF)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
find_package(catkin REQUIRED COMPONENTS
message_generation
nav_msgs
roscpp
sensor_msgs
std_msgs
nodelet
cv_bridge
image_transport
tf
ddynamic_reconfigure
diagnostic_updater
)
if(BUILD_WITH_OPENMP)
find_package(OpenMP)
if(NOT OpenMP_FOUND)
message(FATAL_ERROR "\n\n OpenMP is missing!\n\n")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS} -fopenmp")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()
endif()
if(SET_USER_BREAK_AT_STARTUP)
message("GOT FLAG IN CmakeLists.txt")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBPDEBUG")
endif()
if (WIN32)
find_package(realsense2 CONFIG REQUIRED)
else()
find_package(realsense2 2.37.0)
endif()
if(NOT realsense2_FOUND)
message(FATAL_ERROR "\n\n Intel RealSense SDK 2.0 is missing, please install it from https://github.com/IntelRealSense/librealsense/releases\n\n")
endif()
解决方案
针对终端反馈的错误信息修改realsense-ros/realsense2_camera/CMakeLists.txt:43,参考下面给出的实例对其进行修改,主要更改版本号为2.36.0。
if (WIN32)
find_package(realsense2 CONFIG REQUIRED)
else()
find_package(realsense2 2.36.0) #修改为2.36.0
endif()
结束语
本文主要讲述了笔者在安装玩Realsense D435i驱动后,安装Realsense的ROS支持功能包的介绍以及给出遇到问题的解决方案,希望本文能够对你解决你遇到的问题起到一定的帮助。
边栏推荐
- From Anaconda to tensorflow to jupyter, step on the pit and fill it all the way
- Emergency science | put away this summer safety guide and let children spend the summer vacation safely!
- PT100 temperature measurement circuit diagram (AD590 typical temperature measurement circuit)
- NUC980 设置SSH Xshell连接
- Experiment the Arduino code of NTP network timing alarm clock with esp32+tm1638
- 手把手教你申请SSL证书
- Keys and scan based on redis delete keys with TTL -1
- Write an esp32 Watchdog with Arduino
- Arduino code of key state machine for realizing single, double click, long press and other functions with esp32 timed interrupt
- NAT/NAPT地址转换(内外网通信)技术详解【华为eNSP】
猜你喜欢

元器件采购系统的主要功能,数字化采购助力元器件企业飞速发展

Sunfeng, general manager of Yixun: the company has completed the share reform and is preparing for IPO

Nuc980 set up SSH xshell connection

~4.1 sword finger offer 05. replace spaces

Tm1637 four digit LED display module Arduino driver with second dot

【目录爆破工具】信息收集阶段:robots.txt、御剑、dirsearch、Dirb、Gobuster

Idea settings ignore file configuration when submitting SVN

Data analysis business core

PHP website design ideas

Advantages of wireless relay acquisition instrument and wireless network for engineering monitoring
随机推荐
手把手教你申请SSL证书
Pytorch uses tensorboard to realize visual summary
如何让一套代码完美适配各种屏幕?
实现一个家庭安防与环境监测系统(一)
Introduction to PHP
sqli-labs Basic Challenges Less1-10
Throwing OutOfMemoryError “Could not allocate JNI Env“
PT100 temperature measurement circuit diagram (AD590 typical temperature measurement circuit)
The practice of depth estimation self-monitoring model monodepth2 in its own data set -- single card / multi card training, reasoning, onnx transformation and quantitative index evaluation
Digital Twins - cognition
新唐NUC980设置DHCP或者静态IP
Detailed explanation of Telnet remote login AAA mode [Huawei ENSP]
Tm1638 LED digital display module Arduino drive code
Tm1637 four digit LED display module Arduino driver with second dot
Gateway 网关报错 SERVICE_UNAVAILABLE
Goldfish rhca memoirs: cl210 management storage -- object storage
飞沃科技IPO过会:年营收11.3亿 湖南文旅与沅澧投资是股东
RuntimeError: CUDA out of memory(已解决)[通俗易懂]
【学习记录】plt.show()闪退解决方法
Interpretation of featdepth self-monitoring model for monocular depth estimation (Part 2) -- use of openmmlab framework