SBG ROS 节点 时间戳 话题

1. 概述

阅读SBG在ROS下IMU节点源代码,将有用的部分总结一下,主要是时间戳以及topic的处理。

2. 参数设置

SBG节点提供了较多的launch文件,分别对应不同的传感器,如下

robots@Robots-ubuntu1604:~/catkin_ws$ roslaunch sbg_driver sbg_
sbg_device.launch                  sbg_ellipseE.launch
sbg_device_mag_calibration.launch  sbg_ellipseN.launch
sbg_ellipseA.launch  

对于sbg_device.launch应该适合所有传感器,而对于其他的launch文件会有一些设置上的差异,sbg_device.launch会载入参数信息 /config/sbg_device_uart_default.yaml

# Configuration file for SBG device through an Uart interface.

# Configuration of the device with ROS.
confWithRos: false

# Uart configuration
uartConf:
  # Port Name
  portName: "/dev/sbg"

  # Baude rate (4800 ,9600 ,19200 ,38400 ,115200 [default],230400 ,460800 ,921600)
  baudRate: 115200

  # Port Id
  # 0 PORT_A: Main communication interface. Full duplex.
  # 1 PORT_B: Auxiliary input interface for RTCM
  # 2 PORT_C: Auxiliary communication interface. Full duplex.
  # 3 PORT_D: Auxiliary input interface
  # 4 PORT_E: Auxiliary input/output interface
  portID: 0

# Sensor Parameters
sensorParameters:
  # Initial latitude (°)
  initLat: 48.419727
  # Initial longitude (°)
  initLong: -4.472119
  # Initial altitude (above WGS84 ellipsoid) (m)
  initAlt: 100.0
  # Year at startup
  year: 2018
  # month in year at startup
  month: 03
  # day in month at startup
  day: 10

  # Montion profile ID
  # 1 GENERAL_PURPOSE Should be used as a default when other profiles do not apply
  # 2 AUTOMOTIVE      Dedicated to car applications
  # 3 MARINE          Used in marine and underwater applications
  # 4 AIRPLANE        For fixed wings aircraft
  # 5 HELICOPTER      For rotary wing aircraft
  motionProfile: 1

# IMU_ALIGNMENT_LEVER_ARM
imuAlignementLeverArm:
  # IMU X axis direction in vehicle frame
  # 0 ALIGNMENT_FORWARD   IMU Axis is turned in vehicle's forward direction
  # 1 ALIGNMENT_BACKWARD  IMU Axis is turned in vehicle's backward direction
  # 2 ALIGNMENT_LEFT      IMU Axis is turned in vehicle's left direction
  # 3 ALIGNMENT_RIGHT     IMU Axis is turned in vehicle's right direction
  # 4 ALIGNMENT_UP        IMU Axis is turned in vehicle's up direction
  # 5 ALIGNMENT_DOWN      IMU Axis is turned in vehicle's down direction
  axisDirectionX: 0
  # IMU Y axis direction in vehicle frame
  # 0 ALIGNMENT_FORWARD   IMU Axis is turned in vehicle's forward direction
  # 1 ALIGNMENT_BACKWARD  IMU Axis is turned in vehicle's backward direction
  # 2 ALIGNMENT_LEFT      IMU Axis is turned in vehicle's left direction
  # 3 ALIGNMENT_RIGHT     IMU Axis is turned in vehicle's right direction
  # 4 ALIGNMENT_UP        IMU Axis is turned in vehicle's up direction
  # 5 ALIGNMENT_DOWN      IMU Axis is turned in vehicle's down direction
  axisDirectionY: 3
  # Residual roll error after axis alignment rad
  misRoll: 0
  # Residual pitch error after axis alignment rad
  misPitch: 0
  # Residual yaw error after axis alignment rad
  misYaw: 0
  # X Primary lever arm in IMU X axis (once IMU alignment is applied) m
  leverArmX: 0
  # Y Primary lever arm in IMU Y axis (once IMU alignment is applied) m
  leverArmY: 0
  # Z Primary lever arm in IMU Z axis (once IMU alignment is applied) m
  leverArmZ: 0

# AIDING_ASSIGNMENT
# Note: GNSS1 module configuration can only be set to an external port on Ellipse-E version.
# Ellipse-N users must set this module to MODULE_INTERNAL. On the other hand, rtcmModule is only
# available for Ellipse-N users. This module must be set to MODULE_DISABLED for other users.
aidingAssignment:
  # GNSS module port assignment:
  # 255 Module is disabled
  # 1 Module connected on PORT_B
  # 2 Module connected on PORT_C
  # 3 Module connected on PORT_D
  # 5 Module is connected internally
  gnss1ModulePortAssignment: 255
  # GNSS module sync assignment:
  # 0 Module is disabled
  # 1 Synchronization is done using SYNC_IN_A pin
  # 2 Synchronization is done using SYNC_IN_B pin
  # 3 Synchronization is done using SYNC_IN_C pin
  # 4 Synchronization is done using SYNC_IN_D pin
  # 5 Synchronization is internal
  # 6 Synchronization is done using SYNC_OUT_A pin
  # 7 Synchronization is done using SYNC_OUT_B pin
  gnss1ModuleSyncAssignment: 0
  # RTCM input port assignment for Ellipse-N DGPS
  rtcmPortAssignment: 255
  # Odometer module pin assignment
  # 0 Odometer is disabled
  # 1 Odometer connected only to ODO_A (unidirectional).
  # 2 Odometer connected to both ODO_A (signal A) and ODO_B (Signal B or direction) for bidirectional odometer.
  odometerPinAssignment: 0

