我是靠谱客的博主 含糊微笑,最近开发中收集的这篇文章主要介绍rf2o_laser_odometry和robot_localizationrf2o_laser_odometryrobot_localization34,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

功能包

  • rf2o_laser_odometry
  • robot_localization

rf2o_laser_odometry

代码地址 :`https://github.com/MAPIRlab/mapir-ros-pkgs`

rf2o_laser_odometry相当于激光里程计

在这里插入图片描述----------------------------------------------------------------------------------------------

robot_localization

代码地址:https://github.com/cra-ros-pkg/robot_localization
参考使用:https://www.freesion.com/article/51831322254/#_1

robot_localization是状态估计节点的集合
robot_localization是状态估计节点的集合

在robot_localization包中包含了两个状态估计节点

(1)ekf_localization_node 是一个扩展卡尔曼估计器,它使用一个三维测量模型随着时间生成状态,同时利用感知数据校正已经监测过的估计。

ekf_se_map:
  frequency: 20
  sensor_timeout: 1
  two_d_mode: true
  transform_time_offset: 0.0
  transform_timeout: 0.0
  print_diagnostics: false
  debug: false
  use_control: false

  map_frame: map
  odom_frame: odom
  base_link_frame: base_link
  world_frame: map
  
  odom0: /car/navsat_transform_map/odom
  odom0_config: [true, true, false,
                 false, false, false,
                 false,  false, false,
                 false, false, false,
                 false, false, false]
  odom0_queue_size: 1
  odom0_nodelay: true
  odom0_differential: false
  odom0_relative: false
  odom0_remove_gravitational_acceleration: true

  imu0: /car/imu
  imu0_config: [false, false, false,
                false, false, true,
                false, false, false,
                false, false, true,
                true,  false, false]
  imu0_nodelay: false
  imu0_differential: false
  imu0_relative: false
  imu0_queue_size: 1
  imu0_remove_gravitational_acceleration: true

  process_noise_covariance: [1e-3, 0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                             0,    1e-3, 0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                             0,    0,    1e-3, 0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                             0,    0,    0,    0.3,  0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                             0,    0,    0,    0,    0.3,  0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                             0,    0,    0,    0,    0,    0.01, 0,     0,     0,    0,    0,    0,    0,    0,    0,
                             0,    0,    0,    0,    0,    0,    0.5,   0,     0,    0,    0,    0,    0,    0,    0,
                             0,    0,    0,    0,    0,    0,    0,     0.5,   0,    0,    0,    0,    0,    0,    0,
                             0,    0,    0,    0,    0,    0,    0,     0,     0.1,  0,    0,    0,    0,    0,    0,
                             0,    0,    0,    0,    0,    0,    0,     0,     0,    0.3,  0,    0,    0,    0,    0,
                             0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0.3,  0,    0,    0,    0,
                             0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0.3,  0,    0,    0,
                             0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0.3,  0,    0,
                             0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0.3,  0,
                             0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0.3]

  initial_estimate_covariance: [1e-9, 0,    0,    0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
                                0,    1e-9, 0,    0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
                                0,    0,    1e-9, 0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
                                0,    0,    0,    1.0,  0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
                                0,    0,    0,    0,    1.0,  0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
                                0,    0,    0,    0,    0,    1e-9, 0,    0,    0,    0,     0,     0,     0,    0,    0,
                                0,    0,    0,    0,    0,    0,    1.0,  0,    0,    0,     0,     0,     0,    0,    0,
                                0,    0,    0,    0,    0,    0,    0,    1.0,  0,    0,     0,     0,     0,    0,    0,
                                0,    0,    0,    0,    0,    0,    0,    0,    1.0,  0,     0,     0,     0,    0,    0,
                                0,    0,    0,    0,    0,    0,    0,    0,    0,    1.0,   0,     0,     0,    0,    0,
                                0,    0,    0,    0,    0,    0,    0,    0,    0,    0,     1.0,   0,     0,    0,    0,
                                0,    0,    0,    0,    0,    0,    0,    0,    0,    0,     0,     1.0,   0,    0,    0,
                                0,    0,    0,    0,    0,    0,    0,    0,    0,    0,     0,     0,     1.0,  0,    0,
                                0,    0,    0,    0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    1.0,  0,
                                0,    0,    0,    0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    1.0]
  

ekf_se_odom:
  frequency: 20
  sensor_timeout: 0.1
  two_d_mode: true #平面设置为true
  transform_time_offset: 0.0 #生成时间戳要用
  transform_timeout: 0.0
  print_diagnostics: false #如果为True则向/diagnostics话题发布数据,用于调试程序
  debug: false
  use_control: false #会监听/cmd_vel的geometry_msgs/Twist信息

  map_frame: map
  odom_frame: car/odom
  base_link_frame: car/base_link
  world_frame: car/odom
  
  imu0: /car/imu
    imu0_config: [false, false, false,
                false, false, true,
                false, false, false,
                false, false, true,
                false,  false, false]
  imu0_nodelay: false
  imu0_differential: false
  imu0_relative: false
  imu0_queue_size: 1
  imu0_remove_gravitational_acceleration: true

