在ROS中实现多Realscene D455数据的读取并发布
【摘要】 简介D455作为新一代的英特尔RealSense深度摄像头,网上的资料很少,同时除了官方的资料以外,我们很难找到相关的ROS相关的文档。同时由于D455支持的是realsense SDK2.0。所以SDK1.0的数据也不适用。本文档主要提供了一套完整的Ubuntu 18.04 + Realsense D455 + ROS melodic 的代码。 详细步骤 1.环境依赖依赖环境版本号ROS...
简介
D455作为新一代的英特尔RealSense深度摄像头,网上的资料很少,同时除了官方的资料以外,我们很难找到相关的ROS相关的文档。同时由于D455支持的是realsense SDK2.0。所以SDK1.0的数据也不适用。本文档主要提供了一套完整的Ubuntu 18.04 + Realsense D455 + ROS melodic 的代码。
详细步骤
1.环境依赖
依赖环境 | 版本号 |
---|---|
ROS | melodic |
Opencv | 3.2.0 |
C++ | 11+ |
2.树形图
src
├── CMakeLists.txt
├── real_sense_multi
│ ├── CMakeLists.txt
│ ├── include
│ ├── launch
│ │ └── realsense_multi_cam.launch #launch 启动文件
│ ├── package.xml
│ └── src
│ └── realsense_multi_cam.cpp
CMakeLists.txt
cmake_minimum_required(VERSION 3.0.2)
project(real_sense_multi)
## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g ")
set (CMAKE_VERBOSE_MAKEFILE ON)
set(OpenCV_DIR /usr/local/share/OpenCV)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(OpenCV REQUIRED)
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
cv_bridge
image_transport
sensor_msgs
)
catkin_package(
# INCLUDE_DIRS include
# LIBRARIES real_sense_multi
CATKIN_DEPENDS
roscpp
rospy
std_msgs
cv_bridge
image_transport
sensor_msgs
# DEPENDS system_lib
)
if(CMAKE_COMPILER_IS_GNUCC)
ADD_DEFINITIONS ( -std=c++11 )
endif(CMAKE_COMPILER_IS_GNUCC)
## Your package locations should be listed before other locations
include_directories(
include
${catkin_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
/opt/ros/melodic/include
)
link_directories(/opt/ros/melodic/lib)
add_executable(realsense_multi_cam_node src/realsense_multi_cam.cpp)
target_link_libraries(realsense_multi_cam_node ${catkin_LIBRARIES} ${OpenCV_LIBS} realsense2)
…详情请参照古月居
【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)