首页 > 其他分享 >4DRadarSLAM方案部署

4DRadarSLAM方案部署

时间:2024-08-01 22:50:58浏览次数:13  
标签:方案 rosnoetic 部署 sudo slam 4DRadarSLAM g2o gtsam VirtualBox

4DRadarSLAM方案部署

参考教程:

GitHub - zhuge2333/4DRadarSLAM

cp - Google 云端硬盘

Ubuntu20.04LTS上运行4Dradar_slam_20.04 4dradar-CSDN博客

1. 查看系统环境

要运行本仿真程序,需要保证当前环境为ubuntu20.04+ros-noetic-desktop-full

查看ubuntu版本:

rosnoetic@rosnoetic-VirtualBox:~$ **lsb_release -a**

No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.6 LTS
**Release:	20.04**
Codename:	focal

可知,当前ubuntu版本满足20.04

查看ros版本:

rosnoetic@rosnoetic-VirtualBox:~$ **rosversion -d**

**noetic**

可知,当前ros版本满足noetic

2. 安装依赖

2.1 安装Eigen3

ctrl+alt+T打开终端,执行如下指令安装Eigen3

rosnoetic@rosnoetic-VirtualBox:~$ **sudo apt update**

rosnoetic@rosnoetic-VirtualBox:~$ **sudo apt install libeigen3-dev**

2.2 安装OpenMP

gcc自带的,如果没有直接安装gcc

可以运行下面这条指令,安装gcc(gcc,g++,camke一并全安装上)

rosnoetic@rosnoetic-VirtualBox:~$ **sudo apt install build-essential**

2.3 PCL安装

ctrl+alt+T打开终端,执行如下指令安装PCL

rosnoetic@rosnoetic-VirtualBox:~$ **sudo apt install libpcl-dev**

2.4 安装g2o

ctrl+alt+T打开终端,安装依赖项

rosnoetic@rosnoetic-VirtualBox:~$ **sudo apt-get install qt5-qmake qt5-default libqglviewer-dev-qt5 libsuitesparse-dev libcxsparse3 libcholmod3**

  • 依赖下载过程

下载源码:

GitHub - RainerKuemmerle/g2o: g2o: A General Framework for Graph Optimization

g2o-master.zip压缩包拖拽至虚拟机的主文件夹下

点击g2o-master.zip,右键,选择“提取到此处

g2o-master文件夹命名为g2o

执行如下指令编译g2o

