Advertisement

gvins小觅相机运行

阅读量:

该文本描述了一个基于GVINS的项目实现过程及其效果:通过find命令获取路径并配置visensorf9p.launch脚本中的相关参数(如相机内外参矩阵、IMU参数等),并提供了详细的配置信息(如myvisensorleftf9p_config.yaml文件内容)。项目运行包括启动主程序、可视化界面以及bag包播放功能,并未展示具体效果但表示表现极佳。

1.数据采集

参照之前博客

2.参数配置

  • visensor_f9p.launch
复制代码
    <launch>
    <arg name="config_path" default = "$(find gvins)/../config/visensor_f9p/my_visensor_left_f9p_config.yaml" />
    	  <arg name="gvins_path" default = "$(find gvins)/../" />
    
    <node name="gvins_feature_tracker" pkg="gvins_feature_tracker" type="gvins_feature_tracker" output="log">
        <param name="config_file" type="string" value="$(arg config_path)" />
        <param name="gvins_folder" type="string" value="$(arg gvins_path)" />
    </node>
    
    <node name="gvins" pkg="gvins" type="gvins" output="screen">
       <param name="config_file" type="string" value="$(arg config_path)" />
       <param name="gvins_folder" type="string" value="$(arg gvins_path)" />
    </node>
    
    </launch>
  • my_visensor_left_f9p_config.yaml
