R3live:整体分析

2024-02-08 17:10
文章标签 分析 整体 r3live

本文主要是介绍R3live:整体分析,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

R3LIVE相关参考:
R3LIVE(升级R2LIVE):编译与运行

https://blog.csdn.net/handily_1/article/details/122271243?spm=1001.2014.3001.5502
R3live:整体分析
https://blog.csdn.net/handily_1/article/details/122360134?spm=1001.2014.3001.5502
运行代码报错:Failed to load module “canberra-gtk-module“
https://blog.csdn.net/handily_1/article/details/122359275
R3live笔记:(图像处理)视觉-惯性里程计VIO部分
https://blog.csdn.net/handily_1/article/details/122377514

编译

编译运行R3LIVE参考文章:R3LIVE(升级R2LIVE):编译与运行

https://blog.csdn.net/handily_1/article/details/122271243?spm=1001.2014.3001.5502

在这里插入图片描述

目录

    • 编译
    • 1. rviz分析
    • 2. ros节点与话题
    • 3. launch文件分析
    • 4. r3live_config文件分析
    • 5. cmakelists.txt

1. rviz分析

简单分析一下rviz中都显示什么内容

  1. Global Options坐标系:world
  2. Grid:栅格
  3. Axes:Fixed Frame的坐标系,不能添加相对于其他坐标系的Axes
  4. LIO文件夹
    pointcloud_map: 订阅的是/cloud_registered,这个就是处理后的全部点云了
    current_scan:当前扫描到的全部点,订阅的也是/cloud_registered,Size是5,Alpha是1,Decay是0
    feature_map:特征点地图,订阅的是/Laser_map
    Path:r3live计算出来的轨迹,订阅的是/path
    Odometry:/r2live/odometry 没用到
    Odometry:建图的时候的位姿,订阅的是/aft_mapped_to_init
    Odometry:相机位姿,订阅的是/camera_odom
    Path:视觉计算出的轨迹,订阅的是/camera_path
    track_pts:应该是视觉计算出的点云,跑代码的时候"/track_pts"这个话题并没有数据输出
  5. RGB_map文件夹
    这里面全是由不同的 /RGB_map_*话题组成的一张RGB地图
  6. Input image:rviz显示输入图像
  7. Tracked points:rviz显示视觉追踪图像

2. ros节点与话题

在这里插入图片描述
/RGB_map_*话题计较长哈,回头处理一下图片,其实r3live节点与话题和还是很清晰明了的, 一共就/r3live_LiDAR_front_end和/r3live_mapping两个节点:

/r3live_LiDAR_front_end节点算法来自于经典算法LOAM中的特征提取部分,其实也是R2live、fast-lio中都使用到的,他订阅/livox/lidar雷达话题信息,经过处理后发布点云/laser_cloud,平面点/laser_cloud_flat和角点/laser_cloud_sharp信息。

/r3live_mapping节点就订阅平面点/laser_cloud_flat、imu话题/livox/imu和相机(这里的图片是compressed格式)话题/camera/image_color/compressed。发布的话题是前面rviz订阅的所有。

3. launch文件分析

以r3live_bag.launch为例:

<launch><!-- Subscribed topics --><param name="LiDAR_pointcloud_topic" type="string" value= "/laser_cloud_flat" /><param name="IMU_topic" type="string" value= "/livox/imu" /><param name="Image_topic" type="string" value= "/camera/image_color" /><param name="r3live_common/map_output_dir" type="string" value="$(find r3live)/../r3live_output" /><rosparam command="load" file="$(find r3live)/../config/r3live_config_r3live.yaml" /><node pkg="r3live" type="r3live_LiDAR_front_end" name="r3live_LiDAR_front_end"  output="screen"  required="true"><remap from="/livox/lidar" to="/livox/lidar" /></node><node pkg="r3live" type="r3live_mapping" name="r3live_mapping" output="screen" required="true" /><arg name="rviz" default="1" /><group if="$(arg rviz)"><node name="rvizvisualisation" pkg="rviz" type="rviz" output="log" args="-d $(find r3live)/../config/rviz/r3live_rviz_config.rviz" /></group>
</launch>
  • 第一个参数是设置r3live处理的雷达话题,不是livox话题
  • 定义imu、Image的topic和地图保存路径
  • 加载配置文件r3live_config_r3live.yaml
  • 启动r3live_LiDAR_front_end节点和r3live_mapping节点
  • 启动rviz

4. r3live_config文件分析