magnetometer:
  # Magnetometer model ID
  # 201 Should be used in most applications
  # 202 Should be used in disturbed magnetic environment
  magnetometerModel: 201
  # Magnetometer rejection mode
  # 0 Measurement is not taken into account
  # 1 Measurement is rejected if inconsistent with current estimate (depending on error model)
  # 2 Measurement is always accepted
  magnetometerRejectMode: 1

  # Theses parameters are only used for a calibration run
  calibration:
    # 1 2D Tell the device that the magnetic calibration will be performed with limited motions. 
    #     This calibration mode is only designed to be used when roll and pitch motions are less than ± 5°. 
    #     To work correctly, the device should be rotated through at least a full circle.
    # 2 3D Tell the device to start a full 3D magnetic calibration procedure. The 3D magnetic calibration offers the best accuracy
    mode: 2

    # 0 LOW_BW Use this parameter in case of strong magnetic noise during calibration. 
    #     Motion during calibration is then limited to slow rotations.
    # 1 MEDIUM_BW Tell the device that medium dynamics will be observed during the magnetic calibration process. 
    #     It can be used in case of medium magnetic noise during calibration process. Medium dynamics are used during calibration.
    # 2 HIGH_BW This parameter is suitable to most applications. It can be used when the dynamics during calibration are relatively high.
    bandwidth: 2


# GNSS configuration
# Note: Secondary level arms should only be considered in case of dual antenna GNSS receiver. It can be left to 0 otherwise.
gnss:
  # Gnss Model Id
  # 101 Used on Ellipse-N to setup the internal GNSS in GPS+GLONASS
  # 102 Default mode for Ellipse-E connection to external GNSS
  # 103 Used on Ellipse-N to setup the internal GNSS in GPS+BEIDOU
  # 104 Used on Ellipse-E to setup a connection to ublox in read only mode.
  # 106 Used on Ellipse-E to setup a connection to Novatel receiver in read only mode.
  # 107 Used on Ellipse-D by default
  gnss_model_id: 101

  #GNSS primary antenna lever arm in IMU X axis (m)
  primaryLeverArmX: 0
  #GNSS primary antenna lever arm in IMU Y axis (m)
  primaryLeverArmY: 0
  #GNSS primary antenna lever arm in IMU Z axis (m)
  primaryLeverArmZ: 0
  #GNSS primary antenna precise. Set to true if the primary lever arm has been accurately entered and doesn't need online re-estimation.
  primaryLeverPrecise: true

  #GNSS secondary antenna lever arm in IMU X axis (m)
  secondaryLeverArmX: 0
  #GNSS secondary antenna lever arm in IMU Y axis (m)
  secondaryLeverArmY: 0
  #GNSS secondary antenna lever arm in IMU Z axis (m)
  secondaryLeverArmZ: 0

  # Secondary antenna operating mode.
  # 1 The GNSS will be used in single antenna mode only and the secondary lever arm is not used.
  # 2 [Reserved] The GNSS dual antenna information will be used but the secondary lever arm is not known.
  # 3 The GNSS dual antenna information will be used and we have a rough guess for the secondary lever arm.
  # 4 The GNSS dual antenna information will be used and the secondary lever arm is accurately entered and doesn't need online re-estimation.
  secondaryLeverMode: 1

  # Rejection mode for position
  # 0 Measurement is not taken into account
  # 1 Measurement is rejected if inconsistent with current estimate (depending on error model)
  # 2 Measurement is always accepted
  posRejectMode: 1
  # Rejection mode for velocity (see posRejectMode values)
  velRejectMode: 1
  # Rejection mode for true heading (see posRejectMode values)
  hdtRejectMode: 1

# Odometer configuration
odom:
  # Odometer's gain Pulses/m
  gain: 4800 
  # User gain average error (%)
  gain_error: 0.1 
  # Odometer's direction
  # 0: positive
  # 1: negative
  direction: 0

  # Odometer lever arm in IMU X axis (m)
  leverArmX: 0
  # Odometer lever arm in IMU Y axis (m)
  leverArmY: 0
  # Odometer lever arm in IMU Z axis (m)
  leverArmZ
  • 3
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值