复制代码
    %YAML:1.0
    
    #common parameters
    imu_topic: "/mynteye/imu/data_raw"
    image_topic: "/mynteye/left/image_raw"
    #输出路径
    output_dir: "~/output/"
    
    #camera calibration 
    #MEI模型是一个常见的鱼眼相机模型参照https://zhuanlan.zhihu.com/p/414047132
    model_type: MEI
    camera_name: camera
    image_width: 752
    image_height: 480
    mirror_parameters:
       xi: 1.4456544769803834e+00
    #畸变参数
    distortion_parameters:
       k1: -3.4363053357673362e-01
       k2: 6.2347376791548004e-02
       p1: 1.2608078788285675e-03
       p2: -2.1374139252651483e-04
    #MEI模型投影参数(相机内参)
    projection_parameters:
       gamma1: 8.9594371861807986e+02
       gamma2: 8.9741581479032754e+02
       u0: 3.7221680816143993e+02
       v0: 2.3833534175557006e+02
    
    #GNSS相关参数
    gnss_enable: 1                                        # 是否启用GNSS
    gnss_meas_topic: "/ublox_driver/range_meas"           # GNSS raw measurement topic 原始观测topic
    gnss_ephem_topic: "/ublox_driver/ephem"               # GPS, Galileo, BeiDou ephemeris 星历topic
    gnss_glo_ephem_topic: "/ublox_driver/glo_ephem"       # GLONASS ephemeris 星历topic
    gnss_iono_params_topic: "/ublox_driver/iono_params"   # GNSS broadcast ionospheric parameters 电离层参数topic
    gnss_tp_info_topic: "/ublox_driver/time_pulse_info"   # PPS time info  秒脉冲时间输入topic
    gnss_elevation_thres: 30            # satellite elevation threshold (degree) 卫星高度角阈值
    gnss_psr_std_thres: 2.0             # pseudo-range std threshold 伪距标准阈值
    gnss_dopp_std_thres: 2.0            # doppler std threshold 多普勒标准阈值
    gnss_track_num_thres: 20            # number of satellite tracking epochs before entering estimator 进入估计之前所需要的卫星数量
    gnss_ddt_sigma: 0.1
    
    gnss_local_online_sync: 0                       # if perform online synchronization betwen GNSS and local time 在线时间对齐
    local_trigger_info_topic: "/external_trigger"   # external trigger info of the local sensor, if `gnss_local_online_sync` is 1 本地传感器的外部触发信息topic(在线标定时使用)
    gnss_local_time_diff: 18.0                      # difference between GNSS and local time (s), if `gnss_local_online_sync` is 0 本地时间和在线时间的固定偏差(不进行在线标定)
    
    gnss_iono_default_parameters: !!opencv-matrix
       rows: 1
       cols: 8
       dt: d
       data: [0.1118E-07,  0.2235E-07, -0.4172E-06,  0.6557E-06,
          0.1249E+06, -0.4424E+06,  0.1507E+07, -0.2621E+06]
    
    # Extrinsic parameter between IMU and Camera.是否进行外参的在线标定
    estimate_extrinsic: 0   # 0  Have an accurate extrinsic parameters. We will trust the following imu^R_cam, imu^T_cam, don't change it.
                        # 1  Have an initial guess about extrinsic parameters. We will optimize around your initial guess.
                        # 2  Don't know anything about extrinsic parameters. You don't need to give R,T. We will try to calibrate it. Do some rotation movement at beginning.                        
    #If you choose 0 or 1, you should write down the following matrix.填写相机和IMU的外参矩阵
    #Rotation from camera frame to imu frame, imu^R_cam 旋转 Rbc
    extrinsicRotation: !!opencv-matrix
       rows: 3
       cols: 3
       dt: d
       data: [ -1.1360710033169408e-02, -0.999935344575651, -0.000490852234533309, 
          0.999705711645175, -0.0113475759577674, -0.0214411432506691, 
         0.0214341869814383, -0.000734294393687238, 0.9997699917682]
    #Translation from camera frame to imu frame, imu^T_cam 平移
    extrinsicTranslation: !!opencv-matrix
       rows: 3
       cols: 1
       dt: d
       data: [-0.0443528772490427, -0.029308608173058, 0.0130366081213622]
    
    #feature traker paprameters 特征提取参数
    max_cnt: 150            # max feature number in feature tracking 追踪最大提取的特征点数量
    min_dist: 30            # min distance between two features 两个特征点的距离
    freq: 0                # frequence (Hz) of publish tracking result. At least 10Hz for good estimation. If set 0, the frequence will be same as raw image 设置追踪输出的频率
    F_threshold: 1.0        # ransac threshold (pixel) ransac阈值
    show_track: 1           # publish tracking image as topic 展示追踪图像
    equalize: 1             # if image is too dark or light, trun on equalize to find enough features 如果图像太亮或者太暗均衡画寻找足够的特征点
    fisheye: 0              # if using fisheye, trun on it. A circle mask will be loaded to remove edge noisy points 使用的是不是鱼眼相机,如果是使用圆形掩膜一处边缘的噪声点???????
    
    #optimization parameters
    #优化参数
    max_solver_time: 0.04  # max solver itration time (ms), to guarantee real time 求解器最大迭代时间0.04,保证实时性。
    max_num_iterations: 8   # max solver itrations, to guarantee real time 最大迭代次数,保证实时性
    keyframe_parallax: 10.0 # keyframe selection threshold (pixel)关键帧筛选阈值 10个像素,应该为了光流追踪的效果,超过10个像素建立关键帧优化。???????
    
    #imu parameters       The more accurate parameters you provide, the better performance IMU参数
    acc_n: 0.08          # accelerometer measurement noise standard deviation. #0.2   0.04
    gyr_n: 0.004         # gyroscope measurement noise standard deviation.     #0.05  0.004
    acc_w: 0.00004         # accelerometer bias random work noise standard deviation.  #0.02
    gyr_w: 2.0e-6       # gyroscope bias random work noise standard deviation.     #4.0e-5
    g_norm: 9.787561     # gravity magnitude
    
    #unsynchronization parameters
    estimate_td: 0                      # online estimate time offset between camera and imu 在线估计的相机IMU时间延迟
    td: 0.0                             # initial value of time offset. unit: s. readed image clock + td = real image clock (IMU clock)初始时间延迟,图像时间 + td=真实时间

3.运行

终端1:ros节点管理器

复制代码
    roscore

终端2:启动主程序

复制代码
    roslaunch gvins visensor_f9p.launch

终端3:可视化界面

复制代码
    source devel/setup.bash
    rviz -d ~/vinsg_ws/src/GVINS/config/gvins_rviz_config.rviz

终端4:bag包播放

复制代码
    rosbag play 202111093.bag

4.效果极好

效果过于惊人不便展示

全部评论 (0)

还没有任何评论哟~