Lidar_front_end:lidar_type: 0   # 1 for Livox-avia, 3 for Ouster-OS1-64N_SCANS: 6using_raw_point: 1point_step: 1r3live_common:if_dump_log: 0                   # If recording ESIKF update log. [default = 0]record_offline_map: 1            # If recording offline map. [default = 1]pub_pt_minimum_views: 3          # Publish points which have been render up to "pub_pt_minimum_views" time. [default = 3]minimum_pts_size: 0.01           # The minimum distance for every two points in Global map (unit in meter). [default = 0.01] image_downsample_ratio: 1        # The downsample ratio of the input image. [default = 1]estimate_i2c_extrinsic: 1        # If enable estimate the extrinsic between camera and IMU. [default = 1] estimate_intrinsic: 1            # If enable estimate the online intrinsic calibration of the camera lens. [default = 1] maximum_vio_tracked_pts: 600     # The maximum points for tracking. [default = 600]append_global_map_point_step: 4
r3live_vio:camera_intrinsic:          # 相机内参[863.4241, 0.0, 640.6808,0.0,  863.4171, 518.3392,0.0, 0.0, 1.0 ] camera_dist_coeffs: [-0.1080, 0.1050, -1.2872e-04, 5.7923e-05, -0.0222]  # 畸变系数k1, k2, p1, p2, k3
# 相机外参camera_ext_R:[-0.00113207, -0.0158688, 0.999873,-0.9999999,  -0.000486594, -0.00113994,0.000504622,  -0.999874,  -0.0158682]camera_ext_t: [0,0,0] r3live_lio:        lio_update_point_step: 4   # Point step used for LIO update.  max_iteration: 2           # Maximum times of LIO esikf.lidar_time_delay: 0        # The time-offset between LiDAR and IMU, provided by user. #  体素大小filter_size_corner: 0.30   filter_size_surf: 0.30filter_size_surf_z: 0.30filter_size_map: 0.30

5. cmakelists.txt

  • 生成r3live_LiDAR_front_end可执行文件
add_executable(r3live_LiDAR_front_end src/loam/LiDAR_front_end.cpp)
target_link_libraries(r3live_LiDAR_front_end ${catkin_LIBRARIES} ${PCL_LIBRARIES})
  • 生成r3live_cam_cali_create_cali_board可执行文件
if(Ceres_FOUND)message(STATUS "===== Find ceres, Version ${Ceres_VERSION} =====")  include_directories(${CERES_INCLUDE_DIRS})add_executable(r3live_cam_cali src/r3live_cam_cali.cpp)target_link_libraries(r3live_cam_cali ${catkin_LIBRARIES} ${OpenCV_LIBRARIES} ${CERES_LIBRARIES})add_executable(r3live_cam_cali_create_cali_board src/r3live_cam_cali_create_cali_board.cpp)target_link_libraries(r3live_cam_cali_create_cali_board ${catkin_LIBRARIES} ${OpenCV_LIBRARIES})
endif()
  • 生成r3live_mapping可执行文件