process_noise_covariance: [1e-3, 0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                             0,    1e-3, 0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                             0,    0,    1e-3, 0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                             0,    0,    0,    0.3,  0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                             0,    0,    0,    0,    0.3,  0,    0,     0,     0,    0,    0,    0,    0,    0,    0,
                             0,    0,    0,    0,    0,    0.01, 0,     0,     0,    0,    0,    0,    0,    0,    0,
                             0,    0,    0,    0,    0,    0,    0.5,   0,     0,    0,    0,    0,    0,    0,    0,
                             0,    0,    0,    0,    0,    0,    0,     0.5,   0,    0,    0,    0,    0,    0,    0,
                             0,    0,    0,    0,    0,    0,    0,     0,     0.1,  0,    0,    0,    0,    0,    0,
                             0,    0,    0,    0,    0,    0,    0,     0,     0,    0.3,  0,    0,    0,    0,    0,
                             0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0.3,  0,    0,    0,    0,
                             0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0.3,  0,    0,    0,
                             0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0.3,  0,    0,
                             0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0.3,  0,
                             0,    0,    0,    0,    0,    0,    0,     0,     0,    0,    0,    0,    0,    0,    0.3]

  initial_estimate_covariance: [1e-9, 0,    0,    0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
                                0,    1e-9, 0,    0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
                                0,    0,    1e-9, 0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
                                0,    0,    0,    1.0,  0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
                                0,    0,    0,    0,    1.0,  0,    0,    0,    0,    0,     0,     0,     0,    0,    0,
                                0,    0,    0,    0,    0,    1e-9, 0,    0,    0,    0,     0,     0,     0,    0,    0,
                                0,    0,    0,    0,    0,    0,    1.0,  0,    0,    0,     0,     0,     0,    0,    0,
                                0,    0,    0,    0,    0,    0,    0,    1.0,  0,    0,     0,     0,     0,    0,    0,
                                0,    0,    0,    0,    0,    0,    0,    0,    1.0,  0,     0,     0,     0,    0,    0,
                                0,    0,    0,    0,    0,    0,    0,    0,    0,    1.0,   0,     0,     0,    0,    0,
                                0,    0,    0,    0,    0,    0,    0,    0,    0,    0,     1.0,   0,     0,    0,    0,
                                0,    0,    0,    0,    0,    0,    0,    0,    0,    0,     0,     1.0,   0,    0,    0,
                                0,    0,    0,    0,    0,    0,    0,    0,    0,    0,     0,     0,     1.0,  0,    0,
                                0,    0,    0,    0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    1.0,  0,
                                0,    0,    0,    0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    1.0]

(2) ukf_localization_node 是一个无迹卡尔曼滤波估计器,它使用一系列sigma点通过非线性变换生成状态,并使用这些估计过的sigma点覆盖状态估计点和协方差,这个估计使用雅克比矩阵并使得估计器更加稳定。然而缺点是比ekf_localization_node耗费更大的计算量。

(3)navsat_transform_node节点

navsat_transform:
  frequency: 20
  #计算从GPS坐标到机器人世界坐标的转换之前等待的时间(秒)。
  delay: 0.0 
  
  #此参数指如果尚不可用坐标转换,需要等待的时间,默认为0,不等待
  #The value 0 means we just get us the latest available (see tf2 implementation) transform,
  transform_timeout: 1.0 

 #如果您的IMU未考虑磁偏角,请在此处输入您所在位置的值。如果你不知道,
 #此参数是必需的。
 #看http://www.ngdc.noaa.gov/geomag-web/(请确保将该值转换为弧度)。
 # For lat/long 55.944831, -3.186998
  magnetic_declination_radians: 0  
 
 #IMU的偏航,一旦magentic_declination_radians值被添加到它
 #当面向东方时,应该报告0。如果是
 #如果没有,请在此处输入偏移量。默认值为0。 
  yaw_offset: 0 
  
  #如果这是真的,则输出里程计信息中的高度设置为0。默认为false。
  zero_altitude: true
  
  #如果这是真的,将广播变换world_frame->utm变换以供其他节点使用。
  #默认为false。
  broadcast_utm_transform: false
  
  #如果这是真的,将发布utm->world_frame变换,而不是world_frame->utm变换。
  #请注意,仍然必须启用广播utm转换。默认为false。
  broadcast_utm_transform_as_parent_frame: false  

 #如果为true,navsat_transform_节点也会将机器人的世界坐标系(如地图)
 #位置转换回GPS坐标,
 #并在/GPS/filtered主题上发布sensor_msgs/NavSatFix消息。  
  publish_filtered_gps: true 
  
  use_odometry_yaw: false
  wait_for_datum: true # 设置为false,下方datum不需要定义,每次加载出来的小车起点都在地图的起点处!为true时,datum的经纬读就是地图的起点,小车的位置要和datum的经纬度比较。
  #datum: [34.8063928, 113.4973400, 0.0] #定义起点处经纬度
  #datum: [31.75669642, 117.18576584, 0.0]
  datum: [31.756573,117.18815044,0.0]

/*-----------------------------------------------------------------------------------------------/

在官方文件中 params/dual_ekf_navsat_example.yaml包含了navsat_transform和ekf_se_odom 直接加载即可

<rosparam command="load" file="$(find robot_localization)/params/dual_ekf_navsat_example.yaml" />

整体架构
在这里插入图片描述节点的关系
在这里插入图片描述在这里插入图片描述

最后

以上就是含糊微笑为你收集整理的rf2o_laser_odometry和robot_localizationrf2o_laser_odometryrobot_localization34的全部内容,希望文章能够帮你解决rf2o_laser_odometry和robot_localizationrf2o_laser_odometryrobot_localization34所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(39)

评论列表共有 0 条评论

立即
投稿
返回
顶部