yaml参数文件的使用

博客介绍了如何在自动驾驶场景下使用yaml参数文件。params.yaml包含关键参数hilbert_h和navsat,通过launch文件加载后,这些参数可在程序中被调用,其中参数路径与yaml文件中的键值相匹配。
摘要由CSDN通过智能技术生成

params.yaml文件中的内容如下,注意这里的hilbert_h:navsat:

hilbert_h:
  pointCloudTopic: "/velodyne_points"            # Point cloud data
  imuTopic: "/imu/data"                          # IMU data
  odomTopic: "odometry/imu"                      # IMU pre-preintegration odometry, same frequency as IMU
  gpsTopic: "odometry/gps"                       # GPS odometry topic from navsat, see module_navsat.launch file
navsat:
  frequency: 40
  wait_for_datum: false
  delay: 1.0
  magnetic_declination_radians: 0
  yaw_offset: 0
  zero_altitude: false
  broadcast_utm_transform: false
  broadcast_utm_transform_as_parent_frame: false
  publish_filtered_gps: false

使用时,在launch文件中加载该参数文件:

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

加载后,即可在程序中使用参数,注意,此处的 hilbert_h/ 与上面的 hilbert_h: 相对应

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值