add_executable(r3live_mapping src/r3live.cpp src/r3live_lio.cppsrc/loam/include/kd_tree/ikd_Tree.cppsrc/loam/include/FOV_Checker/FOV_Checker.cpp src/loam/IMU_Processing.cppsrc/rgb_map/offline_map_recorder.cpp#From VIOsrc/r3live_vio.cppsrc/optical_flow/lkpyramid.cppsrc/rgb_map/rgbmap_tracker.cppsrc/rgb_map/image_frame.cppsrc/rgb_map/pointcloud_rgbd.cpp)
target_link_libraries(r3live_mapping ${catkin_LIBRARIES}${Boost_LIBRARIES}${Boost_FILESYSTEM_LIBRARY}${Boost_SERIALIZATION_LIBRARY} #serialization${OpenCV_LIBRARIES}#${OpenMVS_LIBRARIES}pcl_common pcl_io) 
  • 生成r3live_meshing可执行文件
FIND_PACKAGE(CGAL REQUIRED)
if(CGAL_FOUND)include_directories(${CGAL_INCLUDE_DIRS})add_definitions(${CGAL_DEFINITIONS})link_directories(${CGAL_LIBRARY_DIRS})ADD_DEFINITIONS(-D_USE_BOOST -D_USE_EIGEN -D_USE_OPENMP)SET(_USE_BOOST TRUE)SET(_USE_OPENMP TRUE)SET(_USE_EIGEN TRUE)
#生成r3live_meshing可执行文件add_executable(r3live_meshing src/r3live_reconstruct_mesh.cpp                              src/rgb_map/image_frame.cppsrc/rgb_map/pointcloud_rgbd.cpp  # Commonsrc/meshing/MVS/Common/Common.cppsrc/meshing/MVS/Common/Log.cppsrc/meshing/MVS/Common/Timer.cppsrc/meshing/MVS/Common/Types.cppsrc/meshing/MVS/Common/Util.cpp# MVS                       src/meshing/MVS/Mesh.cppsrc/meshing/MVS/PointCloud.cppsrc/meshing/MVS/Camera.cppsrc/meshing/MVS/Platform.cppsrc/meshing/MVS/PLY.cppsrc/meshing/MVS/OBJ.cppsrc/meshing/MVS/IBFS.cpp)
target_link_libraries(r3live_meshing ${catkin_LIBRARIES}${Boost_LIBRARIES}${Boost_FILESYSTEM_LIBRARY}${Boost_SERIALIZATION_LIBRARY} # serialization${CGAL_LIBS}${OpenCV_LIBRARIES}${JPEG_LIBRARIES} gmppcl_common pcl_iopcl_kdtree)endif()

这篇关于R3live:整体分析的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/691668

相关文章

C++ Sort函数使用场景分析

《C++Sort函数使用场景分析》sort函数是algorithm库下的一个函数,sort函数是不稳定的,即大小相同的元素在排序后相对顺序可能发生改变,如果某些场景需要保持相同元素间的相对顺序,可使... 目录C++ Sort函数详解一、sort函数调用的两种方式二、sort函数使用场景三、sort函数排序

kotlin中const 和val的区别及使用场景分析

《kotlin中const和val的区别及使用场景分析》在Kotlin中,const和val都是用来声明常量的,但它们的使用场景和功能有所不同,下面给大家介绍kotlin中const和val的区别,... 目录kotlin中const 和val的区别1. val:2. const:二 代码示例1 Java

Go标准库常见错误分析和解决办法

《Go标准库常见错误分析和解决办法》Go语言的标准库为开发者提供了丰富且高效的工具,涵盖了从网络编程到文件操作等各个方面,然而,标准库虽好,使用不当却可能适得其反,正所谓工欲善其事,必先利其器,本文将... 目录1. 使用了错误的time.Duration2. time.After导致的内存泄漏3. jsO

Spring事务中@Transactional注解不生效的原因分析与解决

《Spring事务中@Transactional注解不生效的原因分析与解决》在Spring框架中,@Transactional注解是管理数据库事务的核心方式,本文将深入分析事务自调用的底层原理,解释为... 目录1. 引言2. 事务自调用问题重现2.1 示例代码2.2 问题现象3. 为什么事务自调用会失效3

找不到Anaconda prompt终端的原因分析及解决方案

《找不到Anacondaprompt终端的原因分析及解决方案》因为anaconda还没有初始化,在安装anaconda的过程中,有一行是否要添加anaconda到菜单目录中,由于没有勾选,导致没有菜... 目录问题原因问http://www.chinasem.cn题解决安装了 Anaconda 却找不到 An

Spring定时任务只执行一次的原因分析与解决方案

《Spring定时任务只执行一次的原因分析与解决方案》在使用Spring的@Scheduled定时任务时,你是否遇到过任务只执行一次,后续不再触发的情况?这种情况可能由多种原因导致,如未启用调度、线程... 目录1. 问题背景2. Spring定时任务的基本用法3. 为什么定时任务只执行一次?3.1 未启用

C++ 各种map特点对比分析

《C++各种map特点对比分析》文章比较了C++中不同类型的map(如std::map,std::unordered_map,std::multimap,std::unordered_multima... 目录特点比较C++ 示例代码 ​​​​​​代码解释特点比较1. std::map底层实现:基于红黑

Spring、Spring Boot、Spring Cloud 的区别与联系分析

《Spring、SpringBoot、SpringCloud的区别与联系分析》Spring、SpringBoot和SpringCloud是Java开发中常用的框架,分别针对企业级应用开发、快速开... 目录1. Spring 框架2. Spring Boot3. Spring Cloud总结1. Sprin

Spring 中 BeanFactoryPostProcessor 的作用和示例源码分析

《Spring中BeanFactoryPostProcessor的作用和示例源码分析》Spring的BeanFactoryPostProcessor是容器初始化的扩展接口,允许在Bean实例化前... 目录一、概览1. 核心定位2. 核心功能详解3. 关键特性二、Spring 内置的 BeanFactory

MyBatis-Plus中Service接口的lambdaUpdate用法及实例分析

《MyBatis-Plus中Service接口的lambdaUpdate用法及实例分析》本文将详细讲解MyBatis-Plus中的lambdaUpdate用法,并提供丰富的案例来帮助读者更好地理解和应... 目录深入探索MyBATis-Plus中Service接口的lambdaUpdate用法及示例案例背景