rosnoetic@rosnoetic-VirtualBox:~$ **cd g2o/**

rosnoetic@rosnoetic-VirtualBox:~/g2o$ **mkdir build**

rosnoetic@rosnoetic-VirtualBox:~/g2o$ **cd build/**

rosnoetic@rosnoetic-VirtualBox:~/g2o/build$ **cmake ..**

  • cmake ..

rosnoetic@rosnoetic-VirtualBox:~/g2o/build$ **make -j4**

  • make -j4

rosnoetic@rosnoetic-VirtualBox:~/g2o/build$ **sudo make install**

  • sudo make install

2.5 安装gtsam

参考教程:

Ubuntu20.04安装GTSAM,运行LIO-SAM_gtsam4.0.3-CSDN博客

  • 增加交换空间

    首先关闭交换分区

    rosnoetic@rosnoetic-VirtualBox:~$ **sudo swapoff /swapfile**
    

    接着创建分区, 4 * 1024 = 4096创建 4 G 的内存分区

    rosnoetic@rosnoetic-VirtualBox:~$ **sudo dd if=/dev/zero of=/swapfile bs=1M count=4096**
    

    继续执行如下指令:

    rosnoetic@rosnoetic-VirtualBox:~$ **sudo mkswap /swapfile**
    
    rosnoetic@rosnoetic-VirtualBox:~$ **sudo swapon /swapfile**
    

    创建完交换分区之后就可以继续编译。

    也可以查看分区的大小

    rosnoetic@rosnoetic-VirtualBox:~$ **free -m**
    

编译若是还不成功,试着创建更大的分区。

如果编译使用完成后,可以关闭内存。

```cpp
rosnoetic@rosnoetic-VirtualBox:~$ **sudo swapoff /swapfile**

rosnoetic@rosnoetic-VirtualBox:~$ **sudo rm /swapfile**
```

进入如下链接下载gtsam压缩包,当前下载的是Release 4.2

Releases · borglab/gtsam (github.com)

gtsam压缩包拖拽至虚拟机的主文件夹下,

点击gtsam-4.2.zip,右键,选择“提取到此处

进入gtsam-4.2文件夹下,执行如下指令进行编译:

rosnoetic@rosnoetic-VirtualBox:~$ **cd gtsam-4.2/**

rosnoetic@rosnoetic-VirtualBox:~/gtsam-4.2$ **mkdir build**

rosnoetic@rosnoetic-VirtualBox:~/gtsam-4.2$ **cd build/**

rosnoetic@rosnoetic-VirtualBox:~/gtsam-4.2/build$ **cmake ..**

  • cmake ..

rosnoetic@rosnoetic-VirtualBox:~/gtsam-4.2/build$ **make**

  • make -j4

rosnoetic@rosnoetic-VirtualBox:~/gtsam-4.2/build$ **sudo make install** 

  • sudo make install

2.6 安装依赖

ctrl+alt+T打开终端,执行如下指令安装依赖:

rosnoetic@rosnoetic-VirtualBox:~$ **sudo apt-get install ros-noetic-geodesy ros-noetic-pcl-ros ros-noetic-nmea-msgs ros-noetic-libg2o**

  • 安装依赖

3. 编译4DRadarSLAM

3.1 创建工作空间

ctrl+alt+T打开终端,执行如下指令创建工作空间

rosnoetic@rosnoetic-VirtualBox:~$ **mkdir -p 4dradar_slam_ws/src**

3.2 源码下载

下载4DRadarSLAMfast_apdgicpbarometer_bmp388ndt_omp源码:

当前为了去掉压缩包里面的master字眼,我们人为的对压缩包进行重命名,并压缩:

7z压缩包拖拽至/4dradar_slam_ws/src文件夹下,点击压缩包,右键,选择”提取到此处”:

3.3 编译

ctrl+alt+T打开终端,执行如下指令编译程序:

rosnoetic@rosnoetic-VirtualBox:~$ **cd 4dradar_slam_ws/**

rosnoetic@rosnoetic-VirtualBox:~/4dradar_slam_ws$ **catkin_make**

  • catkin_make

4. 运行4DRadarSLAM

4.1 添加数据集

进入如下链接,下载数据集:

https://drive.google.com/drive/folders/14jVa_dzmckVMDdfELmY32fJlKrZG1Afv

把作者提供的数据集下载下来,ctrl+alt+T打开终端,执行如下指令创建一个文件夹carpark_400

rosnoetic@rosnoetic-VirtualBox:~$ **mkdir carpark_400**

carpark1_2022-02-26.bag数据集拖拽至carpark_400文件夹:

修改launch文件夹中 rosbag_play_radar_carpark1.launch 文件中路径

<arg name="path" default="/home/rosnoetic/"/>

4.2 运行

ctrl+alt+T打开终端,执行如下指令启动slam程序:

rosnoetic@rosnoetic-VirtualBox:~$ **cd 4dradar_slam_ws/**

rosnoetic@rosnoetic-VirtualBox:~/4dradar_slam_ws$ **source ./devel/setup.bash**

rosnoetic@rosnoetic-VirtualBox:~/4dradar_slam_ws$ **roslaunch radar_graph_slam radar_graph_slam.launch** 

  • radar_graph_slam.launch

    <?xml version="1.0"?>
    <launch>
      <!-- Parameters -->
      <rosparam file="$(find radar_graph_slam)/config/params.yaml" command="load" />
      <param name="use_sim_time" value="true"/>
      
      <!-- arguments -->
      <arg name="nodelet_manager" default="radarslam_nodelet_manager" />
      <arg name="enable_floor_detection" default="false" />
      <arg name="enable_barometer" default="false" /> <!-- barometer altitude constraint, not used -->
      <arg name="barometer_edge_type" default="1" /> <!-- not used -->
      <arg name="enable_gps" default="false" />
      <arg name="enable_dynamic_object_removal" default="false" />
      <arg name="enable_frontend_ego_vel" default="false" />
      <arg name="enable_preintegration" default="false" /> <!-- not used -->
    
      <arg name="keyframe_delta_trans_front_end" default="0.5" />
      <arg name="keyframe_delta_trans_back_end" default="2" /><!-- 1 2 -->
      <arg name="keyframe_delta_angle" default="0.2612" /><!-- 10°: 0.1745 15°: 0.2612 -->
    
      <arg name="enable_transform_thresholding" default="true" />
      <arg name="enable_loop_closure" default="false" />
      
      <!-- ICP NDT_OMP FAST_GICP FAST_APDGICP FAST_VGICP   -->
      <arg name="registration_method" default="FAST_APDGICP" />
      <arg name="reg_resolution" default="1.0" />
      
      <arg name="dist_var" default="0.86" />
      <arg name="azimuth_var" default="0.5" />
      <arg name="elevation_var" default="1.0" /><!-- 1.0 -->
    
      <!-- optional arguments -->
      <arg name="enable_robot_odometry_init_guess" default="false" /> <!-- not used -->
    
      <!-- transformation between lidar and base_link -->
      <!-- <node pkg="tf" type="static_transform_publisher" name="lidar2base_publisher" args="0 0 0 0 0 0 base_link velodyne 10" /> -->
      
      <node pkg="nodelet" type="nodelet" name="$(arg nodelet_manager)" args="manager" output="screen"/>
    
      <!-- radar_preprocessing_nodelet -->
      <node pkg="nodelet" type="nodelet" name="radar_preprocessing_nodelet" args="load radar_graph_slam/PreprocessingNodelet $(arg nodelet_manager)">
        <!-- distance filter -->
        <param name="use_distance_filter" value="true" />
        <param name="distance_near_thresh" value="2" />
        <param name="distance_far_thresh" value="100.0" />
        <param name="z_low_thresh" value="-100.0" />
        <param name="z_high_thresh" value="100.0" />
        <!-- NONE, VOXELGRID(0.1), or APPROX_VOXELGRID -->
        <param name="downsample_method" value="VOXELGRID" />
        <param name="downsample_resolution" value="0.1" />
        <!-- NONE, RADIUS 2(initial 0.5 2), STATISTICAL, or BILATERAL -->
        <param name="outlier_removal_method" value="RADIUS" />
        <param name="statistical_mean_k" value="30" />
        <param name="statistical_stddev" value="1.2" />
        <param name="radius_radius" value="0.5" />
        <param name="radius_min_neighbors" value="1" />
        <param name="bilateral_sigma_s" value="5" />
        <param name="bilateral_sigma_r" value="0.03" />
        <!-- Power Filterring -->
        <param name="power_threshold" value="0.0" />
        <!-- Ego Velocity Estimation -->
        <param name="enable_dynamic_object_removal" value="$(arg enable_dynamic_object_removal)" />
        <!-- ground truth publication -->
        <param name="gt_file_location" value="/home/zhuge/datasets/Radar/gt_carpark1.txt" />
      </node>
    
      <!-- scan_matching_odometry_nodelet -->
      <node pkg="nodelet" type="nodelet" name="scan_matching_odometry_nodelet" args="load radar_graph_slam/ScanMatchingOdometryNodelet $(arg nodelet_manager)">
        <param name="keyframe_delta_trans" value="$(arg keyframe_delta_trans_front_end)" />
        <param name="keyframe_delta_angle" value="$(arg keyframe_delta_angle)" /> 
        <param name="keyframe_min_size" value="100" />
        <param name="enable_robot_odometry_init_guess" value="$(arg enable_robot_odometry_init_guess)" />
        <param name="enable_transform_thresholding" value="$(arg enable_transform_thresholding)" />
        <param name="enable_imu_thresholding" value="false" /> <!-- bad effect, not used -->
        <param name="max_acceptable_trans" value="1.0" />
        <param name="max_acceptable_angle" value="3" /><!-- degree -->
        <param name="max_diff_trans" value="0.3" />
        <param name="max_diff_angle" value="0.8" />
        <param name="max_egovel_cum" value="1" /><!-- 12m/s -->
        <param name="downsample_method" value="NONE" />
        <param name="downsample_resolution" value="0.1" />
        <!-- ICP, GICP, NDT, GICP_OMP, NDT_OMP, FAST_GICP(recommended), or FAST_VGICP -->
        <param name="registration_method" value="$(arg registration_method)" />
        <param name="dist_var" value="$(arg dist_var)" /><!--  -->
        <param name="azimuth_var" value="$(arg azimuth_var)" /><!--  -->
        <param name="elevation_var" value="$(arg elevation_var)" /><!--  -->
        <param name="reg_num_threads" value="0" />
        <param name="reg_transformation_epsilon" value="0.1"/>
        <param name="reg_maximum_iterations" value="64"/>
        <param name="reg_max_correspondence_distance" value="2.0"/>
        <param name="reg_max_optimizer_iterations" value="20"/>
        <param name="reg_use_reciprocal_correspondences" value="false"/>
        <param name="reg_correspondence_randomness" value="20"/>
        <param name="reg_resolution" value="$(arg reg_resolution)" />
        <param name="reg_nn_search_method" value="DIRECT7" />
        <param name="use_ego_vel" value="$(arg enable_frontend_ego_vel)"/>
        <param name="max_submap_frames" value="5"/>
        <param name="enable_scan_to_map" value="false"/>
        <!-- IMU --> <!-- bad effect, not used -->
        <param name="enable_imu_fusion" value="false" />
        <param name="imu_debug_out" value="true" />
        <param name="imu_fusion_ratio" value="0.1" />
      </node>
    
      <!-- radar_graph_slam_nodelet -->
      <node pkg="nodelet" type="nodelet" name="radar_graph_slam_nodelet" args="load radar_graph_slam/RadarGraphSlamNodelet $(arg nodelet_manager)" output="screen">
        <!-- optimization params -->
        <!-- typical solvers: gn_var, gn_fix6_3, gn_var_cholmod, lm_var, lm_fix6_3, lm_var_cholmod, ... -->
        <param name="g2o_solver_type" value="lm_var_cholmod" />
        <param name="g2o_solver_num_iterations" value="512" />
        <!-- constraint switches -->
        <param name="enable_barometer" value="$(arg enable_barometer)" /> <!-- not used -->
        <param name="enable_gps" value="$(arg enable_gps)" />
        <!-- keyframe registration params --> 
        <param name="max_keyframes_per_update" value="30" />
        <param name="keyframe_delta_trans" value="$(arg keyframe_delta_trans_back_end)" />
        <param name="keyframe_delta_angle" value="$(arg keyframe_delta_angle)" />
        <param name="keyframe_min_size" value="500" />
        <!-- fix first node for optimization stability -->
        <param name="fix_first_node" value="true"/>
        <param name="fix_first_node_stddev" value="10 10 10 1 1 1"/>
        <param name="fix_first_node_adaptive" value="true"/>
        <!-- Scan Context Loop Closure params 15 25 15 2.5 -->
        <param name="enable_loop_closure" value="$(arg enable_loop_closure)"/>
        <param name="enable_pf" value="true"/> <!-- loop prefiltering -->
        <param name="enable_odom_check" value="true"/>
        <param name="distance_thresh" value="10.0" />
        <param name="accum_distance_thresh" value="50.0" /><!-- Minimum distance beteen two edges of the loop -->
        <param name="min_loop_interval_dist" value="10.0" /><!-- Minimum distance between a new loop edge and the last one -->
        <param name="distance_from_last_edge_thresh" value="10" />
        <param name="max_baro_difference" value="2.0" /><!-- Maximum altitude difference beteen two edges' odometry -->
        <param name="max_yaw_difference" value="20" /><!-- Maximum yaw difference beteen two edges' odometry -->
        
        <param name="sc_dist_thresh" value="0.5" /><!-- Matching score threshold of Scan Context 0.4-0.6 will be good -->
        <param name="sc_azimuth_range" value="56.5" />
        <param name="historyKeyframeFitnessScore" value="6" />
        <param name="odom_check_trans_thresh" value="0.3" />
        <param name="odom_check_rot_thresh" value="0.05" />
        <param name="pairwise_check_trans_thresh" value="1.5" />
        <param name="pairwise_check_rot_thresh" value="0.2" />
        <!-- scan matching params -->
        <param name="registration_method" value="$(arg registration_method)" />
        <param name="reg_num_threads" value="0" />
        <param name="reg_transformation_epsilon" value="0.1"/>
        <param name="reg_maximum_iterations" value="64"/>
        <param name="reg_max_correspondence_distance" value="2.0"/>
        <param name="reg_max_optimizer_iterations" value="20"/>
        <param name="reg_use_reciprocal_correspondences" value="false"/>
        <param name="reg_correspondence_randomness" value="20"/>
        <param name="reg_resolution" value="$(arg reg_resolution)" />
        <param name="reg_nn_search_method" value="DIRECT7" />
        <!-- edge params -->
        <!-- Barometer not used -->
        <param name="barometer_edge_type" value="$(arg barometer_edge_type)" />
        <param name="barometer_edge_robust_kernel" value="Huber" />
        <param name="barometer_edge_robust_kernel_size" value="1.0" />
        <param name="barometer_edge_stddev" value="0.47" /> <!-- 0.47 -->
        <!-- GPS -->
        <param name="gps_edge_robust_kernel" value="Huber" />
        <param name="gps_edge_robust_kernel_size" value="1.0" />
        <param name="gps_edge_stddev_xy" value="5.0" />
        <param name="gps_edge_stddev_z" value="5.0" />
        <param name="max_gps_edge_stddev_xy" value="1.5" />
        <param name="max_gps_edge_stddev_z" value="3.0" />
        <param name="gps_edge_intervals" value="15" />
        <param name="dataset_name" value="loop2" />
        <!-- Preintegration --> <!-- bad effect, not used -->
        <param name="enable_preintegration" value="$(arg enable_preintegration)" />
          <param name="use_egovel_preinteg_trans" value="false" /><!-- Ego Velocity Integration - Translation -->
          <param name="preinteg_orient_stddev" value="1" />
          <param name="preinteg_trans_stddev" value="5" />
        <!-- scan matching -->
        <!-- robust kernels: NONE, Cauchy, DCS, Fair, GemanMcClure, Huber, PseudoHuber, Saturated, Tukey, Welsch -->
        <param name="odometry_edge_robust_kernel" value="NONE" />
        <param name="odometry_edge_robust_kernel_size" value="1.0" />
        <param name="loop_closure_edge_robust_kernel" value="Huber" />
        <param name="loop_closure_edge_robust_kernel_size" value="1.0" />
        <param name="use_const_inf_matrix" value="false" />
        <param name="const_stddev_x" value="0.5" />
        <param name="const_stddev_q" value="0.1" />
        <param name="var_gain_a" value="20.0" />
        <param name="min_stddev_x" value="0.1" />
        <param name="max_stddev_x" value="5.0" />
        <param name="min_stddev_q" value="0.05" />
        <param name="max_stddev_q" value="0.2" />
        <!-- update params -->
        <param name="graph_update_interval" value="2.0" />
        <param name="map_cloud_update_interval" value="6.0" />
        <param name="map_cloud_resolution" value="0.05" />
        <!-- marker params -->
        <param name="show_sphere" value="false" />
      </node>
    
      <node pkg="rviz" type="rviz" name="rviz_slam" args="-d $(find radar_graph_slam)/rviz/radar_graph_slam.rviz" respawn="true"/>
    
      <!--- Rosbag Play -->
      **<include file="$(find radar_graph_slam)/launch/rosbag_play_radar_carpark1.launch" />**
      <!-- <include file="$(find radar_graph_slam)/launch/rosbag_play_radar_carpark3.launch" /> -->
      <!-- <include file="$(find radar_graph_slam)/launch/rosbag_play_radar_garden.launch" /> -->
      <!-- <include file="$(find radar_graph_slam)/launch/rosbag_play_radar_nanyanglink.launch" /> -->
      <!-- <include file="$(find radar_graph_slam)/launch/rosbag_play_radar_ntuloop1.launch" /> -->
      <!-- <include file="$(find radar_graph_slam)/launch/rosbag_play_radar_ntuloop2.launch" /> -->
      <!-- <include file="$(find radar_graph_slam)/launch/rosbag_play_radar_ntuloop3.launch" /> -->
      <!-- <include file="$(find radar_graph_slam)/launch/rosbag_play_radar_smoke.launch" /> -->
    
    </launch>
    
    

标签:方案,rosnoetic,部署,sudo,slam,4DRadarSLAM,g2o,gtsam,VirtualBox
From: https://www.cnblogs.com/windandchimes/p/18337732

相关文章

  • 大文件上传最全方案!!【送源码】
    文件上传是一个老生常谈的话题了,在文件相对比较小的情况下,可以直接把文件转化为字节流上传到服务器,但在文件比较大的情况下,用普通的方式进行上传,这可不是一个好的办法,毕竟很少有人会忍受,当文件上传到一半中断后,继续上传却只能重头开始上传,这种让人不爽的体验。那有没有比较好的......
  • 基于SpringBoot+Vue+uniapp的横向课题信息管理系统的详细设计和实现(源码+lw+部署文档
    文章目录前言详细视频演示具体实现截图技术栈后端框架SpringBoot前端框架Vue持久层框架MyBaitsPlus系统测试系统测试目的系统功能测试系统测试结论为什么选择我代码参考数据库参考源码获取前言......
  • 基于Java+SpringBoot+Vue的电竞交互管理系统设计与实现(源码+lw+部署文档+讲解等)
    文章目录前言项目运行截图技术框架后端采用SpringBoot框架前端框架Vue可行性分析系统测试系统测试的目的系统功能测试数据库表设计代码参考数据库脚本为什么选择我?获取源码前言......
  • faster whisper部署
     我下载的模型是Systran/faster-whisper-large-v3  BTW:V3在huggingface上托管者是systran,而前面的都是GuillaumeKlein然后我看了下这个大佬的github,是苹果法国巴黎工程师,同时是systran的成员,主要贡献是开发了CTranslate2 ,一个用于加速transformers模型推理的组件以下为......
  • 【问题解决方案】npm install报错问题:npm ERR! - 多种解决方案,总有一种可以解决
    @[toc]1.问题重述安装package.json里面的包,使用npminstall但是报错2.解决方案方案1.确认根目录正确确认自己的目录是根目录(也就是处于./package.json可以找到的位置)例如--根目录----package.json----其他文件----其他文件方案2.确认文件名正确确认自己的pack......
  • 【nginx网站部署】【nginx部署网站】【linux-nginx】静态页面部署 静态网站部署 nginx
    ============================================第一步:安装:===============================1、安装:sudoapt-getinstallnginx 输入y2、测试是否成功: sudonginx-t 输出: nginx:theconfigurationfile/etc/nginx/nginx.confsyntaxisok nginx:config......
  • 为团队配置Linux环境,简单高效的项目共享方案
    前言最近好久没写博客了,事情太多了,我还搞了个新的好玩的项目,等后续做得差不多了来写篇文章介绍一下。在我们目前的AI项目中,团队需要共同使用一台GPU服务器来做模型训练和数据处理。为了让每个团队成员都能高效地使用这台服务器,我们决定设置一个多用户共享环境。这样,无论是代码开......
  • 餐饮卫生数字化防线:EasyCVR明厨亮灶/透明厨房/阳光厨房视频监管方案
    近期有新闻报道,某互联网大厂办事处发生了一起大规模食物中毒事件,导致近60人住院。餐饮食品卫生安全直接关系到人民群众的身体健康和生命安全,是社会关注的焦点。传统的监管方式往往依赖于人力巡查和抽检,存在效率低、覆盖面窄、反应滞后等问题。因此,借助现代信息技术,特别是TSINGSEE......
  • 家用血压计电子方案pcba研发
    血压仪,又称血压计,是一种专门用于测量人体血压水平的医疗设备。现代化血压计设备已深度融合了智能技术,其利用先进的传感器和通信技术,测量和检测用户的血压值,为临床诊断、疾病预防、健康管理提供关键数据。血压计的工作原理是通过检测血管内血液对血管壁的压力来测量血压的,它通......
  • centos在线安装部署2024年最新的docker版本
    1.yum包更新到最新sudoyumupdate-y2.安装依赖软件包sudoyuminstall-yyum-utilsdevice-mapper-persistent-datalvm23.添加阿里的镜像,下载镜像速度比较快sudoyum-config-manager--add-repohttp://mirrors.aliyun.com/docker-ce/linux/centos/docker-c......